src/java.compiler/share/classes/javax/lang/model/SourceVersion.java
branchdatagramsocketimpl-branch
changeset 58678 9cf78a70fa4f
parent 54271 44edf64cb206
child 58679 9c3209ff7550
--- a/src/java.compiler/share/classes/javax/lang/model/SourceVersion.java	Thu Oct 17 20:27:44 2019 +0100
+++ b/src/java.compiler/share/classes/javax/lang/model/SourceVersion.java	Thu Oct 17 20:53:35 2019 +0100
@@ -58,8 +58,9 @@
      *   9: modules, small cleanups to 1.7 and 1.8 changes
      *  10: local-variable type inference (var)
      *  11: local-variable syntax for lambda parameters
-     *  12: no changes (switch expressions in preview)
-     *  13: TBD
+     *  12: no changes (switch expressions were in preview)
+     *  13: no changes (switch expressions and text blocks in preview)
+     *  14: TBD
      */
 
     /**
@@ -192,7 +193,15 @@
      *
      * @since 13
      */
-     RELEASE_13;
+     RELEASE_13,
+
+    /**
+     * The version recognized by the Java Platform, Standard Edition
+     * 14.
+     *
+     * @since 14
+     */
+     RELEASE_14;
 
     // Note that when adding constants for newer releases, the
     // behavior of latest() and latestSupported() must be updated too.
@@ -203,7 +212,7 @@
      * @return the latest source version that can be modeled
      */
     public static SourceVersion latest() {
-        return RELEASE_13;
+        return RELEASE_14;
     }
 
     private static final SourceVersion latestSupported = getLatestSupported();
@@ -218,7 +227,7 @@
     private static SourceVersion getLatestSupported() {
         int intVersion = Runtime.version().feature();
         return (intVersion >= 11) ?
-            valueOf("RELEASE_" + Math.min(13, intVersion)):
+            valueOf("RELEASE_" + Math.min(14, intVersion)):
             RELEASE_10;
     }
 
@@ -257,8 +266,8 @@
      * followed only by characters for which {@link
      * Character#isJavaIdentifierPart(int)} returns {@code true}.
      * This pattern matches regular identifiers, keywords, restricted
-     * keywords, and the literals {@code "true"}, {@code "false"},
-     * {@code "null"}, and {@code "var"}.
+     * keywords, restricted identifiers and the literals {@code "true"},
+     * {@code "false"}, {@code "null"}.
      *
      * The method returns {@code false} for all other strings.
      *
@@ -295,7 +304,7 @@
      * for keywords, boolean literals, and the null literal.
      *
      * This method returns {@code true} for <i>restricted
-     * keywords</i> and {@code "var"}.
+     * keywords</i> and <i>restricted identifiers</i>
      *
      * @param name the string to check
      * @return {@code true} if this string is a
@@ -314,7 +323,7 @@
      * for keywords, boolean literals, and the null literal.
      *
      * This method returns {@code true} for <i>restricted
-     * keywords</i> and {@code "var"}.
+     * keywords</i> and <i>restricted identifiers</i>
      *
      * @param name the string to check
      * @param version the version to use
@@ -338,7 +347,7 @@
      * Returns whether or not {@code s} is a keyword, boolean literal,
      * or null literal in the latest source version.
      * This method returns {@code false} for <i>restricted
-     * keywords</i> and {@code "var"}.
+     * keywords</i> and <i>restricted identifiers</i>.
      *
      * @param s the string to check
      * @return {@code true} if {@code s} is a keyword, or boolean
@@ -355,7 +364,7 @@
      * Returns whether or not {@code s} is a keyword, boolean literal,
      * or null literal in the given source version.
      * This method returns {@code false} for <i>restricted
-     * keywords</i> and {@code "var"}.
+     * keywords</i> and <i>restricted identifiers</i>.
      *
      * @param s the string to check
      * @param version the version to use