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

Chen Liang liach at openjdk.org
Fri Sep 5 12:56:10 UTC 2025


On Fri, 5 Sep 2025 11:35:41 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.

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.

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

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


More information about the hotspot-runtime-dev mailing list