On Fri, 6 Feb 2026 20:47:26 GMT, Chen Liang <[email protected]> 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