File tree Expand file tree Collapse file tree 2 files changed +19
-2
lines changed
src/java.compiler/share/classes/javax/lang/model
test/langtools/tools/javac/versions Expand file tree Collapse file tree 2 files changed +19
-2
lines changed Original file line number Diff line number Diff line change @@ -81,6 +81,8 @@ public enum SourceVersion {
81
81
* switch in second preview, module Import Declarations in second
82
82
* preview, simple source files and instance main in fourth
83
83
* preview, flexible constructor bodies in third preview)
84
+ * 25: module import declarations, compact source files and
85
+ * instance main methods,
84
86
*/
85
87
86
88
/**
@@ -449,11 +451,18 @@ public enum SourceVersion {
449
451
* The version introduced by the Java Platform, Standard Edition
450
452
* 25.
451
453
*
454
+ * Additions in this release include module import declarations
455
+ * and compact source files and instance main methods.
456
+ *
452
457
* @since 25
453
458
*
454
459
* @see <a
455
460
* href="https://docs.oracle.com/javase/specs/jls/se25/html/index.html">
456
461
* <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>
457
466
*/
458
467
RELEASE_25 ,
459
468
; // Reduce code churn when appending new constants
Original file line number Diff line number Diff line change 1
1
/*
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.
3
3
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
4
4
*
5
5
* This code is free software; you can redistribute it and/or modify it
26
26
* @bug 4981566 5028634 5094412 6304984 7025786 7025789 8001112 8028545
27
27
* 8000961 8030610 8028546 8188870 8173382 8173382 8193290 8205619 8028563
28
28
* 8245147 8245586 8257453 8286035 8306586 8320806 8306586 8319414 8330183
29
- * 8342982
29
+ * 8342982 8356108
30
30
* @summary Check interpretation of -target and -source options
31
31
* @modules java.compiler
32
32
* jdk.compiler
@@ -403,6 +403,14 @@ public static void main(String... args) {
403
403
}
404
404
}
405
405
""" ),
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
+ """ ),
406
414
; // Reduce code churn when appending new constants
407
415
408
416
private int sourceLevel ;
You can’t perform that action at this time.
0 commit comments