8205615: Start of release updates for JDK 12
authordarcy
Wed, 27 Jun 2018 21:01:12 -0700
changeset 50892 a5557f24b4d4
parent 50891 9948ea5ea1af
child 50893 1ecd78e0f56b
8205615: Start of release updates for JDK 12 8205621: Increment JDK version for JDK 12 8193292: Add SourceVersion.RELEASE_12 8193290: Add source 12 and target 12 to javac 8205619: Bump maximum recognized class file version to 56 for JDK 12 Reviewed-by: alanb, smarks, jjg, mr, erikj, psandoz, dholmes Contributed-by: erik.joelsson@oracle.com, mikael.vidstedt@oracle.com, joe.darcy@oracle.com
make/autoconf/version-numbers
make/common/SetupJavaCompilers.gmk
src/hotspot/share/classfile/classFileParser.cpp
src/java.base/share/classes/com/sun/java/util/jar/pack/Constants.java
src/java.base/share/classes/jdk/internal/module/ModuleInfo.java
src/java.base/share/classes/jdk/internal/org/objectweb/asm/ClassReader.java
src/java.base/share/classes/jdk/internal/org/objectweb/asm/Opcodes.java
src/java.compiler/share/classes/javax/lang/model/SourceVersion.java
src/java.compiler/share/classes/javax/lang/model/util/AbstractAnnotationValueVisitor9.java
src/java.compiler/share/classes/javax/lang/model/util/AbstractElementVisitor9.java
src/java.compiler/share/classes/javax/lang/model/util/AbstractTypeVisitor9.java
src/java.compiler/share/classes/javax/lang/model/util/ElementKindVisitor9.java
src/java.compiler/share/classes/javax/lang/model/util/ElementScanner9.java
src/java.compiler/share/classes/javax/lang/model/util/SimpleAnnotationValueVisitor9.java
src/java.compiler/share/classes/javax/lang/model/util/SimpleElementVisitor9.java
src/java.compiler/share/classes/javax/lang/model/util/SimpleTypeVisitor9.java
src/java.compiler/share/classes/javax/lang/model/util/TypeKindVisitor9.java
src/jdk.compiler/share/classes/com/sun/tools/javac/code/Source.java
src/jdk.compiler/share/classes/com/sun/tools/javac/jvm/ClassFile.java
src/jdk.compiler/share/classes/com/sun/tools/javac/jvm/Profile.java
src/jdk.compiler/share/classes/com/sun/tools/javac/jvm/Target.java
src/jdk.compiler/share/classes/com/sun/tools/javac/processing/PrintingProcessor.java
src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.replacements/src/org/graalvm/compiler/replacements/classfile/Classfile.java
src/jdk.jdeps/share/classes/com/sun/tools/jdeprscan/Main.java
src/jdk.rmic/share/classes/sun/tools/java/RuntimeConstants.java
test/hotspot/jtreg/runtime/CommandLine/VMDeprecatedOptions.java
test/jdk/com/sun/management/HotSpotDiagnosticMXBean/CheckOrigin.java
test/jdk/java/lang/module/ClassFileVersionsTest.java
test/jdk/java/util/jar/JarFile/mrjar/TestVersionedStream.java
test/jdk/jdk/nio/zipfs/MultiReleaseJarTest.java
test/langtools/ProblemList.txt
test/langtools/tools/javac/6330997/T6330997.java
test/langtools/tools/javac/api/T6265137.java
test/langtools/tools/javac/api/T6395981.java
test/langtools/tools/javac/classfiles/ClassVersionChecker.java
test/langtools/tools/javac/diags/examples/PreviewFeatureUse.java
test/langtools/tools/javac/diags/examples/PreviewFilename.java
test/langtools/tools/javac/diags/examples/PreviewFilenameAdditional.java
test/langtools/tools/javac/diags/examples/PreviewPlural/PreviewPlural.java
test/langtools/tools/javac/lib/JavacTestingAbstractProcessor.java
test/langtools/tools/javac/preview/classReaderTest/Client.java
test/langtools/tools/javac/preview/classReaderTest/Client.nopreview.out
test/langtools/tools/javac/preview/classReaderTest/Client.preview.out
test/langtools/tools/javac/profiles/ProfileOptionTest.java
test/langtools/tools/javac/versions/Versions.java
--- a/make/autoconf/version-numbers	Thu Jun 28 19:55:44 2018 +0200
+++ b/make/autoconf/version-numbers	Wed Jun 27 21:01:12 2018 -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
--- a/make/common/SetupJavaCompilers.gmk	Thu Jun 28 19:55:44 2018 +0200
+++ b/make/common/SetupJavaCompilers.gmk	Wed Jun 27 21:01:12 2018 -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)))
--- a/src/hotspot/share/classfile/classFileParser.cpp	Thu Jun 28 19:55:44 2018 +0200
+++ b/src/hotspot/share/classfile/classFileParser.cpp	Wed Jun 27 21:01:12 2018 -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");
--- a/src/java.base/share/classes/com/sun/java/util/jar/pack/Constants.java	Thu Jun 28 19:55:44 2018 +0200
+++ b/src/java.base/share/classes/com/sun/java/util/jar/pack/Constants.java	Wed Jun 27 21:01:12 2018 -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 =
--- a/src/java.base/share/classes/jdk/internal/module/ModuleInfo.java	Thu Jun 28 19:55:44 2018 +0200
+++ b/src/java.base/share/classes/jdk/internal/module/ModuleInfo.java	Wed Jun 27 21:01:12 2018 -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();
--- a/src/java.base/share/classes/jdk/internal/org/objectweb/asm/ClassReader.java	Thu Jun 28 19:55:44 2018 +0200
+++ b/src/java.base/share/classes/jdk/internal/org/objectweb/asm/ClassReader.java	Wed Jun 27 21:01:12 2018 -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
--- a/src/java.base/share/classes/jdk/internal/org/objectweb/asm/Opcodes.java	Thu Jun 28 19:55:44 2018 +0200
+++ b/src/java.base/share/classes/jdk/internal/org/objectweb/asm/Opcodes.java	Wed Jun 27 21:01:12 2018 -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
 
