--- old/make/autoconf/version-numbers 2018-06-27 14:20:29.874003999 -0700 +++ new/make/autoconf/version-numbers 2018-06-27 14:20:29.742003999 -0700 @@ -25,14 +25,14 @@ # Default version numbers to use unless overridden by configure -DEFAULT_VERSION_FEATURE=11 +DEFAULT_VERSION_FEATURE=12 DEFAULT_VERSION_INTERIM=0 DEFAULT_VERSION_UPDATE=0 DEFAULT_VERSION_PATCH=0 -DEFAULT_VERSION_DATE=2018-09-25 -DEFAULT_VERSION_CLASSFILE_MAJOR=55 # "`$EXPR $DEFAULT_VERSION_FEATURE + 44`" +DEFAULT_VERSION_DATE=2019-03-19 +DEFAULT_VERSION_CLASSFILE_MAJOR=56 # "`$EXPR $DEFAULT_VERSION_FEATURE + 44`" DEFAULT_VERSION_CLASSFILE_MINOR=0 -DEFAULT_ACCEPTABLE_BOOT_VERSIONS="10 11" +DEFAULT_ACCEPTABLE_BOOT_VERSIONS="10 11 12" LAUNCHER_NAME=openjdk PRODUCT_NAME=OpenJDK --- old/make/common/SetupJavaCompilers.gmk 2018-06-27 14:20:30.314003999 -0700 +++ new/make/common/SetupJavaCompilers.gmk 2018-06-27 14:20:30.186003999 -0700 @@ -1,5 +1,5 @@ # -# Copyright (c) 2011, 2017, Oracle and/or its affiliates. All rights reserved. +# Copyright (c) 2011, 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 @@ -72,7 +72,7 @@ $(eval $(call SetupJavaCompiler,GENERATE_JDKBYTECODE, \ JVM := $(JAVA_JAVAC), \ JAVAC := $(NEW_JAVAC), \ - FLAGS := -source 11 -target 11 --doclint-format html5 \ + FLAGS := -source 12 -target 12 --doclint-format html5 \ -encoding ascii -XDignore.symbol.file=true $(JAVAC_WARNINGS), \ SERVER_DIR := $(SJAVAC_SERVER_DIR), \ SERVER_JVM := $(SJAVAC_SERVER_JAVA))) @@ -82,7 +82,7 @@ $(eval $(call SetupJavaCompiler,GENERATE_JDKBYTECODE_NOWARNINGS, \ JVM := $(JAVA_JAVAC), \ JAVAC := $(NEW_JAVAC), \ - FLAGS := -source 11 -target 11 \ + FLAGS := -source 12 -target 12 \ -encoding ascii -XDignore.symbol.file=true $(DISABLE_WARNINGS), \ SERVER_DIR := $(SJAVAC_SERVER_DIR), \ SERVER_JVM := $(SJAVAC_SERVER_JAVA))) --- old/src/hotspot/share/classfile/classFileParser.cpp 2018-06-27 14:20:30.834003999 -0700 +++ new/src/hotspot/share/classfile/classFileParser.cpp 2018-06-27 14:20:30.690003999 -0700 @@ -117,6 +117,8 @@ #define JAVA_11_VERSION 55 +#define JAVA_12_VERSION 56 + void ClassFileParser::set_class_bad_constant_seen(short bad_constant) { assert((bad_constant == 19 || bad_constant == 20) && _major_version >= JAVA_9_VERSION, "Unexpected bad constant pool entry"); --- old/src/java.base/share/classes/com/sun/java/util/jar/pack/Constants.java 2018-06-27 14:20:31.314003999 -0700 +++ new/src/java.base/share/classes/com/sun/java/util/jar/pack/Constants.java 2018-06-27 14:20:31.182003999 -0700 @@ -1,5 +1,5 @@ /* - * Copyright (c) 2001, 2017, Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 2001, 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 @@ -49,6 +49,7 @@ 1.9 to 1.9.X 53,0 1.10 to 1.10.X 54,0 1.11 to 1.11.X 55,0 + 1.12 to 1.12.X 56,0 */ public static final Package.Version JAVA_MIN_CLASS_VERSION = @@ -75,6 +76,9 @@ public static final Package.Version JAVA11_MAX_CLASS_VERSION = Package.Version.of(55, 00); + public static final Package.Version JAVA12_MAX_CLASS_VERSION = + Package.Version.of(56, 00); + public static final int JAVA_PACKAGE_MAGIC = 0xCAFED00D; public static final Package.Version JAVA5_PACKAGE_VERSION = @@ -91,7 +95,7 @@ // upper limit, should point to the latest class version public static final Package.Version JAVA_MAX_CLASS_VERSION = - JAVA11_MAX_CLASS_VERSION; + JAVA12_MAX_CLASS_VERSION; // upper limit should point to the latest package version, for version info!. public static final Package.Version MAX_PACKAGE_VERSION = --- old/src/java.base/share/classes/jdk/internal/module/ModuleInfo.java 2018-06-27 14:20:31.766003999 -0700 +++ new/src/java.base/share/classes/jdk/internal/module/ModuleInfo.java 2018-06-27 14:20:31.634003999 -0700 @@ -1,5 +1,5 @@ /* - * Copyright (c) 2014, 2017, Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 2014, 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 @@ -64,7 +64,7 @@ public final class ModuleInfo { private final int JAVA_MIN_SUPPORTED_VERSION = 53; - private final int JAVA_MAX_SUPPORTED_VERSION = 55; + private final int JAVA_MAX_SUPPORTED_VERSION = 56; private static final JavaLangModuleAccess JLMA = SharedSecrets.getJavaLangModuleAccess(); --- old/src/java.base/share/classes/jdk/internal/org/objectweb/asm/ClassReader.java 2018-06-27 14:20:32.286003999 -0700 +++ new/src/java.base/share/classes/jdk/internal/org/objectweb/asm/ClassReader.java 2018-06-27 14:20:32.158003999 -0700 @@ -185,7 +185,7 @@ public ClassReader(final byte[] b, final int off, final int len) { this.b = b; // checks the class version - if (readShort(off + 6) > Opcodes.V11) { + if (readShort(off + 6) > Opcodes.V12) { throw new IllegalArgumentException(); } // parses the constant pool --- old/src/java.base/share/classes/jdk/internal/org/objectweb/asm/Opcodes.java 2018-06-27 14:20:32.730003999 -0700 +++ new/src/java.base/share/classes/jdk/internal/org/objectweb/asm/Opcodes.java 2018-06-27 14:20:32.598003999 -0700 @@ -91,6 +91,7 @@ int V9 = 0 << 16 | 53; int V10 = 0 << 16 | 54; int V11 = 0 << 16 | 55; + int V12 = 0 << 16 | 56; // access flags --- old/src/java.compiler/share/classes/javax/lang/model/SourceVersion.java 2018-06-27 14:20:33.090003999 -0700 +++ new/src/java.compiler/share/classes/javax/lang/model/SourceVersion.java 2018-06-27 14:20:32.962003999 -0700 @@ -171,7 +171,15 @@ * * @since 11 */ - RELEASE_11; + RELEASE_11, + + /** + * The version recognized by the Java Platform, Standard Edition + * 12. + * + * @since 12 + */ + RELEASE_12; // Note that when adding constants for newer releases, the // behavior of latest() and latestSupported() must be updated too. @@ -182,7 +190,7 @@ * @return the latest source version that can be modeled */ public static SourceVersion latest() { - return RELEASE_11; + return RELEASE_12; } private static final SourceVersion latestSupported = getLatestSupported(); @@ -192,6 +200,8 @@ String specVersion = System.getProperty("java.specification.version"); switch (specVersion) { + case "12": + return RELEASE_12; case "11": return RELEASE_11; case "10": --- old/src/java.compiler/share/classes/javax/lang/model/util/AbstractAnnotationValueVisitor9.java 2018-06-27 14:20:33.514003999 -0700 +++ new/src/java.compiler/share/classes/javax/lang/model/util/AbstractAnnotationValueVisitor9.java 2018-06-27 14:20:33.386003999 -0700 @@ -32,7 +32,7 @@ /** * A skeletal visitor for annotation values with default behavior * appropriate for source versions {@link SourceVersion#RELEASE_9 - * RELEASE_9} through {@link SourceVersion#RELEASE_11 RELEASE_11}. + * RELEASE_9} through {@link SourceVersion#RELEASE_12 RELEASE_12}. * *

