On Mon, 12 May 2025 19:35:05 GMT, Chris Plummer <cjplum...@openjdk.org> wrote:

> This batch of changes mostly concerns the remaining uses of threadByName() 
> and converting them to use threadByFieldNameOrThrow() or the new 
> threadByFieldName(). The latter is used if the caller has code to handle a 
> null result. The former is when an exception is needed to get the test to 
> terminate properly. I did fix a few long standing cases where threadyByName() 
> was being called and not checking the result. These call sites now use 
> threadByFieldNameOrThrow() instead of threadByFieldName().
> 
> Note there is a minor semantic change in doing this. threadByName() has some 
> extra code to check that the named thread is only found once, and will throw 
> an exception if it is. I think this was just some extra checking that was 
> being done during test development, and is not needed for proper test 
> execution. I've run all the tests without this check and they still pass. I 
> plan on removing this check at some point. 
> 
> Tested by running all tier5 svc tests, which includes the nsk/jdi tests. Also 
> ran tier1 and ran locally.

This pull request has now been integrated.

Changeset: 10258dc5
Author:    Chris Plummer <cjplum...@openjdk.org>
URL:       
https://git.openjdk.org/jdk/commit/10258dc56eb7d5d99ca8ed2579e871de91c74769
Stats:     612 lines in 74 files changed: 253 ins; 90 del; 269 mod

8356811: Some nsk/jdi tests can fetch ThreadReference from static field in the 
debuggee: part 4

Reviewed-by: sspitsyn, amenkov

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

PR: https://git.openjdk.org/jdk/pull/25190

Reply via email to