--- old/src/java.compiler/share/classes/javax/lang/model/SourceVersion.java 2019-12-08 12:43:33.525192999 -0800 +++ new/src/java.compiler/share/classes/javax/lang/model/SourceVersion.java 2019-12-08 12:43:33.369270999 -0800 @@ -60,7 +60,9 @@ * 11: local-variable syntax for lambda parameters * 12: no changes (switch expressions in preview) * 13: no changes (switch expressions and text blocks in preview) - * 14: switch expressions + * 14: switch expressions (pattern matching and records in + * preview, text blocks in preview again) + * 15: TBD */ /** @@ -203,7 +205,15 @@ * * @since 14 */ - RELEASE_14; + RELEASE_14, + + /** + * The version recognized by the Java Platform, Standard Edition + * 15. + * + * @since 15 + */ + RELEASE_15; // Note that when adding constants for newer releases, the // behavior of latest() and latestSupported() must be updated too. @@ -214,7 +224,7 @@ * @return the latest source version that can be modeled */ public static SourceVersion latest() { - return RELEASE_14; + return RELEASE_15; } private static final SourceVersion latestSupported = getLatestSupported(); @@ -229,7 +239,7 @@ private static SourceVersion getLatestSupported() { int intVersion = Runtime.version().feature(); return (intVersion >= 11) ? - valueOf("RELEASE_" + Math.min(14, intVersion)): + valueOf("RELEASE_" + Math.min(15, intVersion)): RELEASE_10; }