[lworld] RFR: 8374021: [lworld] tools/javac/preview/PreviewAutoSuppress.java compiler.err.is.preview: preview.api.Outer fail

Chen Liang liach at openjdk.org
Mon Feb 9 21:50:48 UTC 2026


On Fri, 6 Feb 2026 20:13:50 GMT, David Beaumont <duke at openjdk.org> wrote:

> Make test robust against spec version changes.

Changes requested by liach (Committer).

Good!

test/langtools/tools/javac/preview/PreviewAutoSuppress.java line 101:

> 99:         // As of Valhalla, j.l.Record is a preview class
> 100:         List<String> expected =
> 101:                 List.of("- compiler.warn.preview.feature.use.classfile: Record.class, " + SPEC_VERSION,

Don't need the new constant, you see above we are using:
`"-source", String.valueOf(Runtime.version().feature()),`
So just:

Suggestion:

                List.of("- compiler.warn.preview.feature.use.classfile: Record.class, " + Runtime.version().feature(),

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

PR Review: https://git.openjdk.org/valhalla/pull/2065#pullrequestreview-3765065501
Marked as reviewed by liach (Committer).

PR Review: https://git.openjdk.org/valhalla/pull/2065#pullrequestreview-3773096726
PR Review Comment: https://git.openjdk.org/valhalla/pull/2065#discussion_r2775957240


More information about the valhalla-dev mailing list