WARNING: The {@code AnnotationValueVisitor} interface * implemented by this class may have methods added to it in the @@ -59,7 +59,7 @@ * @see AbstractAnnotationValueVisitor8 * @since 9 */ -@SupportedSourceVersion(RELEASE_11) +@SupportedSourceVersion(RELEASE_12) public abstract class AbstractAnnotationValueVisitor9 extends AbstractAnnotationValueVisitor8 { /** --- old/src/java.compiler/share/classes/javax/lang/model/util/AbstractElementVisitor9.java 2018-06-27 14:20:34.022003999 -0700 +++ new/src/java.compiler/share/classes/javax/lang/model/util/AbstractElementVisitor9.java 2018-06-27 14:20:33.890003999 -0700 @@ -34,7 +34,7 @@ /** * A skeletal visitor of program elements with default behavior * appropriate for source versions {@link SourceVersion#RELEASE_9 - * RELEASE_9} through {@link SourceVersion#RELEASE_11 RELEASE_11}. + * RELEASE_9} through {@link SourceVersion#RELEASE_12 RELEASE_12}. * *

WARNING: The {@code ElementVisitor} interface * implemented by this class may have methods added to it in the @@ -65,7 +65,7 @@ * @since 9 * @spec JPMS */ -@SupportedSourceVersion(RELEASE_11) +@SupportedSourceVersion(RELEASE_12) public abstract class AbstractElementVisitor9 extends AbstractElementVisitor8 { /** * Constructor for concrete subclasses to call. --- old/src/java.compiler/share/classes/javax/lang/model/util/AbstractTypeVisitor9.java 2018-06-27 14:20:34.526003999 -0700 +++ new/src/java.compiler/share/classes/javax/lang/model/util/AbstractTypeVisitor9.java 2018-06-27 14:20:34.394003999 -0700 @@ -33,7 +33,7 @@ /** * A skeletal visitor of types with default behavior appropriate for * source versions {@link SourceVersion#RELEASE_9 RELEASE_9} through - * {@link SourceVersion#RELEASE_11 RELEASE_11}. + * {@link SourceVersion#RELEASE_12 RELEASE_12}. * *

WARNING: The {@code TypeVisitor} interface implemented * by this class may have methods added to it in the future to @@ -63,7 +63,7 @@ * @see AbstractTypeVisitor8 * @since 9 */ -@SupportedSourceVersion(RELEASE_11) +@SupportedSourceVersion(RELEASE_12) public abstract class AbstractTypeVisitor9 extends AbstractTypeVisitor8 { /** * Constructor for concrete subclasses to call. --- old/src/java.compiler/share/classes/javax/lang/model/util/ElementKindVisitor9.java 2018-06-27 14:20:35.030003999 -0700 +++ new/src/java.compiler/share/classes/javax/lang/model/util/ElementKindVisitor9.java 2018-06-27 14:20:34.902003999 -0700 @@ -34,7 +34,7 @@ * A visitor of program elements based on their {@linkplain * ElementKind kind} with default behavior appropriate for source * versions {@link SourceVersion#RELEASE_9 RELEASE_9} through {@link - * SourceVersion#RELEASE_11 RELEASE_11}. + * SourceVersion#RELEASE_12 RELEASE_12}. * * For {@linkplain * Element elements} Xyz that may have more than one @@ -80,7 +80,7 @@ * @since 9 * @spec JPMS */ -@SupportedSourceVersion(RELEASE_11) +@SupportedSourceVersion(RELEASE_12) public class ElementKindVisitor9 extends ElementKindVisitor8 { /** * Constructor for concrete subclasses; uses {@code null} for the --- old/src/java.compiler/share/classes/javax/lang/model/util/ElementScanner9.java 2018-06-27 14:20:35.542003999 -0700 +++ new/src/java.compiler/share/classes/javax/lang/model/util/ElementScanner9.java 2018-06-27 14:20:35.406003999 -0700 @@ -34,7 +34,7 @@ /** * A scanning visitor of program elements with default behavior * appropriate for source versions {@link SourceVersion#RELEASE_9 - * RELEASE_9} through {@link SourceVersion#RELEASE_11 RELEASE_11}. + * RELEASE_9} through {@link SourceVersion#RELEASE_12 RELEASE_12}. * * The visitXyz methods in this * class scan their component elements by calling {@code scan} on @@ -92,7 +92,7 @@ * @since 9 * @spec JPMS */ -@SupportedSourceVersion(RELEASE_11) +@SupportedSourceVersion(RELEASE_12) public class ElementScanner9 extends ElementScanner8 { /** * Constructor for concrete subclasses; uses {@code null} for the --- old/src/java.compiler/share/classes/javax/lang/model/util/SimpleAnnotationValueVisitor9.java 2018-06-27 14:20:36.050003999 -0700 +++ new/src/java.compiler/share/classes/javax/lang/model/util/SimpleAnnotationValueVisitor9.java 2018-06-27 14:20:35.918003999 -0700 @@ -32,7 +32,7 @@ /** * A simple visitor for annotation values with default behavior * appropriate for source versions {@link SourceVersion#RELEASE_9 - * RELEASE_9} through {@link SourceVersion#RELEASE_11 RELEASE_11}. + * RELEASE_9} through {@link SourceVersion#RELEASE_12 RELEASE_12}. * * Visit methods call {@link #defaultAction * defaultAction} passing their arguments to {@code defaultAction}'s @@ -68,7 +68,7 @@ * @see SimpleAnnotationValueVisitor8 * @since 9 */ -@SupportedSourceVersion(RELEASE_11) +@SupportedSourceVersion(RELEASE_12) public class SimpleAnnotationValueVisitor9 extends SimpleAnnotationValueVisitor8 { /** * Constructor for concrete subclasses; uses {@code null} for the --- old/src/java.compiler/share/classes/javax/lang/model/util/SimpleElementVisitor9.java 2018-06-27 14:20:36.570003999 -0700 +++ new/src/java.compiler/share/classes/javax/lang/model/util/SimpleElementVisitor9.java 2018-06-27 14:20:36.446003999 -0700 @@ -33,7 +33,7 @@ /** * A simple visitor of program elements with default behavior * appropriate for source versions {@link SourceVersion#RELEASE_9 - * RELEASE_9} through {@link SourceVersion#RELEASE_11 RELEASE_11}. + * RELEASE_9} through {@link SourceVersion#RELEASE_12 RELEASE_12}. * * Visit methods corresponding to {@code RELEASE_9} and earlier * language constructs call {@link #defaultAction defaultAction}, @@ -73,7 +73,7 @@ * @since 9 * @spec JPMS */ -@SupportedSourceVersion(RELEASE_11) +@SupportedSourceVersion(RELEASE_12) public class SimpleElementVisitor9 extends SimpleElementVisitor8 { /** * Constructor for concrete subclasses; uses {@code null} for the --- old/src/java.compiler/share/classes/javax/lang/model/util/SimpleTypeVisitor9.java 2018-06-27 14:20:37.082003999 -0700 +++ new/src/java.compiler/share/classes/javax/lang/model/util/SimpleTypeVisitor9.java 2018-06-27 14:20:36.950003999 -0700 @@ -33,7 +33,7 @@ /** * A simple visitor of types with default behavior appropriate for * source versions {@link SourceVersion#RELEASE_9 RELEASE_9} through - * {@link SourceVersion#RELEASE_11 RELEASE_11}. + * {@link SourceVersion#RELEASE_12 RELEASE_12}. * * Visit methods corresponding to {@code RELEASE_9} and earlier * language constructs call {@link #defaultAction defaultAction}, @@ -73,7 +73,7 @@ * @see SimpleTypeVisitor8 * @since 9 */ -@SupportedSourceVersion(RELEASE_11) +@SupportedSourceVersion(RELEASE_12) public class SimpleTypeVisitor9 extends SimpleTypeVisitor8 { /** * Constructor for concrete subclasses; uses {@code null} for the --- old/src/java.compiler/share/classes/javax/lang/model/util/TypeKindVisitor9.java 2018-06-27 14:20:37.590003999 -0700 +++ new/src/java.compiler/share/classes/javax/lang/model/util/TypeKindVisitor9.java 2018-06-27 14:20:37.466003999 -0700 @@ -34,7 +34,7 @@ * A visitor of types based on their {@linkplain TypeKind kind} with * default behavior appropriate for source versions {@link * SourceVersion#RELEASE_9 RELEASE_9} through {@link - * SourceVersion#RELEASE_11 RELEASE_11}. + * SourceVersion#RELEASE_12 RELEASE_12}. * * For {@linkplain * TypeMirror types} Xyz that may have more than one @@ -77,7 +77,7 @@ * @see TypeKindVisitor8 * @since 9 */ -@SupportedSourceVersion(RELEASE_11) +@SupportedSourceVersion(RELEASE_12) public class TypeKindVisitor9 extends TypeKindVisitor8 { /** * Constructor for concrete subclasses to call; uses {@code null} --- old/src/jdk.compiler/share/classes/com/sun/tools/javac/code/Source.java 2018-06-27 14:20:38.018003999 -0700 +++ new/src/jdk.compiler/share/classes/com/sun/tools/javac/code/Source.java 2018-06-27 14:20:37.886003999 -0700 @@ -81,8 +81,11 @@ /** 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"); + /** 1.11 no explicit language changes. */ + JDK11("11"), + + /** 12 covers the to be determined language features that will be added in JDK 12. */ + JDK12("12"); private static final Context.Key sourceKey = new Context.Key<>(); @@ -129,6 +132,7 @@ } public Target requiredTarget() { + 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; @@ -265,6 +269,8 @@ return RELEASE_10; case JDK11: return RELEASE_11; + case JDK12: + return RELEASE_12; default: return null; } --- old/src/jdk.compiler/share/classes/com/sun/tools/javac/jvm/ClassFile.java 2018-06-27 14:20:38.362003999 -0700 +++ new/src/jdk.compiler/share/classes/com/sun/tools/javac/jvm/ClassFile.java 2018-06-27 14:20:38.234003999 -0700 @@ -1,5 +1,5 @@ /* - * Copyright (c) 1999, 2017, Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 1999, 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 @@ -115,7 +115,8 @@ V52(52, 0), // JDK 1.8: lambda, type annos, param names V53(53, 0), // JDK 1.9: modules, indy string concat V54(54, 0), // JDK 10 - V55(55, 0); // JDK 11: constant dynamic + V55(55, 0), // JDK 11: constant dynamic, nest mates + V56(56, 0); // JDK 12 Version(int major, int minor) { this.major = major; this.minor = minor; --- old/src/jdk.compiler/share/classes/com/sun/tools/javac/jvm/Profile.java 2018-06-27 14:20:38.718003999 -0700 +++ new/src/jdk.compiler/share/classes/com/sun/tools/javac/jvm/Profile.java 2018-06-27 14:20:38.586003999 -0700 @@ -1,5 +1,5 @@ /* - * Copyright (c) 2002, 2017, 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 @@ -40,9 +40,9 @@ * deletion without notice. */ public enum Profile { - COMPACT1("compact1", 1, Target.JDK1_8, Target.JDK1_9, Target.JDK1_10, Target.JDK1_11), - COMPACT2("compact2", 2, Target.JDK1_8, Target.JDK1_9, Target.JDK1_10, Target.JDK1_11), - COMPACT3("compact3", 3, Target.JDK1_8, Target.JDK1_9, Target.JDK1_10, Target.JDK1_11), + COMPACT1("compact1", 1, Target.JDK1_8, Target.JDK1_9, Target.JDK1_10, Target.JDK1_11, Target.JDK1_12), + COMPACT2("compact2", 2, Target.JDK1_8, Target.JDK1_9, Target.JDK1_10, Target.JDK1_11, Target.JDK1_12), + COMPACT3("compact3", 3, Target.JDK1_8, Target.JDK1_9, Target.JDK1_10, Target.JDK1_11, Target.JDK1_12), DEFAULT { @Override --- old/src/jdk.compiler/share/classes/com/sun/tools/javac/jvm/Target.java 2018-06-27 14:20:39.062003999 -0700 +++ new/src/jdk.compiler/share/classes/com/sun/tools/javac/jvm/Target.java 2018-06-27 14:20:38.934003999 -0700 @@ -67,7 +67,10 @@ JDK1_10("1.10", 54, 0), /** JDK 11. */ - JDK1_11("11", 55, 0); + JDK1_11("11", 55, 0), + + /** JDK 12. */ + JDK1_12("12", 56, 0); private static final Context.Key targetKey = new Context.Key<>(); @@ -99,6 +102,7 @@ tab.put("9", JDK1_9); tab.put("10", JDK1_10); tab.put("11", JDK1_11); + tab.put("12", JDK1_12); } public final String name; --- old/src/jdk.compiler/share/classes/com/sun/tools/javac/processing/PrintingProcessor.java 2018-06-27 14:20:39.486003999 -0700 +++ new/src/jdk.compiler/share/classes/com/sun/tools/javac/processing/PrintingProcessor.java 2018-06-27 14:20:39.358003999 -0700 @@ -1,5 +1,5 @@ /* - * Copyright (c) 2005, 2017, Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 2005, 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 @@ -55,7 +55,7 @@ * deletion without notice. */ @SupportedAnnotationTypes("*") -@SupportedSourceVersion(SourceVersion.RELEASE_11) +@SupportedSourceVersion(SourceVersion.RELEASE_12) public class PrintingProcessor extends AbstractProcessor { PrintWriter writer; --- old/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.replacements/src/org/graalvm/compiler/replacements/classfile/Classfile.java 2018-06-27 14:20:40.010003999 -0700 +++ new/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.replacements/src/org/graalvm/compiler/replacements/classfile/Classfile.java 2018-06-27 14:20:39.878003999 -0700 @@ -47,7 +47,7 @@ private final List codeAttributes; private static final int MAJOR_VERSION_JAVA_MIN = 51; // JDK7 - private static final int MAJOR_VERSION_JAVA_MAX = 55; // JDK11 + private static final int MAJOR_VERSION_JAVA_MAX = 56; // JDK12 private static final int MAGIC = 0xCAFEBABE; /** --- old/src/jdk.jdeps/share/classes/com/sun/tools/jdeprscan/Main.java 2018-06-27 14:20:40.442003999 -0700 +++ new/src/jdk.jdeps/share/classes/com/sun/tools/jdeprscan/Main.java 2018-06-27 14:20:40.306003999 -0700 @@ -106,7 +106,7 @@ // Keep these updated manually until there's a compiler API // that allows querying of supported releases. final Set releasesWithoutForRemoval = Set.of("6", "7", "8"); - final Set releasesWithForRemoval = Set.of("9", "10", "11"); + final Set releasesWithForRemoval = Set.of("9", "10", "11", "12"); final Set validReleases; { @@ -496,7 +496,7 @@ String dir = null; String jar = null; String jdkHome = null; - String release = "11"; + String release = Integer.toString(Runtime.version().feature()); List loadClasses = new ArrayList<>(); String csvFile = null; --- old/src/jdk.rmic/share/classes/sun/tools/java/RuntimeConstants.java 2018-06-27 14:20:40.866003999 -0700 +++ new/src/jdk.rmic/share/classes/sun/tools/java/RuntimeConstants.java 2018-06-27 14:20:40.738003999 -0700 @@ -1,5 +1,5 @@ /* - * Copyright (c) 1998, 2017, Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 1998, 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 @@ -67,7 +67,7 @@ /* Class File Constants */ int JAVA_MAGIC = 0xcafebabe; int JAVA_MIN_SUPPORTED_VERSION = 45; - int JAVA_MAX_SUPPORTED_VERSION = 55; + int JAVA_MAX_SUPPORTED_VERSION = 56; int JAVA_MAX_SUPPORTED_MINOR_VERSION = 0; /* Generate class file version for 1.1 by default */ --- old/test/hotspot/jtreg/runtime/CommandLine/VMDeprecatedOptions.java 2018-06-27 14:20:41.298003999 -0700 +++ new/test/hotspot/jtreg/runtime/CommandLine/VMDeprecatedOptions.java 2018-06-27 14:20:41.166003999 -0700 @@ -46,13 +46,6 @@ {"InitialRAMFraction", "64"}, {"AssumeMP", "false"}, {"UseMembar", "true"}, - {"CompilerThreadHintNoPreempt", "true"}, - {"VMThreadHintNoPreempt", "false"}, - {"PrintSafepointStatistics", "false"}, - {"PrintSafepointStatisticsCount", "3"}, - {"PrintSafepointStatisticsTimeout", "3"}, - {"AggressiveOpts", "true"}, - {"AllowNonVirtualCalls", "true"}, // deprecated alias flags (see also aliased_jvm_flags): {"DefaultMaxRAMFraction", "4"}, --- old/test/jdk/com/sun/management/HotSpotDiagnosticMXBean/CheckOrigin.java 2018-06-27 14:20:41.646003999 -0700 +++ new/test/jdk/com/sun/management/HotSpotDiagnosticMXBean/CheckOrigin.java 2018-06-27 14:20:41.514003999 -0700 @@ -58,7 +58,7 @@ File flagsFile = File.createTempFile("CheckOriginFlags", null); try (PrintWriter pw = new PrintWriter(new FileWriter(flagsFile))) { - pw.println("+PrintSafepointStatistics"); + pw.println("+PrintVMQWaitTime"); } ProcessBuilder pb = ProcessTools. @@ -108,7 +108,7 @@ checkOrigin("IgnoreUnrecognizedVMOptions", Origin.ENVIRON_VAR); checkOrigin("PrintVMOptions", Origin.ENVIRON_VAR); // Set in -XX:Flags file - checkOrigin("PrintSafepointStatistics", Origin.CONFIG_FILE); + checkOrigin("PrintVMQWaitTime", Origin.CONFIG_FILE); // Set through j.l.m checkOrigin("HeapDumpOnOutOfMemoryError", Origin.MANAGEMENT); // Should be set by the VM, when we set UseConcMarkSweepGC --- old/test/jdk/java/lang/module/ClassFileVersionsTest.java 2018-06-27 14:20:41.998003999 -0700 +++ new/test/jdk/java/lang/module/ClassFileVersionsTest.java 2018-06-27 14:20:41.866003999 -0700 @@ -54,8 +54,8 @@ { 53, 0, Set.of(STATIC, TRANSITIVE) }, { 54, 0, Set.of() }, // JDK 10 - - { 55, 0, Set.of()}, // JDK 11 + { 55, 0, Set.of() }, // JDK 11 + { 56, 0, Set.of() }, // JDK 12 }; } @@ -75,7 +75,11 @@ { 55, 0, Set.of(TRANSITIVE) }, { 55, 0, Set.of(STATIC, TRANSITIVE) }, - { 56, 0, Set.of()}, // JDK 12 + { 56, 0, Set.of(STATIC) }, // JDK 12 + { 56, 0, Set.of(TRANSITIVE) }, + { 56, 0, Set.of(STATIC, TRANSITIVE) }, + + { 57, 0, Set.of()}, // JDK 13 }; } --- old/test/jdk/java/util/jar/JarFile/mrjar/TestVersionedStream.java 2018-06-27 14:20:42.350003999 -0700 +++ new/test/jdk/java/util/jar/JarFile/mrjar/TestVersionedStream.java 2018-06-27 14:20:42.218003999 -0700 @@ -1,5 +1,5 @@ /* - * Copyright (c) 2016, 2017, Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 2016, 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 @@ -64,6 +64,8 @@ private final Path userdir; private final Set unversionedEntryNames; + private static final int LATEST_VERSION = Runtime.version().feature(); + public TestVersionedStream() throws IOException { userdir = Paths.get(System.getProperty("user.dir", ".")); @@ -79,12 +81,14 @@ "v9/p/Foo.class", "v10/p/Foo.class", "v10/q/Bar.class", - "v11/p/Bar.class", - "v11/p/Foo.class" + "v" + LATEST_VERSION + "/p/Bar.class", + "v" + LATEST_VERSION + "/p/Foo.class" ); - jar("cf mmr.jar -C base . --release 9 -C v9 . " + - "--release 10 -C v10 . --release 11 -C v11 ."); + jar("cf mmr.jar -C base . " + + "--release 9 -C v9 . " + + "--release 10 -C v10 . " + + "--release " + LATEST_VERSION + " -C v" + LATEST_VERSION + " ."); System.out.println("Contents of mmr.jar\n======="); @@ -124,7 +128,7 @@ {Runtime.Version.parse("8")}, {Runtime.Version.parse("9")}, {Runtime.Version.parse("10")}, - {Runtime.Version.parse("11")}, + {Runtime.Version.parse(Integer.toString(LATEST_VERSION))}, {JarFile.baseVersion()}, {JarFile.runtimeVersion()} }; @@ -173,7 +177,8 @@ expected.put("p/Bar.class", new String[] { "base/p/Bar.class", "p/Bar.class" }); expected.put("p/Main.class", new String[] { "base/p/Main.class", "p/Main.class" }); - switch (version.major()) { + int majorVersion = version.major(); + switch (majorVersion) { case 8: expected.put("p/Foo.class", new String[] { "base/p/Foo.class", "p/Foo.class" }); @@ -189,16 +194,19 @@ expected.put("q/Bar.class", new String[] { "v10/q/Bar.class", "META-INF/versions/10/q/Bar.class" }); break; - case 11: - expected.put("p/Bar.class", new String[] - { "v11/p/Bar.class", "META-INF/versions/11/p/Bar.class"}); - expected.put("p/Foo.class", new String[] - { "v11/p/Foo.class", "META-INF/versions/11/p/Foo.class"}); - expected.put("q/Bar.class", new String[] - { "q/Bar.class", "META-INF/versions/10/q/Bar.class"}); - break; default: - Assert.fail("Test out of date, please add more cases"); + if (majorVersion == LATEST_VERSION) { + expected.put("p/Bar.class", + new String[] { "v" + LATEST_VERSION + "/p/Bar.class", + "META-INF/versions/" + LATEST_VERSION + "/p/Bar.class"}); + expected.put("p/Foo.class", + new String[]{ "v" + LATEST_VERSION + "/p/Foo.class", + "META-INF/versions/" + LATEST_VERSION + "/p/Foo.class"}); + expected.put("q/Bar.class", + new String[] { "q/Bar.class", "META-INF/versions/10/q/Bar.class"}); + } else { + Assert.fail("Test out of date, please add more cases"); + } } expected.entrySet().stream().forEach(e -> { --- old/test/jdk/jdk/nio/zipfs/MultiReleaseJarTest.java 2018-06-27 14:20:42.718003999 -0700 +++ new/test/jdk/jdk/nio/zipfs/MultiReleaseJarTest.java 2018-06-27 14:20:42.578003999 -0700 @@ -116,7 +116,8 @@ return new Object[][] { {Version.parse("8"), 8}, {Version.parse("9"), 9}, - {Version.parse("11"), MAJOR_VERSION}, + {Version.parse(Integer.toString(MAJOR_VERSION)), MAJOR_VERSION}, + {Version.parse(Integer.toString(MAJOR_VERSION) + 1), MAJOR_VERSION}, {Version.parse("100"), MAJOR_VERSION} }; } --- old/test/langtools/ProblemList.txt 2018-06-27 14:20:43.066003999 -0700 +++ new/test/langtools/ProblemList.txt 2018-06-27 14:20:42.938003999 -0700 @@ -57,6 +57,9 @@ tools/javac/options/release/ReleaseOptionUnsupported.java 8193784 generic-all temporary until support for --release 11 is worked out tools/javac/importscope/T8193717.java 8203925 generic-all the test requires too much memory + +tools/javac/options/smokeTests/OptionSmokeTest.java 8205493 generic-all hard-coded release values in strings + ########################################################################### # # javap --- old/test/langtools/tools/javac/6330997/T6330997.java 2018-06-27 14:20:43.422003999 -0700 +++ new/test/langtools/tools/javac/6330997/T6330997.java 2018-06-27 14:20:43.290003999 -0700 @@ -23,7 +23,7 @@ /** * @test - * @bug 6330997 7025789 8000961 8188870 + * @bug 6330997 7025789 8000961 8188870 8193290 * @summary javac should accept class files with major version of the next release * @author Wei Tao * @modules jdk.compiler/com.sun.tools.javac.api @@ -32,8 +32,8 @@ * jdk.compiler/com.sun.tools.javac.main * jdk.compiler/com.sun.tools.javac.util * @clean T1 T2 - * @compile -source 10 -target 11 T1.java - * @compile -source 10 -target 11 T2.java + * @compile -source 11 -target 12 T1.java + * @compile -source 11 -target 12 T2.java * @run main/othervm T6330997 */ --- old/test/langtools/tools/javac/api/T6265137.java 2018-06-27 14:20:43.790003999 -0700 +++ new/test/langtools/tools/javac/api/T6265137.java 2018-06-27 14:20:43.654003999 -0700 @@ -1,5 +1,5 @@ /* - * Copyright (c) 2005, 2017, Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 2005, 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 @@ -52,7 +52,7 @@ String srcdir = System.getProperty("test.src"); Iterable files = fm.getJavaFileObjectsFromFiles(Arrays.asList(new File(srcdir, "T6265137a.java"))); - javac.getTask(null, fm, dl, Arrays.asList("-target","11"), null, files).call(); + javac.getTask(null, fm, dl, Arrays.asList("-target", "12"), null, files).call(); } } } --- old/test/langtools/tools/javac/api/T6395981.java 2018-06-27 14:20:44.166003999 -0700 +++ new/test/langtools/tools/javac/api/T6395981.java 2018-06-27 14:20:44.018003999 -0700 @@ -1,5 +1,5 @@ /* - * Copyright (c) 2006, 2017, Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 2006, 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 @@ -23,7 +23,7 @@ /* * @test - * @bug 6395981 6458819 7025784 8028543 8028544 8193291 + * @bug 6395981 6458819 7025784 8028543 8028544 8193291 8193292 8193292 * @summary JavaCompilerTool and Tool must specify version of JLS and JVMS * @author Peter von der Ah\u00e9 * @modules java.compiler @@ -31,7 +31,7 @@ * @run main/fail T6395981 * @run main/fail T6395981 RELEASE_3 RELEASE_5 RELEASE_6 * @run main/fail T6395981 RELEASE_0 RELEASE_1 RELEASE_2 RELEASE_3 RELEASE_4 RELEASE_5 RELEASE_6 - * @run main T6395981 RELEASE_3 RELEASE_4 RELEASE_5 RELEASE_6 RELEASE_7 RELEASE_8 RELEASE_9 RELEASE_10 RELEASE_11 + * @run main T6395981 RELEASE_3 RELEASE_4 RELEASE_5 RELEASE_6 RELEASE_7 RELEASE_8 RELEASE_9 RELEASE_10 RELEASE_11 RELEASE_12 */ import java.util.EnumSet; --- old/test/langtools/tools/javac/classfiles/ClassVersionChecker.java 2018-06-27 14:20:44.526003999 -0700 +++ new/test/langtools/tools/javac/classfiles/ClassVersionChecker.java 2018-06-27 14:20:44.386003999 -0700 @@ -1,5 +1,5 @@ /* - * Copyright (c) 2012, 2017, Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 2012, 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 @@ -23,7 +23,7 @@ /* * @test - * @bug 7157626 8001112 8188870 8173382 + * @bug 7157626 8001112 8188870 8173382 8193290 8205619 * @summary Test major version for all legal combinations for -source and -target * @author sgoel * @@ -38,7 +38,7 @@ public class ClassVersionChecker { int errors; - String[] jdk = {"", "1.6", "1.7", "1.8", "1.9", "1.10", "11"}; + String[] jdk = {"", "1.6", "1.7", "1.8", "1.9", "1.10", "11", "12"}; File javaFile = null; public static void main(String[] args) throws Throwable { @@ -58,12 +58,12 @@ * -1 => invalid combinations */ int[][] ver = - {{55, -1, -1, -1, -1, -1, -1}, - {55, 50, 51, 52, 53, 54, 55}, - {55, -1, 51, 52, 53, 54, 55}, - {55, -1, -1, 52, 53, 54, 55}, - {55, -1, -1, -1, 53, 54, 55}, - {55, -1, -1, -1, -1, 54, 55}}; + {{56, -1, -1, -1, -1, -1, -1, -1}, + {56, 50, 51, 52, 53, 54, 55, 56}, + {56, -1, 51, 52, 53, 54, 55, 56}, + {56, -1, -1, 52, 53, 54, 55, 56}, + {56, -1, -1, -1, 53, 54, 55, 56}, + {56, -1, -1, -1, -1, 54, 55, 56}}; // Loop to run all possible combinations of source/target values for (int i = 0; i< ver.length; i++) { --- old/test/langtools/tools/javac/diags/examples/PreviewFeatureUse.java 2018-06-27 14:20:44.962003999 -0700 +++ new/test/langtools/tools/javac/diags/examples/PreviewFeatureUse.java 2018-06-27 14:20:44.830003999 -0700 @@ -27,7 +27,7 @@ //key: compiler.warn.preview.feature.use.plural //key: compiler.misc.feature.diamond //key: compiler.misc.feature.lambda -//options: -Xlint:preview -XDforcePreview -source 11 --enable-preview +//options: -Xlint:preview -XDforcePreview -source 12 --enable-preview import java.util.ArrayList; --- old/test/langtools/tools/javac/diags/examples/PreviewFilename.java 2018-06-27 14:20:45.470003999 -0700 +++ new/test/langtools/tools/javac/diags/examples/PreviewFilename.java 2018-06-27 14:20:45.342003999 -0700 @@ -25,7 +25,7 @@ // key: compiler.note.preview.filename // key: compiler.note.preview.recompile -// options: -XDforcePreview -source 11 --enable-preview +// options: -XDforcePreview -source 12 --enable-preview import java.util.ArrayList; import java.util.List; --- old/test/langtools/tools/javac/diags/examples/PreviewFilenameAdditional.java 2018-06-27 14:20:46.002003999 -0700 +++ new/test/langtools/tools/javac/diags/examples/PreviewFilenameAdditional.java 2018-06-27 14:20:45.858003999 -0700 @@ -26,7 +26,7 @@ // key: compiler.note.preview.filename.additional // key: compiler.warn.preview.feature.use // key: compiler.misc.feature.diamond -// options: -Xlint:preview -Xmaxwarns 1 -XDforcePreview -source 11 --enable-preview +// options: -Xlint:preview -Xmaxwarns 1 -XDforcePreview -source 12 --enable-preview import java.util.ArrayList; --- old/test/langtools/tools/javac/diags/examples/PreviewPlural/PreviewPlural.java 2018-06-27 14:20:46.514003999 -0700 +++ new/test/langtools/tools/javac/diags/examples/PreviewPlural/PreviewPlural.java 2018-06-27 14:20:46.386003999 -0700 @@ -25,7 +25,7 @@ // key: compiler.note.preview.plural // key: compiler.note.preview.recompile -// options: -XDforcePreview -source 11 --enable-preview +// options: -XDforcePreview -source 12 --enable-preview import java.util.ArrayList; --- old/test/langtools/tools/javac/lib/JavacTestingAbstractProcessor.java 2018-06-27 14:20:47.054003999 -0700 +++ new/test/langtools/tools/javac/lib/JavacTestingAbstractProcessor.java 2018-06-27 14:20:46.914003999 -0700 @@ -1,5 +1,5 @@ /* - * Copyright (c) 2010, 2017, Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 2010, 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 @@ -110,7 +110,7 @@ * corresponding platform visitor type. */ - @SupportedSourceVersion(RELEASE_11) + @SupportedSourceVersion(RELEASE_12) public static abstract class AbstractAnnotationValueVisitor extends AbstractAnnotationValueVisitor9 { /** @@ -121,7 +121,7 @@ } } - @SupportedSourceVersion(RELEASE_11) + @SupportedSourceVersion(RELEASE_12) public static abstract class AbstractElementVisitor extends AbstractElementVisitor9 { /** * Constructor for concrete subclasses to call. @@ -131,7 +131,7 @@ } } - @SupportedSourceVersion(RELEASE_11) + @SupportedSourceVersion(RELEASE_12) public static abstract class AbstractTypeVisitor extends AbstractTypeVisitor9 { /** * Constructor for concrete subclasses to call. @@ -141,7 +141,7 @@ } } - @SupportedSourceVersion(RELEASE_11) + @SupportedSourceVersion(RELEASE_12) public static class ElementKindVisitor extends ElementKindVisitor9 { /** * Constructor for concrete subclasses; uses {@code null} for the @@ -162,7 +162,7 @@ } } - @SupportedSourceVersion(RELEASE_11) + @SupportedSourceVersion(RELEASE_12) public static class ElementScanner extends ElementScanner9 { /** * Constructor for concrete subclasses; uses {@code null} for the @@ -181,7 +181,7 @@ } } - @SupportedSourceVersion(RELEASE_11) + @SupportedSourceVersion(RELEASE_12) public static class SimpleAnnotationValueVisitor extends SimpleAnnotationValueVisitor9 { /** * Constructor for concrete subclasses; uses {@code null} for the @@ -202,7 +202,7 @@ } } - @SupportedSourceVersion(RELEASE_11) + @SupportedSourceVersion(RELEASE_12) public static class SimpleElementVisitor extends SimpleElementVisitor9 { /** * Constructor for concrete subclasses; uses {@code null} for the @@ -223,7 +223,7 @@ } } - @SupportedSourceVersion(RELEASE_11) + @SupportedSourceVersion(RELEASE_12) public static class SimpleTypeVisitor extends SimpleTypeVisitor9 { /** * Constructor for concrete subclasses; uses {@code null} for the @@ -244,7 +244,7 @@ } } - @SupportedSourceVersion(RELEASE_11) + @SupportedSourceVersion(RELEASE_12) public static class TypeKindVisitor extends TypeKindVisitor9 { /** * Constructor for concrete subclasses to call; uses {@code null} --- old/test/langtools/tools/javac/preview/classReaderTest/Client.java 2018-06-27 14:20:47.566003999 -0700 +++ new/test/langtools/tools/javac/preview/classReaderTest/Client.java 2018-06-27 14:20:47.438003999 -0700 @@ -2,9 +2,9 @@ * @test /nodynamiccopyright/ * @bug 8199194 * @summary smoke test for --enabled-preview classreader support - * @compile -XDforcePreview --enable-preview -source 11 Bar.java + * @compile -XDforcePreview --enable-preview -source 12 Bar.java * @compile/fail/ref=Client.nopreview.out -Xlint:preview -XDrawDiagnostics Client.java - * @compile/fail/ref=Client.preview.out -Werror -Xlint:preview -XDrawDiagnostics --enable-preview -source 11 Client.java + * @compile/fail/ref=Client.preview.out -Werror -Xlint:preview -XDrawDiagnostics --enable-preview -source 12 Client.java */ public class Client { --- old/test/langtools/tools/javac/preview/classReaderTest/Client.nopreview.out 2018-06-27 14:20:48.074003999 -0700 +++ new/test/langtools/tools/javac/preview/classReaderTest/Client.nopreview.out 2018-06-27 14:20:47.946003999 -0700 @@ -1,2 +1,2 @@ -- compiler.err.preview.feature.disabled.classfile: Bar.class, 11 +- compiler.err.preview.feature.disabled.classfile: Bar.class, 12 1 error --- old/test/langtools/tools/javac/preview/classReaderTest/Client.preview.out 2018-06-27 14:20:48.574003999 -0700 +++ new/test/langtools/tools/javac/preview/classReaderTest/Client.preview.out 2018-06-27 14:20:48.446003999 -0700 @@ -1,4 +1,4 @@ -- compiler.warn.preview.feature.use.classfile: Bar.class, 11 +- compiler.warn.preview.feature.use.classfile: Bar.class, 12 - compiler.err.warnings.and.werror 1 error 1 warning --- old/test/langtools/tools/javac/profiles/ProfileOptionTest.java 2018-06-27 14:20:48.998003999 -0700 +++ new/test/langtools/tools/javac/profiles/ProfileOptionTest.java 2018-06-27 14:20:48.866003999 -0700 @@ -1,5 +1,5 @@ -/* - * Copyright (c) 2011, 2017, Oracle and/or its affiliates. All rights reserved. + /* + * Copyright (c) 2011, 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 @@ -150,6 +150,7 @@ case JDK1_9: case JDK1_10: case JDK1_11: + case JDK1_12: if (p == Profile.DEFAULT) break; if (ise == null) --- old/test/langtools/tools/javac/versions/Versions.java 2018-06-27 14:20:49.350003999 -0700 +++ new/test/langtools/tools/javac/versions/Versions.java 2018-06-27 14:20:49.218003999 -0700 @@ -1,5 +1,5 @@ /* - * Copyright (c) 2014, 2017, Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 2014, 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 @@ -23,7 +23,7 @@ /* * @test - * @bug 4981566 5028634 5094412 6304984 7025786 7025789 8001112 8028545 8000961 8030610 8028546 8188870 8173382 8173382 + * @bug 4981566 5028634 5094412 6304984 7025786 7025789 8001112 8028545 8000961 8030610 8028546 8188870 8173382 8173382 8193290 8205619 * @summary Check interpretation of -target and -source options * @modules java.compiler * jdk.compiler @@ -64,13 +64,15 @@ String TC = ""; System.out.println("Version.java: Starting"); - check("55.0"); - check("55.0", "-source 1.6"); - check("55.0", "-source 1.7"); - check("55.0", "-source 1.8"); - check("55.0", "-source 1.9"); - check("55.0", "-source 1.10"); - check("55.0", "-source 11"); + String LATEST_MAJOR_VERSION = "56.0"; + check(LATEST_MAJOR_VERSION); + check(LATEST_MAJOR_VERSION, "-source 1.6"); + check(LATEST_MAJOR_VERSION, "-source 1.7"); + check(LATEST_MAJOR_VERSION, "-source 1.8"); + check(LATEST_MAJOR_VERSION, "-source 1.9"); + check(LATEST_MAJOR_VERSION, "-source 1.10"); + check(LATEST_MAJOR_VERSION, "-source 11"); + check(LATEST_MAJOR_VERSION, "-source 12"); check_source_target(true, "50.0", "6", "6"); check_source_target(true, "51.0", "6", "7"); @@ -93,6 +95,7 @@ check_source_target(false, "55.0", "9", "11"); check_source_target(false, "55.0", "10", "11"); check_source_target(false, "55.0", "11", "11"); + check_source_target(false, "56.0", "12", "12"); checksrc16("-source 1.6"); checksrc16("-source 6"); @@ -117,7 +120,9 @@ checksrc110("-source 10", "-target 10"); checksrc111("-source 11"); checksrc111("-source 11", "-target 11"); - checksrc111("-target 11"); + checksrc112("-source 12"); + checksrc112("-source 12", "-target 12"); + checksrc112("-target 12"); fail("-source 7", "-target 1.6", "Base.java"); fail("-source 8", "-target 1.6", "Base.java"); @@ -128,6 +133,8 @@ fail("-source 10", "-target 1.8", "Base.java"); fail("-source 11", "-target 1.9", "Base.java"); fail("-source 11", "-target 1.10", "Base.java"); + fail("-source 12", "-target 1.10", "Base.java"); + fail("-source 12", "-target 11", "Base.java"); fail("-source 1.5", "-target 1.5", "Base.java"); fail("-source 1.4", "-target 1.4", "Base.java"); @@ -248,6 +255,11 @@ checksrc110(args); } + protected void checksrc112(String... args) { + printargs("checksrc112", args); + checksrc111(args); + } + protected void pass(String... args) { printargs("pass", args);