[lworld] RFR: 8372599: [lworld] runtime/cds/serviceability/ReplaceCriticalClassesForSubgraphs.java fails with --enable-preview

Roger Riggs rriggs at openjdk.org
Tue Jan 27 19:25:03 UTC 2026


On Tue, 27 Jan 2026 19:09:24 GMT, Matias Saavedra Silva <matsaave at openjdk.org> wrote:

> IntegerCache is no longer used in preview mode resulting in `ReplaceCriticalClassesForSubgraphs.java` failing, so instead this test should check for a different output when running in preview mode. Verified locally.

Maybe simpler code but looks ok.

test/hotspot/jtreg/runtime/cds/serviceability/ReplaceCriticalClassesForSubgraphs.java line 49:

> 47:         // IntegerCache does not exist in preview mode so it should not be expected in the output
> 48:         if (PreviewFeatures.isEnabled()) {
> 49:             tests = new String[] {

There could be less duplication, and easier to see what's different, if refactored to create a List<String> and add common cases and then conditional cases and then convert the List<String> to String[].

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

Marked as reviewed by rriggs (Committer).

PR Review: https://git.openjdk.org/valhalla/pull/1984#pullrequestreview-3713044035
PR Review Comment: https://git.openjdk.org/valhalla/pull/1984#discussion_r2733491264


More information about the valhalla-dev mailing list