On Wed, 3 Jun 2026 19:00:46 GMT, Viktor Klang <[email protected]> wrote:
>> test/jdk/java/util/concurrent/tck/ForkJoinPoolTest.java line 669:
>>
>>> 667: final Thread submitter = Thread.currentThread();
>>> 668: final ExecutorService p = new ForkJoinPool(1);
>>> 669: try (PoolCleaner cleaner = cleaner(p)) {
>>
>> As ExecutorService extends AutoCloseable then I assume PoolCleaner is not
>> needed here.
>
> Good question. I'm following the convention in the test file:
> https://github.com/openjdk/jdk/pull/31376/changes/BASE..0231ed9e9cb2041a3bf5c7ef5e32c22ddecf93db#diff-cf95a2f5a26f4a620d0c7ed6525dba84aeaea5e88b1c382900869d0f265ed367R689
Okay, so maybe for another time as some of the PoolCleaner usages could be done
with try-with-resources.
-------------
PR Review Comment: https://git.openjdk.org/jdk/pull/31376#discussion_r3373723752