mirror of
https://github.com/openjdk/jdk.git
synced 2025-08-27 06:45:07 +02:00
8328366: Thread.setContextClassloader from thread in FJP commonPool task no longer works after JDK-8327501
Reviewed-by: mchung, alanb
This commit is contained in:
parent
4276d5c004
commit
28216aa971
2 changed files with 9 additions and 6 deletions
|
@ -1140,12 +1140,7 @@ public class ForkJoinPool extends AbstractExecutorService {
|
|||
boolean isCommon = (pool.workerNamePrefix == null);
|
||||
@SuppressWarnings("removal")
|
||||
SecurityManager sm = System.getSecurityManager();
|
||||
if (sm == null) {
|
||||
if (isCommon)
|
||||
return new ForkJoinWorkerThread.InnocuousForkJoinWorkerThread(pool);
|
||||
else
|
||||
return new ForkJoinWorkerThread(null, pool, true, false);
|
||||
} else if (isCommon)
|
||||
if (sm != null && isCommon)
|
||||
return newCommonWithACC(pool);
|
||||
else
|
||||
return newRegularWithACC(pool);
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue