On Fri, 24 Apr 2026 06:25:21 GMT, Alan Bateman <[email protected]> wrote:

>> test/jdk/jdk/internal/vm/ThreadSnapshot/ThreadExiting.java line 70:
>> 
>>> 68:             sync.arriveAndAwaitAdvance();
>>> 69:             while (creatorAtIteration == i) {
>>> 70:                 Helper.isAlive(target);
>> 
>> Suggestion:
>> 
>>                 Helper.isAlive(target);  // Calls ThreadSnapshot.of(target);
>> 
>> The class and method are very poorly named.
>
> This is the patched-in Helper class for the ThreadNotAlive test. It's only 
> needed because ThreadSnapshot.of(Thread) is not accessible. It would be okay 
> to change ThreadSnapshot and the static of(Thread) method to public, this 
> would allow Helper to be removed. The tests using ThreadSnapshot would of 
> course need to export jdk.internal.vm in the test description.

I applied Alan’s suggestion and removed `Helper.java`.

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

PR Review Comment: https://git.openjdk.org/jdk/pull/30903#discussion_r3149655111

Reply via email to