src/java.compiler/share/classes/javax/lang/model/SourceVersion.java
changeset 50892 a5557f24b4d4
parent 48538 82c3d4173a53
child 51198 979e4708da65
--- a/src/java.compiler/share/classes/javax/lang/model/SourceVersion.java	Thu Jun 28 19:55:44 2018 +0200
+++ b/src/java.compiler/share/classes/javax/lang/model/SourceVersion.java	Wed Jun 27 21:01:12 2018 -0700
@@ -171,7 +171,15 @@
      *
      * @since 11
      */
-     RELEASE_11;
+     RELEASE_11,
+
+    /**
+     * The version recognized by the Java Platform, Standard Edition
+     * 12.
+     *
+     * @since 12
+     */
+     RELEASE_12;
 
     // Note that when adding constants for newer releases, the
     // behavior of latest() and latestSupported() must be updated too.
@@ -182,7 +190,7 @@
      * @return the latest source version that can be modeled
      */
     public static SourceVersion latest() {
-        return RELEASE_11;
+        return RELEASE_12;
     }
 
     private static final SourceVersion latestSupported = getLatestSupported();
@@ -192,6 +200,8 @@
             String specVersion = System.getProperty("java.specification.version");
 
             switch (specVersion) {
+                case "12":
+                    return RELEASE_12;
                 case "11":
                     return RELEASE_11;
                 case "10":