Changeset 14506 in josm
- Timestamp:
- 2018-12-03T23:15:52+01:00 (6 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/org/openstreetmap/josm/tools/ImageProvider.java
r14439 r14506 35 35 import java.util.Base64; 36 36 import java.util.Collection; 37 import java.util.Collections; 37 38 import java.util.EnumMap; 38 39 import java.util.HashMap; … … 259 260 260 261 /** set of class loaders to take images from */ 261 private static final Set<ClassLoader> classLoaders = new HashSet<>();262 private static final Set<ClassLoader> classLoaders = Collections.synchronizedSet(new HashSet<>()); 262 263 static { 263 264 try { … … 1208 1209 if (path != null && path.startsWith("resource://")) { 1209 1210 String p = path.substring("resource://".length()); 1210 for (ClassLoader source : classLoaders) { 1211 URL res; 1212 if ((res = source.getResource(p + name)) != null) 1213 return res; 1211 synchronized (classLoaders) { 1212 for (ClassLoader source : classLoaders) { 1213 URL res; 1214 if ((res = source.getResource(p + name)) != null) 1215 return res; 1216 } 1214 1217 } 1215 1218 } else {
Note:
See TracChangeset
for help on using the changeset viewer.