--- a/src/java.compiler/share/classes/javax/lang/model/SourceVersion.java	Thu Jun 28 19:55:44 2018 +0200
+++ b/src/java.compiler/share/classes/javax/lang/model/SourceVersion.java	Wed Jun 27 21:01:12 2018 -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":
--- a/src/java.compiler/share/classes/javax/lang/model/util/AbstractAnnotationValueVisitor9.java	Thu Jun 28 19:55:44 2018 +0200
+++ b/src/java.compiler/share/classes/javax/lang/model/util/AbstractAnnotationValueVisitor9.java	Wed Jun 27 21:01:12 2018 -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}.
  *
  * <p> <b>WARNING:</b> 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<R, P> extends AbstractAnnotationValueVisitor8<R, P> {
 
     /**
--- a/src/java.compiler/share/classes/javax/lang/model/util/AbstractElementVisitor9.java	Thu Jun 28 19:55:44 2018 +0200
+++ b/src/java.compiler/share/classes/javax/lang/model/util/AbstractElementVisitor9.java	Wed Jun 27 21:01:12 2018 -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}.
  *
  * <p> <b>WARNING:</b> 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<R, P> extends AbstractElementVisitor8<R, P> {
     /**
      * Constructor for concrete subclasses to call.
--- a/src/java.compiler/share/classes/javax/lang/model/util/AbstractTypeVisitor9.java	Thu Jun 28 19:55:44 2018 +0200
+++ b/src/java.compiler/share/classes/javax/lang/model/util/AbstractTypeVisitor9.java	Wed Jun 27 21:01:12 2018 -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}.
  *
  * <p> <b>WARNING:</b> 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<R, P> extends AbstractTypeVisitor8<R, P> {
     /**
      * Constructor for concrete subclasses to call.
--- a/src/java.compiler/share/classes/javax/lang/model/util/ElementKindVisitor9.java	Thu Jun 28 19:55:44 2018 +0200
+++ b/src/java.compiler/share/classes/javax/lang/model/util/ElementKindVisitor9.java	Wed Jun 27 21:01:12 2018 -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} <code><i>Xyz</i></code> that may have more than one
@@ -80,7 +80,7 @@
  * @since 9
  * @spec JPMS
  */
-@SupportedSourceVersion(RELEASE_11)
+@SupportedSourceVersion(RELEASE_12)
 public class ElementKindVisitor9<R, P> extends ElementKindVisitor8<R, P> {
     /**
      * Constructor for concrete subclasses; uses {@code null} for the
--- a/src/java.compiler/share/classes/javax/lang/model/util/ElementScanner9.java	Thu Jun 28 19:55:44 2018 +0200
+++ b/src/java.compiler/share/classes/javax/lang/model/util/ElementScanner9.java	Wed Jun 27 21:01:12 2018 -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 <code>visit<i>Xyz</i></code> 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<R, P> extends ElementScanner8<R, P> {
     /**
      * Constructor for concrete subclasses; uses {@code null} for the
--- a/src/java.compiler/share/classes/javax/lang/model/util/SimpleAnnotationValueVisitor9.java	Thu Jun 28 19:55:44 2018 +0200
+++ b/src/java.compiler/share/classes/javax/lang/model/util/SimpleAnnotationValueVisitor9.java	Wed Jun 27 21:01:12 2018 -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<R, P> extends SimpleAnnotationValueVisitor8<R, P> {
     /**
      * Constructor for concrete subclasses; uses {@code null} for the
--- a/src/java.compiler/share/classes/javax/lang/model/util/SimpleElementVisitor9.java	Thu Jun 28 19:55:44 2018 +0200
+++ b/src/java.compiler/share/classes/javax/lang/model/util/SimpleElementVisitor9.java	Wed Jun 27 21:01:12 2018 -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<R, P> extends SimpleElementVisitor8<R, P> {
     /**
      * Constructor for concrete subclasses; uses {@code null} for the
--- a/src/java.compiler/share/classes/javax/lang/model/util/SimpleTypeVisitor9.java	Thu Jun 28 19:55:44 2018 +0200
+++ b/src/java.compiler/share/classes/javax/lang/model/util/SimpleTypeVisitor9.java	Wed Jun 27 21:01:12 2018 -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<R, P> extends SimpleTypeVisitor8<R, P> {
     /**
      * Constructor for concrete subclasses; uses {@code null} for the
--- a/src/java.compiler/share/classes/javax/lang/model/util/TypeKindVisitor9.java	Thu Jun 28 19:55:44 2018 +0200
+++ b/src/java.compiler/share/classes/javax/lang/model/util/TypeKindVisitor9.java	Wed Jun 27 21:01:12 2018 -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} <code><i>Xyz</i></code> that may have more than one
@@ -77,7 +77,7 @@
  * @see TypeKindVisitor8
  * @since 9
  */
-@SupportedSourceVersion(RELEASE_11)
+@SupportedSourceVersion(RELEASE_12)
 public class TypeKindVisitor9<R, P> extends TypeKindVisitor8<R, P> {
     /**
      * Constructor for concrete subclasses to call; uses {@code null}
--- a/src/jdk.compiler/share/classes/com/sun/tools/javac/code/Source.java	Thu Jun 28 19:55:44 2018 +0200
+++ b/src/jdk.compiler/share/classes/com/sun/tools/javac/code/Source.java	Wed Jun 27 21:01:12 2018 -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 local-variable syntax for lambda parameters */
+    JDK11("11"),
+
+    /** 12 covers the to be determined language features that will be added in JDK 12. */
+    JDK12("12");
 
     private static final Context.Key<Source> 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;
         }
--- a/src/jdk.compiler/share/classes/com/sun/tools/javac/jvm/ClassFile.java	Thu Jun 28 19:55:44 2018 +0200
+++ b/src/jdk.compiler/share/classes/com/sun/tools/javac/jvm/ClassFile.java	Wed Jun 27 21:01:12 2018 -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;
--- a/src/jdk.compiler/share/classes/com/sun/tools/javac/jvm/Profile.java	Thu Jun 28 19:55:44 2018 +0200
+++ b/src/jdk.compiler/share/classes/com/sun/tools/javac/jvm/Profile.java	Wed Jun 27 21:01:12 2018 -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.</b>
  */
 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
--- a/src/jdk.compiler/share/classes/com/sun/tools/javac/jvm/Target.java	Thu Jun 28 19:55:44 2018 +0200
+++ b/src/jdk.compiler/share/classes/com/sun/tools/javac/jvm/Target.java	Wed Jun 27 21:01:12 2018 -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<Target> 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;
--- a/src/jdk.compiler/share/classes/com/sun/tools/javac/processing/PrintingProcessor.java	Thu Jun 28 19:55:44 2018 +0200
+++ b/src/jdk.compiler/share/classes/com/sun/tools/javac/processing/PrintingProcessor.java	Wed Jun 27 21:01:12 2018 -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.</b>
  */
 @SupportedAnnotationTypes("*")
-@SupportedSourceVersion(SourceVersion.RELEASE_11)
+@SupportedSourceVersion(SourceVersion.RELEASE_12)
 public class PrintingProcessor extends AbstractProcessor {
     PrintWriter writer;
 
--- a/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.replacements/src/org/graalvm/compiler/replacements/classfile/Classfile.java	Thu Jun 28 19:55:44 2018 +0200
+++ b/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.replacements/src/org/graalvm/compiler/replacements/classfile/Classfile.java	Wed Jun 27 21:01:12 2018 -0700
@@ -49,7 +49,7 @@
     private final List<ClassfileBytecode> 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;
 
     /**
--- a/src/jdk.jdeps/share/classes/com/sun/tools/jdeprscan/Main.java	Thu Jun 28 19:55:44 2018 +0200
+++ b/src/jdk.jdeps/share/classes/com/sun/tools/jdeprscan/Main.java	Wed Jun 27 21:01:12 2018 -0700
@@ -106,7 +106,7 @@
     // Keep these updated manually until there's a compiler API
     // that allows querying of supported releases.
     final Set<String> releasesWithoutForRemoval = Set.of("6", "7", "8");
-    final Set<String> releasesWithForRemoval = Set.of("9", "10", "11");
+    final Set<String> releasesWithForRemoval = Set.of("9", "10", "11", "12");
 
     final Set<String> 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<String> loadClasses = new ArrayList<>();
         String csvFile = null;
 
--- a/src/jdk.rmic/share/classes/sun/tools/java/RuntimeConstants.java	Thu Jun 28 19:55:44 2018 +0200
+++ b/src/jdk.rmic/share/classes/sun/tools/java/RuntimeConstants.java	Wed Jun 27 21:01:12 2018 -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 */
--- a/test/hotspot/jtreg/runtime/CommandLine/VMDeprecatedOptions.java	Thu Jun 28 19:55:44 2018 +0200
+++ b/test/hotspot/jtreg/runtime/CommandLine/VMDeprecatedOptions.java	Wed Jun 27 21:01:12 2018 -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"},
--- a/test/jdk/com/sun/management/HotSpotDiagnosticMXBean/CheckOrigin.java	Thu Jun 28 19:55:44 2018 +0200
+++ b/test/jdk/com/sun/management/HotSpotDiagnosticMXBean/CheckOrigin.java	Wed Jun 27 21:01:12 2018 -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
--- a/test/jdk/java/lang/module/ClassFileVersionsTest.java	Thu Jun 28 19:55:44 2018 +0200
+++ b/test/jdk/java/lang/module/ClassFileVersionsTest.java	Wed Jun 27 21:01:12 2018 -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
         };
     }
 
--- a/test/jdk/java/util/jar/JarFile/mrjar/TestVersionedStream.java	Thu Jun 28 19:55:44 2018 +0200
+++ b/test/jdk/java/util/jar/JarFile/mrjar/TestVersionedStream.java	Wed Jun 27 21:01:12 2018 -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<String> 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 -> {
--- a/test/jdk/jdk/nio/zipfs/MultiReleaseJarTest.java	Thu Jun 28 19:55:44 2018 +0200
+++ b/test/jdk/jdk/nio/zipfs/MultiReleaseJarTest.java	Wed Jun 27 21:01:12 2018 -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}
         };
     }
