Skip to content

Commit 6719b92

Browse files
committed
8356108: Update SourceVersion.RELEASE_25 description for JEPs 511 and 512
Reviewed-by: vromero, liach, iris, jlahoda
1 parent 1501a5e commit 6719b92

File tree

2 files changed

+19
-2
lines changed

2 files changed

+19
-2
lines changed

src/java.compiler/share/classes/javax/lang/model/SourceVersion.java

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -81,6 +81,8 @@ public enum SourceVersion {
8181
* switch in second preview, module Import Declarations in second
8282
* preview, simple source files and instance main in fourth
8383
* preview, flexible constructor bodies in third preview)
84+
* 25: module import declarations, compact source files and
85+
* instance main methods,
8486
*/
8587

8688
/**
@@ -449,11 +451,18 @@ public enum SourceVersion {
449451
* The version introduced by the Java Platform, Standard Edition
450452
* 25.
451453
*
454+
* Additions in this release include module import declarations
455+
* and compact source files and instance main methods.
456+
*
452457
* @since 25
453458
*
454459
* @see <a
455460
* href="https://docs.oracle.com/javase/specs/jls/se25/html/index.html">
456461
* <cite>The Java Language Specification, Java SE 25 Edition</cite></a>
462+
* @see <a href="https://openjdk.org/jeps/511">
463+
* JEP 511: Module Import Declarations</a>
464+
* @see <a href="https://openjdk.org/jeps/512">
465+
* JEP 512: Compact Source Files and Instance Main Methods</a>
457466
*/
458467
RELEASE_25,
459468
; // Reduce code churn when appending new constants

test/langtools/tools/javac/versions/Versions.java

Lines changed: 10 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
/*
2-
* Copyright (c) 2014, 2024, Oracle and/or its affiliates. All rights reserved.
2+
* Copyright (c) 2014, 2025, Oracle and/or its affiliates. All rights reserved.
33
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
44
*
55
* This code is free software; you can redistribute it and/or modify it
@@ -26,7 +26,7 @@
2626
* @bug 4981566 5028634 5094412 6304984 7025786 7025789 8001112 8028545
2727
* 8000961 8030610 8028546 8188870 8173382 8173382 8193290 8205619 8028563
2828
* 8245147 8245586 8257453 8286035 8306586 8320806 8306586 8319414 8330183
29-
* 8342982
29+
* 8342982 8356108
3030
* @summary Check interpretation of -target and -source options
3131
* @modules java.compiler
3232
* jdk.compiler
@@ -403,6 +403,14 @@ public static void main(String... args) {
403403
}
404404
}
405405
"""),
406+
407+
SOURCE_25(25, "New25.java",
408+
// New feature in 25: module import declarations
409+
"""
410+
import module java.base;
411+
public class New25 {
412+
}
413+
"""),
406414
; // Reduce code churn when appending new constants
407415

408416
private int sourceLevel;

0 commit comments

Comments
 (0)