On Thu, 15 May 2025 22:49:45 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.
>
> Chris Plummer has updated the pull request incrementally with one additional 
> commit since the last revision:
> 
>   fix comment to reference threadByFieldName()

Thanks for the reviews Alex and Serguei!

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

PR Comment: https://git.openjdk.org/jdk/pull/25190#issuecomment-2887644214

Reply via email to