8356108: Update SourceVersion.RELEASE_25 description for JEPs 511 and 512

Reviewed-by: vromero, liach, iris, jlahoda
This commit is contained in:
Joe Darcy 2025-05-05 15:42:19 +00:00
parent 1501a5e41e
commit 6719b9214f
2 changed files with 19 additions and 2 deletions

View File

@ -81,6 +81,8 @@ public enum SourceVersion {
* switch in second preview, module Import Declarations in second
* preview, simple source files and instance main in fourth
* preview, flexible constructor bodies in third preview)
* 25: module import declarations, compact source files and
* instance main methods,
*/
/**
@ -449,11 +451,18 @@ public enum SourceVersion {
* The version introduced by the Java Platform, Standard Edition
* 25.
*
* Additions in this release include module import declarations
* and compact source files and instance main methods.
*
* @since 25
*
* @see <a
* href="https://docs.oracle.com/javase/specs/jls/se25/html/index.html">
* <cite>The Java Language Specification, Java SE 25 Edition</cite></a>
* @see <a href="https://openjdk.org/jeps/511">
* JEP 511: Module Import Declarations</a>
* @see <a href="https://openjdk.org/jeps/512">
* JEP 512: Compact Source Files and Instance Main Methods</a>
*/
RELEASE_25,
; // Reduce code churn when appending new constants

View File

@ -1,5 +1,5 @@
/*
* Copyright (c) 2014, 2024, Oracle and/or its affiliates. All rights reserved.
* Copyright (c) 2014, 2025, Oracle and/or its affiliates. All rights reserved.
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
*
* This code is free software; you can redistribute it and/or modify it
@ -26,7 +26,7 @@
* @bug 4981566 5028634 5094412 6304984 7025786 7025789 8001112 8028545
* 8000961 8030610 8028546 8188870 8173382 8173382 8193290 8205619 8028563
* 8245147 8245586 8257453 8286035 8306586 8320806 8306586 8319414 8330183
* 8342982
* 8342982 8356108
* @summary Check interpretation of -target and -source options
* @modules java.compiler
* jdk.compiler
@ -403,6 +403,14 @@ public class Versions {
}
}
"""),
SOURCE_25(25, "New25.java",
// New feature in 25: module import declarations
"""
import module java.base;
public class New25 {
}
"""),
; // Reduce code churn when appending new constants
private int sourceLevel;