RFR: 8366908: Use a different class for testing JDK-8351654 [v2]

ExE Boss duke at openjdk.org
Sat Sep 6 16:12:14 UTC 2025


On Fri, 5 Sep 2025 15:43:26 GMT, Coleen Phillimore <coleenp at openjdk.org> wrote:

>> java.time.Duration is a migrated class (to be a value type) in the Valhalla repo, so it's preloaded, which causes this test to fail.  Using a different java.base class achieves the purpose of this test.
>> Tested with tier1.
>
> Coleen Phillimore has updated the pull request incrementally with one additional commit since the last revision:
> 
>   remove unreachable line.

test/hotspot/jtreg/runtime/verifier/CFLH/TestVerify.java line 93:

> 91:                     builder.with(element);
> 92:                 });
> 93:                 var classTransform = ClassTransform.transformingMethods(mm -> mm.methodName().stringValue().equals("parse"), methodTransform);

This can use [`Utf8Entry::equalsString`] to avoid unnecessarily inflating all method names:
Suggestion:

                var classTransform = ClassTransform.transformingMethods(mm -> mm.methodName().equalsString("parse"), methodTransform);


[`Utf8Entry::equalsString`]: https://docs.oracle.com/en/java/javase/24/docs/api/java.base/java/lang/classfile/constantpool/Utf8Entry.html#equalsString%28java.lang.String%29

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

PR Review Comment: https://git.openjdk.org/jdk/pull/27116#discussion_r2327805601


More information about the hotspot-runtime-dev mailing list