- Timestamp:
- 2015-09-09T12:48:59+02:00 (9 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/org/openstreetmap/josm/data/osm/visitor/paint/relations/MultipolygonCache.java
r8512 r8739 4 4 import java.util.ArrayList; 5 5 import java.util.Collection; 6 import java.util.HashMap;7 6 import java.util.Iterator; 8 7 import java.util.List; 9 8 import java.util.Map; 9 import java.util.concurrent.ConcurrentHashMap; 10 10 11 11 import org.openstreetmap.josm.Main; … … 47 47 48 48 private MultipolygonCache() { 49 this.cache = new HashMap<>();49 this.cache = new ConcurrentHashMap<>(); // see ticket 11833 50 50 this.selectedPolyData = new ArrayList<>(); 51 51 Main.addProjectionChangeListener(this); … … 84 84 Map<DataSet, Map<Relation, Multipolygon>> map1 = cache.get(nc); 85 85 if (map1 == null) { 86 cache.put(nc, map1 = new HashMap<>());86 cache.put(nc, map1 = new ConcurrentHashMap<>()); 87 87 } 88 88 Map<Relation, Multipolygon> map2 = map1.get(r.getDataSet()); 89 89 if (map2 == null) { 90 map1.put(r.getDataSet(), map2 = new HashMap<>());90 map1.put(r.getDataSet(), map2 = new ConcurrentHashMap<>()); 91 91 } 92 92 multipolygon = map2.get(r);
Note:
See TracChangeset
for help on using the changeset viewer.