On Wed, 18 Mar 2026 07:03:14 GMT, David Holmes <[email protected]> wrote:
>> Zhengyu Gu has updated the pull request incrementally with one additional
>> commit since the last revision:
>>
>> Update ThreadInfoTest.java from @kevinjwalls
>
> test/hotspot/jtreg/serviceability/threads/ThreadInfoTest.java line 89:
>
>> 87:
>> 88: // Count ThreadInfo from array, return how many are non-null.
>> 89: private static int countInfo(long[] ids, ThreadInfo[] info) {
>
> `ids` is unused in this function.
Fixed
> test/hotspot/jtreg/serviceability/threads/ThreadInfoTest.java line 107:
>
>> 105: if (info != null) {
>> 106: int i = 0;
>> 107: for (ThreadInfo ti: info) {
>
> Nit: if you have to manually track the loop index then there is no real point
> using a for-each loop - just use a normal for-loop.
Fixed
> test/hotspot/jtreg/serviceability/threads/ThreadInfoTest.java line 169:
>
>> 167: Exception myException = new Exception("Test exception");
>> 168: long sleep = Math.max(1, endTimeMs -
>> System.currentTimeMillis());
>> 169: goSleep(sleep);
>
> Is this really all needed? Any reason not to unlock the lock?
@kevinjwalls could you please comment.
-------------
PR Review Comment: https://git.openjdk.org/jdk/pull/30105#discussion_r2954256998
PR Review Comment: https://git.openjdk.org/jdk/pull/30105#discussion_r2954258896
PR Review Comment: https://git.openjdk.org/jdk/pull/30105#discussion_r2954254953