RFR: 8357172: Extend try block in nsk/jdi tests to capture exceptions thrown by Debuggee.classByName()

Andrey Turbanov aturbanov at openjdk.org
Tue May 27 10:10:55 UTC 2025


On Tue, 20 May 2025 20:10:20 GMT, Chris Plummer <cjplummer at openjdk.org> wrote:

> Extend try block to cover debuggee.classByname() call. I would suggest disabling whitespace diffs when doing the review. It makes code movement and deletions more obvious.
> 
> There are a number of places where I removed a try/catch of InterruptedException around a Thread.sleep. This will now be handled by the outer try which was moved to before this try/catch.
> 
> Tested nsk/jdi test locally. Will do more thorough ci testing.

test/hotspot/jtreg/vmTestbase/nsk/jdi/ObjectReference/setValue/setvalue002.java line 123:

> 121:             }
> 122:             thrRef.suspend();
> 123:             while(!thrRef.isSuspended()) {

Suggestion:

            while (!thrRef.isSuspended()) {

test/hotspot/jtreg/vmTestbase/nsk/jdi/ObjectReference/setValue/setvalue003.java line 156:

> 154:             }
> 155:             thrRef.suspend();
> 156:             while(!thrRef.isSuspended()) {

Suggestion:

            while (!thrRef.isSuspended()) {

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

PR Review Comment: https://git.openjdk.org/jdk/pull/25337#discussion_r2108785297
PR Review Comment: https://git.openjdk.org/jdk/pull/25337#discussion_r2108784987


More information about the serviceability-dev mailing list