< prev index next >

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

Print this page

        

*** 77,87 **** /** 1.9 modularity. */ JDK9("9"), /** 1.10 covers the to be determined language features that will be added in JDK 10. */ ! JDK10("10"); private static final Context.Key<Source> sourceKey = new Context.Key<>(); public static Source instance(Context context) { Source instance = context.get(sourceKey); --- 77,90 ---- /** 1.9 modularity. */ JDK9("9"), /** 1.10 covers the to be determined language features that will be added in JDK 10. */ ! 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<>(); public static Source instance(Context context) { Source instance = context.get(sourceKey);
*** 106,115 **** --- 109,119 ---- tab.put("1.6", JDK6); // Make 6 an alias for 1.6 tab.put("1.7", JDK7); // Make 7 an alias for 1.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) { this.name = name; }
*** 123,132 **** --- 127,137 ---- public static Source lookup(String name) { return tab.get(name); } 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; if (this.compareTo(JDK7) >= 0) return Target.JDK1_7; if (this.compareTo(JDK6) >= 0) return Target.JDK1_6;
*** 245,254 **** --- 250,261 ---- return RELEASE_8; case JDK9: return RELEASE_9; case JDK10: return RELEASE_10; + case JDK11: + return RELEASE_11; default: return null; } } }
< prev index next >