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

David Beaumont duke at openjdk.org
Mon Feb 9 21:50:54 UTC 2026


On Fri, 6 Feb 2026 20:47:26 GMT, Chen Liang <liach at openjdk.org> wrote:

>> Make test robust against spec version changes.
>
> 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(),

Thanks. I kept a constant but used `Runtime.version()`, so I can comment it and there isn't the same snippet in 3 places.

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

PR Review Comment: https://git.openjdk.org/valhalla/pull/2065#discussion_r2782208538


More information about the valhalla-dev mailing list