< prev index next >

src/jdk.compiler/share/classes/com/sun/tools/javac/code/Source.java

Print this page

        

@@ -1,7 +1,7 @@
 /*
- * Copyright (c) 2002, 2019, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 2002, 2018, Oracle and/or its affiliates. All rights reserved.
  * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
  *
  * This code is free software; you can redistribute it and/or modify it
  * under the terms of the GNU General Public License version 2 only, as
  * published by the Free Software Foundation.  Oracle designates this

@@ -82,24 +82,15 @@
     JDK10("10"),
 
     /** 1.11 local-variable syntax for lambda parameters */
     JDK11("11"),
 
-    /** 12, no language features; switch expression were in preview */
+    /** 12 covers the to be determined language features that will be added in JDK 12. */
     JDK12("12"),
 
-    /**
-     * 13, no language features; text blocks and revised switch
-     * expressions in preview
-     */
-    JDK13("13"),
-
-    /**
-     * 14 covers the to be determined language features that will be
-     * added in JDK 14.
-     */
-    JDK14("14");
+    /** 13 covers the to be determined language features that will be added in JDK 13. */
+    JDK13("13");
 
     private static final Context.Key<Source> sourceKey = new Context.Key<>();
 
     public static Source instance(Context context) {
         Source instance = context.get(sourceKey);

@@ -146,11 +137,10 @@
     public boolean isSupported() {
         return this.compareTo(MIN) >= 0;
     }
 
     public Target requiredTarget() {
-        if (this.compareTo(JDK14) >= 0) return Target.JDK1_14;
         if (this.compareTo(JDK13) >= 0) return Target.JDK1_13;
         if (this.compareTo(JDK12) >= 0) return Target.JDK1_12;
         if (this.compareTo(JDK11) >= 0) return Target.JDK1_11;
         if (this.compareTo(JDK10) >= 0) return Target.JDK1_10;
         if (this.compareTo(JDK9) >= 0) return Target.JDK1_9;

@@ -194,14 +184,13 @@
         UNDERSCORE_IDENTIFIER(MIN, JDK8),
         PRIVATE_INTERFACE_METHODS(JDK9, Fragments.FeaturePrivateIntfMethods, DiagKind.PLURAL),
         LOCAL_VARIABLE_TYPE_INFERENCE(JDK10),
         VAR_SYNTAX_IMPLICIT_LAMBDAS(JDK11, Fragments.FeatureVarSyntaxInImplicitLambda, DiagKind.PLURAL),
         IMPORT_ON_DEMAND_OBSERVABLE_PACKAGES(JDK1_2, JDK8),
-        SWITCH_MULTIPLE_CASE_LABELS(JDK14, Fragments.FeatureMultipleCaseLabels, DiagKind.PLURAL),
-        SWITCH_RULE(JDK14, Fragments.FeatureSwitchRules, DiagKind.PLURAL),
-        SWITCH_EXPRESSION(JDK14, Fragments.FeatureSwitchExpressions, DiagKind.PLURAL),
-        TEXT_BLOCKS(JDK14, Fragments.FeatureTextBlocks, DiagKind.PLURAL);
+        SWITCH_MULTIPLE_CASE_LABELS(JDK13, Fragments.FeatureMultipleCaseLabels, DiagKind.PLURAL),
+        SWITCH_RULE(JDK13, Fragments.FeatureSwitchRules, DiagKind.PLURAL),
+        SWITCH_EXPRESSION(JDK13, Fragments.FeatureSwitchExpressions, DiagKind.PLURAL);
 
         enum DiagKind {
             NORMAL,
             PLURAL;
         }

@@ -284,12 +273,10 @@
             return RELEASE_11;
         case JDK12:
             return RELEASE_12;
         case JDK13:
             return RELEASE_13;
-        case JDK14:
-            return RELEASE_14;
         default:
             return null;
         }
     }
 }
< prev index next >