mirror of
https://github.com/JetBrains/JetBrainsRuntime.git
synced 2025-12-06 09:29:38 +01:00
8341989: [21u] Back out JDK-8327501 and JDK-8328366
Reviewed-by: goetz
This commit is contained in:
committed by
Vitaly Provodin
parent
6de92fcf24
commit
f8ebb02111
@@ -1140,7 +1140,9 @@ public class ForkJoinPool extends AbstractExecutorService {
|
||||
boolean isCommon = (pool.workerNamePrefix == null);
|
||||
@SuppressWarnings("removal")
|
||||
SecurityManager sm = System.getSecurityManager();
|
||||
if (sm != null && isCommon)
|
||||
if (sm == null)
|
||||
return new ForkJoinWorkerThread(null, pool, true, false);
|
||||
else if (isCommon)
|
||||
return newCommonWithACC(pool);
|
||||
else
|
||||
return newRegularWithACC(pool);
|
||||
|
||||
@@ -79,9 +79,6 @@ public class ForkJoinPool9Test extends JSR166TestCase {
|
||||
assertSame(ForkJoinPool.commonPool(), ForkJoinTask.getPool());
|
||||
Thread currentThread = Thread.currentThread();
|
||||
|
||||
ClassLoader preexistingContextClassLoader =
|
||||
currentThread.getContextClassLoader();
|
||||
|
||||
Stream.of(systemClassLoader, null).forEach(cl -> {
|
||||
if (randomBoolean())
|
||||
// should always be permitted, without effect
|
||||
@@ -98,11 +95,6 @@ public class ForkJoinPool9Test extends JSR166TestCase {
|
||||
() -> System.getProperty("foo"),
|
||||
() -> currentThread.setContextClassLoader(
|
||||
classLoaderDistinctFromSystemClassLoader));
|
||||
else {
|
||||
currentThread.setContextClassLoader(classLoaderDistinctFromSystemClassLoader);
|
||||
assertSame(currentThread.getContextClassLoader(), classLoaderDistinctFromSystemClassLoader);
|
||||
currentThread.setContextClassLoader(preexistingContextClassLoader);
|
||||
}
|
||||
// TODO ?
|
||||
// if (haveSecurityManager
|
||||
// && Thread.currentThread().getClass().getSimpleName()
|
||||
|
||||
Reference in New Issue
Block a user