RFR: 8368500: ContextClassLoader cannot be reset on threads in ForkJoinPool.commonPool() [v2]

Johny Jose duke at openjdk.org
Tue Oct 7 12:34:28 UTC 2025


On Mon, 6 Oct 2025 17:43:04 GMT, Alan Bateman <alanb at openjdk.org> wrote:

>> Johny Jose has updated the pull request incrementally with one additional commit since the last revision:
>> 
>>   Review changes
>
> test/jdk/java/util/concurrent/forkjoin/ContextClassLoaderTest.java line 46:
> 
>> 44:     @Test
>> 45:     void testContextClassLoaderIsSetAndRestored() throws InterruptedException {
>> 46:         CountDownLatch latch = new CountDownLatch(1);
> 
> It looks like latch.await() is missing from the test.

Updated the test case

> test/jdk/java/util/concurrent/forkjoin/ContextClassLoaderTest.java line 70:
> 
>> 68:                         ((URLClassLoader) customCCL).close();
>> 69:                     }
>> 70:                 } catch (Exception ignored) {}
> 
> You can remove the customCCL.close,  there are no JAR/other resources to close.

Removed the close

-------------

PR Review Comment: https://git.openjdk.org/jdk/pull/27648#discussion_r2410461348
PR Review Comment: https://git.openjdk.org/jdk/pull/27648#discussion_r2410462670


More information about the core-libs-dev mailing list