Changeset 18028 in josm


Ignore:
Timestamp:
2021-07-15T09:33:54+02:00 (3 years ago)
Author:
Don-vip
Message:

Make Projections.getProjectionByCode thread-safe

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/src/org/openstreetmap/josm/data/projection/Projections.java

    r16152 r18028  
    1414import java.util.Map;
    1515import java.util.Set;
     16import java.util.concurrent.ConcurrentHashMap;
    1617import java.util.function.Supplier;
    1718import java.util.regex.Matcher;
     
    8586    private static final Set<String> allCodes = new HashSet<>();
    8687    private static final Map<String, Supplier<Projection>> projectionSuppliersByCode = new HashMap<>();
    87     private static final Map<String, Projection> projectionsByCodeCache = new HashMap<>();
     88    private static final Map<String, Projection> projectionsByCodeCache = new ConcurrentHashMap<>();
    8889
    8990    /*********************************
Note: See TracChangeset for help on using the changeset viewer.