--- a/test/langtools/ProblemList.txt	Thu Jun 28 19:55:44 2018 +0200
+++ b/test/langtools/ProblemList.txt	Wed Jun 27 21:01:12 2018 -0700
@@ -56,6 +56,9 @@
 tools/javac/modules/SourceInSymlinkTest.java                                    8180263    windows-all    fails when run on a subst drive
 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
@@ -70,12 +73,12 @@
 tools/sjavac/IncCompileFullyQualifiedRef.java                                   8152055    generic-all    Requires dependency code to deal with in-method dependencies.
 tools/sjavac/IncCompileWithChanges.java                                         8152055    generic-all    Requires dependency code to deal with in-method dependencies.
 
-tools/sjavac/ApiExtraction.java							8158002	   generic-all	  Requires investigation
-tools/sjavac/IgnoreSymbolFile.java						8158002	   generic-all	  Requires investigation
-tools/sjavac/ClasspathDependencies.java						8158002	   generic-all	  Requires investigation
+tools/sjavac/ApiExtraction.java                                                 8158002    generic-all    Requires investigation
+tools/sjavac/IgnoreSymbolFile.java                                              8158002    generic-all    Requires investigation
+tools/sjavac/ClasspathDependencies.java                                         8158002    generic-all    Requires investigation
 
 
 ###########################################################################
 #
