fixed weird different classloaders in community?

This commit is contained in:
Alexey Kudravtsev
2016-03-09 18:08:25 +03:00
parent 32cc8e1093
commit 1f73ef47f3
@@ -27,7 +27,8 @@ public class IdeaForkJoinWorkerThreadFactory implements ForkJoinPool.ForkJoinWor
public static void setupForkJoinCommonPool() {
System.setProperty("java.util.concurrent.ForkJoinPool.common.parallelism", String.valueOf(PARALLELISM));
System.setProperty("java.util.concurrent.ForkJoinPool.common.threadFactory", IdeaForkJoinWorkerThreadFactory.class.getName());
if (ForkJoinPool.commonPool().getFactory().getClass() != IdeaForkJoinWorkerThreadFactory.class) {
if (!ForkJoinPool.commonPool().getFactory().getClass().getName().equals(IdeaForkJoinWorkerThreadFactory.class.getName())) {
throw new IllegalStateException("Could not set ForkJoinPool thread factory: got "+ForkJoinPool.commonPool().getFactory());
}
}