RFR: 8306446: java/lang/management/ThreadMXBean/Locks.java transient failures [v2]

Kevin Walls kevinw at openjdk.org
Wed Jun 21 12:59:34 UTC 2023


On Wed, 21 Jun 2023 12:38:14 GMT, Alan Bateman <alanb at openjdk.org> wrote:

>> test/jdk/java/lang/management/ThreadMXBean/Locks.java line 72:
>> 
>>> 70:                                             .filter(Objects::nonNull)
>>> 71:                                             .filter(i -> name.equals(i.getLockOwnerName()))
>>> 72:                                             .filter(i  -> !i.getLockName().contains("java.lang.VirtualThread"))
>> 
>> Suggestion:
>> 
>>                                             .filter(i -> !i.getLockName().contains("java.lang.VirtualThread"))
>
> ThreadMXBean::getAllThreadsIds returns an array of the thread IDs of platform threads, it doesn't include virtual threads, so I don't know why this filter is added.

Whitespace correction, thanks.

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

PR Review Comment: https://git.openjdk.org/jdk/pull/14501#discussion_r1236955281


More information about the serviceability-dev mailing list