Changeset 10214 in josm for trunk/src/org/openstreetmap/josm/data
- Timestamp:
- 2016-05-15T12:43:59+02:00 (8 years ago)
- Location:
- trunk/src/org/openstreetmap/josm/data/validation
- Files:
-
- 2 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/org/openstreetmap/josm/data/validation/OsmValidator.java
r10212 r10214 206 206 } 207 207 208 public static void initializeErrorLayer() {208 public static synchronized void initializeErrorLayer() { 209 209 if (!Main.pref.getBoolean(ValidatorPreference.PREF_LAYER, true)) 210 210 return; -
trunk/src/org/openstreetmap/josm/data/validation/util/Entities.java
r10137 r10214 391 391 } 392 392 } else { // escaped value content is an entity name 393 if (mapNameToValue == null) { 394 mapNameToValue = new HashMap<>(); 395 for (String[] pair : ARRAY) { 396 mapNameToValue.put(pair[0], pair[1]); 397 } 398 } 399 String value = mapNameToValue.get(entityContent); 393 String value = getMapNameToValue().get(entityContent); 400 394 entityValue = value == null ? -1 : Integer.parseInt(value); 401 395 } … … 414 408 return res.toString(); 415 409 } 410 411 private static synchronized Map<String, String> getMapNameToValue() { 412 if (mapNameToValue == null) { 413 mapNameToValue = new HashMap<>(); 414 for (String[] pair : ARRAY) { 415 mapNameToValue.put(pair[0], pair[1]); 416 } 417 } 418 return mapNameToValue; 419 } 416 420 }
Note:
See TracChangeset
for help on using the changeset viewer.