--- old/langtools/src/jdk.compiler/share/classes/com/sun/tools/javac/code/Source.java 2017-09-07 03:39:35.618308256 -0400 +++ new/langtools/src/jdk.compiler/share/classes/com/sun/tools/javac/code/Source.java 2017-09-07 03:39:33.810205110 -0400 @@ -74,7 +74,10 @@ JDK1_9("1.9"), /** 1.10 covers the to be determined language features that will be added in JDK 10. */ - JDK1_10("1.10"); + JDK1_10("1.10"), + + JDK_11("11"); + private static final Context.Key sourceKey = new Context.Key<>(); @@ -103,6 +106,7 @@ tab.put("8", JDK1_8); // Make 8 an alias for 1.8 tab.put("9", JDK1_9); // Make 9 an alias for 1.9 tab.put("10", JDK1_10); // Make 10 an alias for 1.10 + tab.put("11", JDK_11); } private Source(String name) { @@ -113,13 +117,14 @@ private static final Source MAX = values()[values().length - 1]; - public static final Source DEFAULT = MAX; + public static final Source DEFAULT = JDK1_10; // MAX; - FIXME later public static Source lookup(String name) { return tab.get(name); } public Target requiredTarget() { + if (this.compareTo(JDK_11) >= 0) return Target.JDK_11; if (this.compareTo(JDK1_10) >= 0) return Target.JDK1_10; if (this.compareTo(JDK1_9) >= 0) return Target.JDK1_9; if (this.compareTo(JDK1_8) >= 0) return Target.JDK1_8; @@ -247,6 +252,8 @@ return RELEASE_9; case JDK1_10: return RELEASE_10; + case JDK_11: + return RELEASE_11; default: return null; }