RFR: 8366908: Use a different class for testing JDK-8351654
Coleen Phillimore
coleenp at openjdk.org
Fri Sep 5 15:33:11 UTC 2025
On Fri, 5 Sep 2025 12:53:49 GMT, Chen Liang <liach 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.
>
> test/hotspot/jtreg/runtime/verifier/CFLH/TestVerify.java line 167:
>
>> 165: inst.addTransformer(new BadTransformer());
>> 166: Class<?> cls = Class.forName(CLASS_TO_BREAK);
>> 167: System.out.println("class loaded" + cls);
>
> Isn't this println redundant, because the VerifyError is supposed to be thrown before? I think the old code uses `Durations.ofHours` to trigger verification and initialization of Duration.
It is not reached since we throw the VerifyError at line 166.
-------------
PR Review Comment: https://git.openjdk.org/jdk/pull/27116#discussion_r2325411714
More information about the hotspot-runtime-dev
mailing list