Ticket #19240: 19240.patch
File 19240.patch, 1.0 KB (added by , 5 years ago) |
---|
-
src/org/openstreetmap/josm/tools/Territories.java
127 127 /** 128 128 * Initializes territories using the internal data only. 129 129 */ 130 public static void initializeInternalData() {130 public static synchronized void initializeInternalData() { 131 131 iso3166Cache = new HashMap<>(); 132 132 taginfoCache = new TreeMap<>(); 133 133 customTagsCache = new TreeMap<>(); … … 166 166 } catch (IOException | IllegalDataException ex) { 167 167 throw new JosmRuntimeException(ex); 168 168 } finally { 169 MultipolygonCache.getInstance().clear(dataSet); 169 if (dataSet != null) 170 MultipolygonCache.getInstance().clear(dataSet); 170 171 if (!Logging.isDebugEnabled()) { 171 172 // unset dataSet to save memory, see #18907 172 173 dataSet = null;