-# jdeps 
+# jdeps
 
--- a/test/langtools/tools/javac/6330997/T6330997.java	Thu Jun 28 19:55:44 2018 +0200
+++ b/test/langtools/tools/javac/6330997/T6330997.java	Wed Jun 27 21:01:12 2018 -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
  */
 
--- a/test/langtools/tools/javac/api/T6265137.java	Thu Jun 28 19:55:44 2018 +0200
+++ b/test/langtools/tools/javac/api/T6265137.java	Wed Jun 27 21:01:12 2018 -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<? extends JavaFileObject> 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();
         }
     }
 }
--- a/test/langtools/tools/javac/api/T6395981.java	Thu Jun 28 19:55:44 2018 +0200
+++ b/test/langtools/tools/javac/api/T6395981.java	Wed Jun 27 21:01:12 2018 -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;
--- a/test/langtools/tools/javac/classfiles/ClassVersionChecker.java	Thu Jun 28 19:55:44 2018 +0200
+++ b/test/langtools/tools/javac/classfiles/ClassVersionChecker.java	Wed Jun 27 21:01:12 2018 -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++) {
--- a/test/langtools/tools/javac/diags/examples/PreviewFeatureUse.java	Thu Jun 28 19:55:44 2018 +0200
+++ b/test/langtools/tools/javac/diags/examples/PreviewFeatureUse.java	Wed Jun 27 21:01:12 2018 -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;
 
--- a/test/langtools/tools/javac/diags/examples/PreviewFilename.java	Thu Jun 28 19:55:44 2018 +0200
+++ b/test/langtools/tools/javac/diags/examples/PreviewFilename.java	Wed Jun 27 21:01:12 2018 -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;
--- a/test/langtools/tools/javac/diags/examples/PreviewFilenameAdditional.java	Thu Jun 28 19:55:44 2018 +0200
+++ b/test/langtools/tools/javac/diags/examples/PreviewFilenameAdditional.java	Wed Jun 27 21:01:12 2018 -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;
 
--- a/test/langtools/tools/javac/diags/examples/PreviewPlural/PreviewPlural.java	Thu Jun 28 19:55:44 2018 +0200
+++ b/test/langtools/tools/javac/diags/examples/PreviewPlural/PreviewPlural.java	Wed Jun 27 21:01:12 2018 -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;
 
--- a/test/langtools/tools/javac/lib/JavacTestingAbstractProcessor.java	Thu Jun 28 19:55:44 2018 +0200
+++ b/test/langtools/tools/javac/lib/JavacTestingAbstractProcessor.java	Wed Jun 27 21:01:12 2018 -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<R, P> extends AbstractAnnotationValueVisitor9<R, P> {
 
         /**
@@ -121,7 +121,7 @@
         }
     }
 
-    @SupportedSourceVersion(RELEASE_11)
+    @SupportedSourceVersion(RELEASE_12)
     public static abstract class AbstractElementVisitor<R, P> extends AbstractElementVisitor9<R, P> {
         /**
          * Constructor for concrete subclasses to call.
@@ -131,7 +131,7 @@
         }
     }
 
-    @SupportedSourceVersion(RELEASE_11)
+    @SupportedSourceVersion(RELEASE_12)
     public static abstract class AbstractTypeVisitor<R, P> extends AbstractTypeVisitor9<R, P> {
         /**
          * Constructor for concrete subclasses to call.
@@ -141,7 +141,7 @@
         }
     }
 
-    @SupportedSourceVersion(RELEASE_11)
+    @SupportedSourceVersion(RELEASE_12)
     public static class ElementKindVisitor<R, P> extends ElementKindVisitor9<R, P> {
         /**
          * Constructor for concrete subclasses; uses {@code null} for the
@@ -162,7 +162,7 @@
         }
     }
 
-    @SupportedSourceVersion(RELEASE_11)
+    @SupportedSourceVersion(RELEASE_12)
     public static class ElementScanner<R, P> extends ElementScanner9<R, P> {
         /**
          * Constructor for concrete subclasses; uses {@code null} for the
@@ -181,7 +181,7 @@
         }
     }
 
-    @SupportedSourceVersion(RELEASE_11)
+    @SupportedSourceVersion(RELEASE_12)
     public static class SimpleAnnotationValueVisitor<R, P> extends SimpleAnnotationValueVisitor9<R, P> {
         /**
          * Constructor for concrete subclasses; uses {@code null} for the
@@ -202,7 +202,7 @@
         }
     }
 
-    @SupportedSourceVersion(RELEASE_11)
+    @SupportedSourceVersion(RELEASE_12)
     public static class SimpleElementVisitor<R, P> extends SimpleElementVisitor9<R, P> {
         /**
          * Constructor for concrete subclasses; uses {@code null} for the
@@ -223,7 +223,7 @@
         }
     }
 
-    @SupportedSourceVersion(RELEASE_11)
+    @SupportedSourceVersion(RELEASE_12)
     public static class SimpleTypeVisitor<R, P> extends SimpleTypeVisitor9<R, P> {
         /**
          * Constructor for concrete subclasses; uses {@code null} for the
@@ -244,7 +244,7 @@
         }
     }
 
-    @SupportedSourceVersion(RELEASE_11)
+    @SupportedSourceVersion(RELEASE_12)
     public static class TypeKindVisitor<R, P> extends TypeKindVisitor9<R, P> {
         /**
          * Constructor for concrete subclasses to call; uses {@code null}
--- a/test/langtools/tools/javac/preview/classReaderTest/Client.java	Thu Jun 28 19:55:44 2018 +0200
+++ b/test/langtools/tools/javac/preview/classReaderTest/Client.java	Wed Jun 27 21:01:12 2018 -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 {
--- a/test/langtools/tools/javac/preview/classReaderTest/Client.nopreview.out	Thu Jun 28 19:55:44 2018 +0200
+++ b/test/langtools/tools/javac/preview/classReaderTest/Client.nopreview.out	Wed Jun 27 21:01:12 2018 -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
--- a/test/langtools/tools/javac/preview/classReaderTest/Client.preview.out	Thu Jun 28 19:55:44 2018 +0200
+++ b/test/langtools/tools/javac/preview/classReaderTest/Client.preview.out	Wed Jun 27 21:01:12 2018 -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
--- a/test/langtools/tools/javac/profiles/ProfileOptionTest.java	Thu Jun 28 19:55:44 2018 +0200
+++ b/test/langtools/tools/javac/profiles/ProfileOptionTest.java	Wed Jun 27 21:01:12 2018 -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)
--- a/test/langtools/tools/javac/versions/Versions.java	Thu Jun 28 19:55:44 2018 +0200
+++ b/test/langtools/tools/javac/versions/Versions.java	Wed Jun 27 21:01:12 2018 -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);