- Timestamp:
 - 2020-02-22T19:40:27+01:00 (6 years ago)
 - File:
 - 
      
- 1 edited
 
 
Legend:
- Unmodified
 - Added
 - Removed
 
- 
      
trunk/src/org/openstreetmap/josm/data/projection/Projections.java
r15902 r15903 85 85 private static final Set<String> allCodes = new HashSet<>(); 86 86 private static final Map<String, Supplier<Projection>> projectionSuppliersByCode = new HashMap<>(); 87 private static final Map<String, Projection> projectionsByCode _cache = new HashMap<>();87 private static final Map<String, Projection> projectionsByCodeCache = new HashMap<>(); 88 88 89 89 /********************************* … … 361 361 */ 362 362 public static Projection getProjectionByCode(String code) { 363 Projection proj = projectionsByCode_cache.get(code); 364 if (proj != null) return proj; 365 363 return projectionsByCodeCache.computeIfAbsent(code, Projections::computeProjectionByCode); 364 } 365 366 private static Projection computeProjectionByCode(String code) { 367 Projection proj = null; 366 368 ProjectionDefinition pd = inits.get(code); 367 369 if (pd != null) { … … 380 382 } 381 383 } 382 if (proj != null) {383 projectionsByCode_cache.put(code, proj);384 }385 384 return proj; 386 385 }  
  Note:
 See   TracChangeset
 for help on using the changeset viewer.
  