From 4d0678cf045b96fd61b607c7cf2dcecf443de35a Mon Sep 17 00:00:00 2001 From: Alexey Kudravtsev Date: Thu, 30 Nov 2017 18:08:30 +0300 Subject: [PATCH] removed StreamEx to avoid accidentally initializing ForkJoinPool too early --- platform/testFramework/src/com/intellij/TestAll.java | 10 ++++------ 1 file changed, 4 insertions(+), 6 deletions(-) diff --git a/platform/testFramework/src/com/intellij/TestAll.java b/platform/testFramework/src/com/intellij/TestAll.java index 1c394728b476..36c94f617e02 100644 --- a/platform/testFramework/src/com/intellij/TestAll.java +++ b/platform/testFramework/src/com/intellij/TestAll.java @@ -16,7 +16,6 @@ package com.intellij; -import com.intellij.concurrency.IdeaForkJoinWorkerThreadFactory; import com.intellij.idea.Bombed; import com.intellij.idea.RecordExecution; import com.intellij.openapi.diagnostic.Logger; @@ -26,9 +25,9 @@ import com.intellij.testFramework.*; import com.intellij.tests.ExternalClasspathClassLoader; import com.intellij.util.ArrayUtil; import com.intellij.util.ReflectionUtil; +import com.intellij.util.containers.ContainerUtil; import gnu.trove.THashSet; import junit.framework.*; -import one.util.streamex.StreamEx; import org.jetbrains.annotations.NotNull; import org.jetbrains.annotations.Nullable; import org.junit.runner.Description; @@ -48,7 +47,6 @@ import java.util.List; @SuppressWarnings({"HardCodedStringLiteral", "CallToPrintStackTrace", "UseOfSystemOutOrSystemErr", "TestOnlyProblems", "BusyWait"}) public class TestAll implements Test { static { - IdeaForkJoinWorkerThreadFactory.setupForkJoinCommonPool(); Logger.setFactory(TestLoggerFactory.class); } @@ -130,7 +128,7 @@ public class TestAll implements Test { String testRoots = System.getProperty("test.roots"); if (testRoots != null) { System.out.println("Collecting tests from roots specified by test.roots property: " + testRoots); - return StreamEx.of(testRoots.split(";")).map(File::new).toList(); + return ContainerUtil.map(testRoots.split(";"), File::new); } List roots = ExternalClasspathClassLoader.getRoots(); if (roots != null) { @@ -158,12 +156,12 @@ public class TestAll implements Test { } catch (Throwable ignore) {} } - return StreamEx.of(System.getProperty("java.class.path").split(File.pathSeparator)).map(File::new).toList(); + return ContainerUtil.map(System.getProperty("java.class.path").split(File.pathSeparator), File::new); } } private static List getClassRoots(URL[] urls) { - final List classLoaderRoots = StreamEx.of(urls).map(url -> new File(VfsUtilCore.urlToPath(VfsUtilCore.convertFromUrl(url)))).toList(); + final List classLoaderRoots = ContainerUtil.map(urls, url -> new File(VfsUtilCore.urlToPath(VfsUtilCore.convertFromUrl(url)))); System.out.println("Collecting tests from " + classLoaderRoots); return classLoaderRoots; }