RFR: 8355536: Create version constants to model preview language and vm features [v2]

Luca Kellermann duke at openjdk.org
Sun May 4 19:00:52 UTC 2025


On Sat, 3 May 2025 01:08:17 GMT, Chen Liang <liach at openjdk.org> wrote:

>> Sometimes, for version-specific feature access APIs, we wish to access the preview features of the current Java SE release. To reduce the impact of adding one preview-specific version on every site, we can add a constant modeling the preview features as a fake version.
>
> Chen Liang has updated the pull request with a new target base due to a merge or a rebase. The pull request now contains four commits:
> 
>  - Don't need to update latestSupported later
>    
>  - Merge branch 'pr/25015' of https://github.com/openjdk/jdk into feature/preview-cffv
>  - Add advanced testing for different latestSupported
>    
>  - 8355536: Create version constants to model preview language and vm features

src/java.base/share/classes/java/lang/reflect/ClassFileFormatVersion.java line 413:

> 411:      * ensure the program is compatible with future Java SE releases.
> 412:      * <p>
> 413:      * This is a reflective preview API to allows tools running in Java runtime

Suggestion:

     * This is a reflective preview API that allows tools running in Java runtime

src/java.compiler/share/classes/javax/lang/model/SourceVersion.java line 419:

> 417:      * @see <a href="https://openjdk.org/jeps/456">
> 418:      * JEP 456: Unnamed Variables & Patterns</a>
> 419: 

Suggestion:

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

PR Review Comment: https://git.openjdk.org/jdk/pull/25017#discussion_r2072682604
PR Review Comment: https://git.openjdk.org/jdk/pull/25017#discussion_r2072683561


More information about the core-libs-dev mailing list