-
Notifications
You must be signed in to change notification settings - Fork 6.3k
8368500: ContextClassLoader cannot be reset on threads in ForkJoinPool.commonPool() #27648
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
base: master
Are you sure you want to change the base?
Conversation
👋 Welcome back johnyjose30! A progress list of the required criteria for merging this PR into |
❗ This change is not yet ready to be integrated. |
@johnyjose30 The following label will be automatically applied to this pull request:
When this pull request is ready to be reviewed, an "RFR" email will be sent to the corresponding mailing list. If you would like to change these labels, use the /label pull request command. |
|
||
@Test | ||
void testContextClassLoaderIsSetAndRestored() throws InterruptedException { | ||
CountDownLatch latch = new CountDownLatch(1); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
It looks like latch.await() is missing from the test.
if (customCCL instanceof URLClassLoader) { | ||
((URLClassLoader) customCCL).close(); | ||
} | ||
} catch (Exception ignored) {} |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
You can remove the customCCL.close, there are no JAR/other resources to close.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The src change looks okay but the test isn't quire right at this time.
The permanent disabling of the Security Manager in JDK 24 allow setCCL to set the CCL to a custom class loader. However, it doesn't allow it to be set to a custom class loader and then "reset" back to the system class loader before executing further code in the task. The changes are made to relax the restriction in setCCL to reset back to system class loader
Progress
Issue
Reviewing
Using
git
Checkout this PR locally:
$ git fetch https://git.openjdk.org/jdk.git pull/27648/head:pull/27648
$ git checkout pull/27648
Update a local copy of the PR:
$ git checkout pull/27648
$ git pull https://git.openjdk.org/jdk.git pull/27648/head
Using Skara CLI tools
Checkout this PR locally:
$ git pr checkout 27648
View PR using the GUI difftool:
$ git pr show -t 27648
Using diff file
Download this PR as a diff file:
https://git.openjdk.org/jdk/pull/27648.diff
Using Webrev
Link to Webrev Comment