- Timestamp:
- 2018-01-03T03:41:29+01:00 (7 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/org/openstreetmap/josm/tools/Utils.java
r13173 r13273 1197 1197 1198 1198 /** 1199 * A ForkJoinWorkerThread that will always inherit caller permissions, 1200 * unlike JDK's InnocuousForkJoinWorkerThread, used if a security manager exists. 1201 */ 1202 static final class JosmForkJoinWorkerThread extends ForkJoinWorkerThread { 1203 JosmForkJoinWorkerThread(ForkJoinPool pool) { 1204 super(pool); 1205 } 1206 } 1207 1208 /** 1199 1209 * Returns a {@link ForkJoinPool} with the parallelism given by the preference key. 1200 1210 * @param pref The preference key to determine parallelism … … 1209 1219 @Override 1210 1220 public ForkJoinWorkerThread newThread(ForkJoinPool pool) { 1211 final ForkJoinWorkerThread thread = ForkJoinPool.defaultForkJoinWorkerThreadFactory.newThread(pool); 1221 // Do not use JDK default thread factory ! 1222 // If JOSM is started with Java Web Start, a security manager is installed and the factory 1223 // creates threads without any permission, forbidding them to load a class instantiating 1224 // another ForkJoinPool such as MultipolygonBuilder (see bug #15722) 1225 final ForkJoinWorkerThread thread = new JosmForkJoinWorkerThread(pool); 1212 1226 thread.setName(String.format(Locale.ENGLISH, nameFormat, count.getAndIncrement())); 1213 1227 thread.setPriority(threadPriority);
Note:
See TracChangeset
for help on using the changeset viewer.