-
CSR
-
Resolution: Approved
-
P4
-
None
-
None
-
behavioral
-
minimal
-
Only perverse programs would be broken by the addition of a new enum constant as the last constant. The contract for latest() and latestSupported() is intended to vary by release.
-
Java API
-
SE
Summary
Add a new enum constant RELEASE_11
to javax.lang.model.SourceVersion
for the JDK 11 release.
Problem
The SourceVersion
enum needs an enum constant for each release being modeled.
Solution
Add the enum constant RELEASE_11
.
Specification
--- old/src/java.compiler/share/classes/javax/lang/model/SourceVersion.java 2017-12-11 22:32:47.930062197 -0800
+++ new/src/java.compiler/share/classes/javax/lang/model/SourceVersion.java 2017-12-11 22:32:47.586062182 -0800
@@ -159,7 +159,15 @@
*
* @since 10
*/
- RELEASE_10;
+ RELEASE_10,
+
+ /**
+ * The version recognized by the Java Platform, Standard Edition
+ * 11.
+ *
+ * @since 11
+ */
+ RELEASE_11;
Also, the output of SourceVersion.latest()
is changed to RELEASE_11
.
- csr of
-
JDK-8193291 Add SourceVersion.RELEASE_11
-
- Resolved
-
- relates to
-
JDK-8180864 Add SourceVersion.RELEASE_10
-
- Closed
-
-
JDK-8205396 Add SourceVersion.RELEASE_12
-
- Closed
-