--- old/make/autoconf/version-numbers 2018-06-21 20:19:25.505201551 -0700 +++ new/make/autoconf/version-numbers 2018-06-21 20:19:24.860879531 -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-25 +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-21 20:19:27.298097607 -0700 +++ new/make/common/SetupJavaCompilers.gmk 2018-06-21 20:19:26.669783587 -0700 @@ -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-21 20:19:29.299097670 -0700 +++ new/src/hotspot/share/classfile/classFileParser.cpp 2018-06-21 20:19:28.566731646 -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-21 20:19:31.732313745 -0700 +++ new/src/java.base/share/classes/com/sun/java/util/jar/pack/Constants.java 2018-06-21 20:19:31.019957723 -0700 @@ -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-21 20:19:33.729311807 -0700 +++ new/src/java.base/share/classes/jdk/internal/module/ModuleInfo.java 2018-06-21 20:19:33.036965786 -0700 @@ -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-21 20:19:36.638765898 -0700 +++ new/src/java.base/share/classes/jdk/internal/org/objectweb/asm/ClassReader.java 2018-06-21 20:19:35.978435878 -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-21 20:19:38.687789963 -0700 +++ new/src/java.base/share/classes/jdk/internal/org/objectweb/asm/Opcodes.java 2018-06-21 20:19:38.019455942 -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-21 20:19:40.216554011 -0700 +++ new/src/java.compiler/share/classes/javax/lang/model/SourceVersion.java 2018-06-21 20:19:39.532211989 -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-21 20:19:42.113502070 -0700 +++ new/src/java.compiler/share/classes/javax/lang/model/util/AbstractAnnotationValueVisitor9.java 2018-06-21 20:19:41.441166049 -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-21 20:19:44.582736147 -0700 +++ new/src/java.compiler/share/classes/javax/lang/model/util/AbstractElementVisitor9.java 2018-06-21 20:19:43.918404126 -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-21 20:19:47.424156236 -0700 +++ new/src/java.compiler/share/classes/javax/lang/model/util/AbstractTypeVisitor9.java 2018-06-21 20:19:46.727808214 -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-21 20:19:49.793340310 -0700 +++ new/src/java.compiler/share/classes/javax/lang/model/util/ElementKindVisitor9.java 2018-06-21 20:19:49.137012289 -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-21 20:19:52.442664393 -0700 +++ new/src/java.compiler/share/classes/javax/lang/model/util/ElementScanner9.java 2018-06-21 20:19:51.570228365 -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-21 20:19:54.887886469 -0700 +++ new/src/java.compiler/share/classes/javax/lang/model/util/SimpleAnnotationValueVisitor9.java 2018-06-21 20:19:54.167526446 -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-21 20:19:57.421152548 -0700 +++ new/src/java.compiler/share/classes/javax/lang/model/util/SimpleElementVisitor9.java 2018-06-21 20:19:56.716800526 -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-21 20:19:59.886384625 -0700 +++ new/src/java.compiler/share/classes/javax/lang/model/util/SimpleTypeVisitor9.java 2018-06-21 20:19:59.138010602 -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-21 20:20:02.295588701 -0700 +++ new/src/java.compiler/share/classes/javax/lang/model/util/TypeKindVisitor9.java 2018-06-21 20:20:01.615248679 -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-21 20:20:04.364622766 -0700 +++ new/src/jdk.compiler/share/classes/com/sun/tools/javac/code/Source.java 2018-06-21 20:20:03.596238741 -0700 @@ -82,7 +82,10 @@ JDK10("10"), /** 1.11 covers the to be determined language features that will be added in JDK 11. */ - JDK11("11"); + 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-21 20:20:06.137508821 -0700 +++ new/src/jdk.compiler/share/classes/com/sun/tools/javac/jvm/ClassFile.java 2018-06-21 20:20:05.345112796 -0700 @@ -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 + 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-21 20:20:07.826352873 -0700 +++ new/src/jdk.compiler/share/classes/com/sun/tools/javac/jvm/Profile.java 2018-06-21 20:20:07.037958849 -0700 @@ -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-21 20:20:09.383130922 -0700 +++ new/src/jdk.compiler/share/classes/com/sun/tools/javac/jvm/Target.java 2018-06-21 20:20:08.654766899 -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-21 20:20:11.432154987 -0700 +++ new/src/jdk.compiler/share/classes/com/sun/tools/javac/processing/PrintingProcessor.java 2018-06-21 20:20:10.731804964 -0700 @@ -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-21 20:20:14.181529072 -0700 +++ new/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.replacements/src/org/graalvm/compiler/replacements/classfile/Classfile.java 2018-06-21 20:20:13.405141048 -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/LoadProc.java 2018-06-21 20:20:16.814845153 -0700 +++ new/src/jdk.jdeps/share/classes/com/sun/tools/jdeprscan/LoadProc.java 2018-06-21 20:20:16.114495132 -0700 @@ -50,7 +50,7 @@ import javax.tools.Diagnostic; -import static javax.lang.model.SourceVersion.RELEASE_11; +import static javax.lang.model.SourceVersion.RELEASE_12; /** * Annotation processor for the Deprecation Scanner tool. @@ -58,7 +58,7 @@ * */ @SupportedAnnotationTypes("java.lang.Deprecated") -@SupportedSourceVersion(RELEASE_11) +@SupportedSourceVersion(RELEASE_12) public class LoadProc extends AbstractProcessor { Elements elements; Messager messager; --- old/src/jdk.jdeps/share/classes/com/sun/tools/jdeprscan/Main.java 2018-06-21 20:20:18.823849217 -0700 +++ new/src/jdk.jdeps/share/classes/com/sun/tools/jdeprscan/Main.java 2018-06-21 20:20:18.087481194 -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; { --- old/src/jdk.rmic/share/classes/sun/tools/java/RuntimeConstants.java 2018-06-21 20:20:20.792833278 -0700 +++ new/src/jdk.rmic/share/classes/sun/tools/java/RuntimeConstants.java 2018-06-21 20:20:20.064469256 -0700 @@ -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-21 20:20:23.214043354 -0700 +++ new/test/hotspot/jtreg/runtime/CommandLine/VMDeprecatedOptions.java 2018-06-21 20:20:22.389631328 -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-21 20:20:24.658765399 -0700 +++ new/test/jdk/com/sun/management/HotSpotDiagnosticMXBean/CheckOrigin.java 2018-06-21 20:20:23.970421377 -0700 @@ -55,19 +55,12 @@ if (args.length == 0) { // start a process that has options set in a number of different ways - File flagsFile = File.createTempFile("CheckOriginFlags", null); - try (PrintWriter pw = - new PrintWriter(new FileWriter(flagsFile))) { - pw.println("+PrintSafepointStatistics"); - } - ProcessBuilder pb = ProcessTools. createJavaProcessBuilder( "--add-exports", "jdk.attach/sun.tools.attach=ALL-UNNAMED", "-XX:+UseConcMarkSweepGC", // this will cause MaxNewSize to be FLAG_SET_ERGO "-XX:+UseCodeAging", "-XX:+UseCerealGC", // Should be ignored. - "-XX:Flags=" + flagsFile.getAbsolutePath(), "-Djdk.attach.allowAttachSelf", "-cp", System.getProperty("test.class.path"), "CheckOrigin", @@ -107,8 +100,6 @@ // Set in JAVA_TOOL_OPTIONS checkOrigin("IgnoreUnrecognizedVMOptions", Origin.ENVIRON_VAR); checkOrigin("PrintVMOptions", Origin.ENVIRON_VAR); - // Set in -XX:Flags file - checkOrigin("PrintSafepointStatistics", 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-21 20:20:26.327599451 -0700 +++ new/test/jdk/java/lang/module/ClassFileVersionsTest.java 2018-06-21 20:20:25.527199426 -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-21 20:20:27.736303495 -0700 +++ new/test/jdk/java/util/jar/JarFile/mrjar/TestVersionedStream.java 2018-06-21 20:20:27.015943472 -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-21 20:20:29.293081544 -0700 +++ new/test/jdk/jdk/nio/zipfs/MultiReleaseJarTest.java 2018-06-21 20:20:28.536703520 -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-21 20:20:30.821845592 -0700 +++ new/test/langtools/ProblemList.txt 2018-06-21 20:20:30.001435566 -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-21 20:20:32.742805651 -0700 +++ new/test/langtools/tools/javac/6330997/T6330997.java 2018-06-21 20:20:31.962415628 -0700 @@ -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-21 20:20:34.611739710 -0700 +++ new/test/langtools/tools/javac/api/T6265137.java 2018-06-21 20:20:33.863365687 -0700 @@ -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-21 20:20:36.108487757 -0700 +++ new/test/langtools/tools/javac/api/T6395981.java 2018-06-21 20:20:35.320093732 -0700 @@ -23,7 +23,7 @@ /* * @test - * @bug 6395981 6458819 7025784 8028543 8028544 8193291 + * @bug 6395981 6458819 7025784 8028543 8028544 8193291 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-21 20:20:37.773319809 -0700 +++ new/test/langtools/tools/javac/classfiles/ClassVersionChecker.java 2018-06-21 20:20:36.924895783 -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 @@ -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/lib/JavacTestingAbstractProcessor.java 2018-06-21 20:20:39.894379875 -0700 +++ new/test/langtools/tools/javac/lib/JavacTestingAbstractProcessor.java 2018-06-21 20:20:38.989927847 -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-21 20:20:42.491677956 -0700 +++ new/test/langtools/tools/javac/preview/classReaderTest/Client.java 2018-06-21 20:20:41.747305934 -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-21 20:20:44.812838029 -0700 +++ new/test/langtools/tools/javac/preview/classReaderTest/Client.nopreview.out 2018-06-21 20:20:44.056460005 -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-21 20:20:47.166014103 -0700 +++ new/test/langtools/tools/javac/preview/classReaderTest/Client.preview.out 2018-06-21 20:20:46.425644079 -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-21 20:20:49.151006165 -0700 +++ new/test/langtools/tools/javac/profiles/ProfileOptionTest.java 2018-06-21 20:20:48.338600139 -0700 @@ -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-21 20:20:51.127994226 -0700 +++ new/test/langtools/tools/javac/versions/Versions.java 2018-06-21 20:20:50.091476194 -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 * @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);