src/jdk.compiler/share/classes/com/sun/tools/javac/code/Source.java
changeset 48780 eb5572d58bb1
parent 48776 107413b070b9
parent 48343 d4329843abf4
child 49580 62b908c9f0e6
--- a/src/jdk.compiler/share/classes/com/sun/tools/javac/code/Source.java	Thu Feb 08 20:19:02 2018 +0000
+++ b/src/jdk.compiler/share/classes/com/sun/tools/javac/code/Source.java	Fri Feb 09 02:23:34 2018 +0000
@@ -78,8 +78,11 @@
     /** 1.9 modularity. */
     JDK9("9"),
 
-    /** 1.10 covers the to be determined language features that will be added in JDK 10. */
-    JDK10("10");
+    /** 1.10 local-variable type inference (var). */
+    JDK10("10"),
+
+    /** 1.11 covers the to be determined language features that will be added in JDK 11. */
+    JDK11("11");
 
     private static final Context.Key<Source> sourceKey = new Context.Key<>();
 
@@ -108,6 +111,7 @@
         tab.put("1.8", JDK8); // Make 8 an alias for 1.8
         tab.put("1.9", JDK9); // Make 9 an alias for 1.9
         tab.put("1.10", JDK10); // Make 10 an alias for 1.10
+        // Decline to make 1.11 an alias for 11.
     }
 
     private Source(String name) {
@@ -125,6 +129,7 @@
     }
 
     public Target requiredTarget() {
+        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;
         if (this.compareTo(JDK8) >= 0) return Target.JDK1_8;
@@ -247,6 +252,8 @@
             return RELEASE_9;
         case JDK10:
             return RELEASE_10;
+        case JDK11:
+            return RELEASE_11;
         default:
             return null;
         }