src/share/classes/com/sun/tools/javac/jvm/Target.java

Print this page

        

*** 46,66 **** JDK1_3("1.3", 47, 0), /** J2SE1.4 = Merlin. */ JDK1_4("1.4", 48, 0), ! /** Tiger. */ JDK1_5("1.5", 49, 0), /** JDK 6. */ JDK1_6("1.6", 50, 0), /** JDK 7. */ JDK1_7("1.7", 51, 0), /** JDK 8. */ ! JDK1_8("1.8", 52, 0); private static final Context.Key<Target> targetKey = new Context.Key<Target>(); public static Target instance(Context context) { --- 46,69 ---- JDK1_3("1.3", 47, 0), /** J2SE1.4 = Merlin. */ JDK1_4("1.4", 48, 0), ! /** JDK 5, codename Tiger. */ JDK1_5("1.5", 49, 0), /** JDK 6. */ JDK1_6("1.6", 50, 0), /** JDK 7. */ JDK1_7("1.7", 51, 0), /** JDK 8. */ ! JDK1_8("1.8", 52, 0), ! ! /** JDK 9, initially an alias for 8. */ ! JDK1_9("1.9", 52, 0); private static final Context.Key<Target> targetKey = new Context.Key<Target>(); public static Target instance(Context context) {
*** 79,97 **** public static Target MIN() { return MIN; } private static final Target MAX = values()[values().length - 1]; public static Target MAX() { return MAX; } ! private static final Map<String,Target> tab = new HashMap<String,Target>(); static { for (Target t : values()) { tab.put(t.name, t); } tab.put("5", JDK1_5); tab.put("6", JDK1_6); tab.put("7", JDK1_7); tab.put("8", JDK1_8); } public final String name; public final int majorVersion; public final int minorVersion; --- 82,101 ---- public static Target MIN() { return MIN; } private static final Target MAX = values()[values().length - 1]; public static Target MAX() { return MAX; } ! private static final Map<String,Target> tab = new HashMap<>(); static { for (Target t : values()) { tab.put(t.name, t); } tab.put("5", JDK1_5); tab.put("6", JDK1_6); tab.put("7", JDK1_7); tab.put("8", JDK1_8); + tab.put("9", JDK1_9); } public final String name; public final int majorVersion; public final int minorVersion;
*** 99,109 **** this.name = name; this.majorVersion = majorVersion; this.minorVersion = minorVersion; } ! public static final Target DEFAULT = JDK1_8; public static Target lookup(String name) { return tab.get(name); } --- 103,113 ---- this.name = name; this.majorVersion = majorVersion; this.minorVersion = minorVersion; } ! public static final Target DEFAULT = JDK1_9; public static Target lookup(String name) { return tab.get(name); }