diff --git a/make/autoconf/version-numbers b/make/autoconf/version-numbers index 57b551acac0a..762c55286358 100644 --- a/make/autoconf/version-numbers +++ b/make/autoconf/version-numbers @@ -25,17 +25,17 @@ # Default version numbers to use unless overridden by configure -DEFAULT_VERSION_FEATURE=12 +DEFAULT_VERSION_FEATURE=13 DEFAULT_VERSION_INTERIM=0 DEFAULT_VERSION_UPDATE=0 DEFAULT_VERSION_PATCH=0 DEFAULT_VERSION_EXTRA1=0 DEFAULT_VERSION_EXTRA2=0 DEFAULT_VERSION_EXTRA3=0 -DEFAULT_VERSION_DATE=2019-03-19 -DEFAULT_VERSION_CLASSFILE_MAJOR=56 # "`$EXPR $DEFAULT_VERSION_FEATURE + 44`" +DEFAULT_VERSION_DATE=2019-09-17 +DEFAULT_VERSION_CLASSFILE_MAJOR=57 # "`$EXPR $DEFAULT_VERSION_FEATURE + 44`" DEFAULT_VERSION_CLASSFILE_MINOR=0 -DEFAULT_ACCEPTABLE_BOOT_VERSIONS="11 12" +DEFAULT_ACCEPTABLE_BOOT_VERSIONS="11 12 13" LAUNCHER_NAME=openjdk PRODUCT_NAME=OpenJDK diff --git a/make/common/SetupJavaCompilers.gmk b/make/common/SetupJavaCompilers.gmk index f66a8e319db9..7c85408cfb32 100644 --- a/make/common/SetupJavaCompilers.gmk +++ b/make/common/SetupJavaCompilers.gmk @@ -72,7 +72,7 @@ $(eval $(call SetupJavaCompiler,GENERATE_OLDBYTECODE, \ $(eval $(call SetupJavaCompiler,GENERATE_JDKBYTECODE, \ JVM := $(JAVA_JAVAC), \ JAVAC := $(NEW_JAVAC), \ - FLAGS := -source 12 -target 12 --doclint-format html5 \ + FLAGS := -source 13 -target 13 --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, \ $(eval $(call SetupJavaCompiler,GENERATE_JDKBYTECODE_NOWARNINGS, \ JVM := $(JAVA_JAVAC), \ JAVAC := $(NEW_JAVAC), \ - FLAGS := -source 12 -target 12 \ + FLAGS := -source 13 -target 13 \ -encoding ascii -XDignore.symbol.file=true $(DISABLE_WARNINGS), \ SERVER_DIR := $(SJAVAC_SERVER_DIR), \ SERVER_JVM := $(SJAVAC_SERVER_JAVA))) diff --git a/src/hotspot/share/classfile/classFileParser.cpp b/src/hotspot/share/classfile/classFileParser.cpp index 4484da997c79..18a3f4877df1 100644 --- a/src/hotspot/share/classfile/classFileParser.cpp +++ b/src/hotspot/share/classfile/classFileParser.cpp @@ -119,6 +119,8 @@ #define JAVA_12_VERSION 56 +#define JAVA_13_VERSION 57 + 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"); diff --git a/src/java.base/share/classes/com/sun/java/util/jar/pack/Constants.java b/src/java.base/share/classes/com/sun/java/util/jar/pack/Constants.java index 96e64c1d8fe6..d178f02d80b6 100644 --- a/src/java.base/share/classes/com/sun/java/util/jar/pack/Constants.java +++ b/src/java.base/share/classes/com/sun/java/util/jar/pack/Constants.java @@ -50,6 +50,7 @@ private Constants(){} 1.10 to 1.10.X 54,0 1.11 to 1.11.X 55,0 1.12 to 1.12.X 56,0 + 1.13 to 1.13.X 57,0 */ public static final Package.Version JAVA_MIN_CLASS_VERSION = @@ -79,6 +80,9 @@ private Constants(){} public static final Package.Version JAVA12_MAX_CLASS_VERSION = Package.Version.of(56, 00); + public static final Package.Version JAVA13_MAX_CLASS_VERSION = + Package.Version.of(57, 00); + public static final int JAVA_PACKAGE_MAGIC = 0xCAFED00D; public static final Package.Version JAVA5_PACKAGE_VERSION = @@ -95,7 +99,7 @@ private Constants(){} // upper limit, should point to the latest class version public static final Package.Version JAVA_MAX_CLASS_VERSION = - JAVA12_MAX_CLASS_VERSION; + JAVA13_MAX_CLASS_VERSION; // upper limit should point to the latest package version, for version info!. public static final Package.Version MAX_PACKAGE_VERSION = diff --git a/src/java.base/share/classes/jdk/internal/module/ModuleInfo.java b/src/java.base/share/classes/jdk/internal/module/ModuleInfo.java index 9b20502bc4f9..2a10a8952f81 100644 --- a/src/java.base/share/classes/jdk/internal/module/ModuleInfo.java +++ b/src/java.base/share/classes/jdk/internal/module/ModuleInfo.java @@ -63,7 +63,7 @@ public final class ModuleInfo { private final int JAVA_MIN_SUPPORTED_VERSION = 53; - private final int JAVA_MAX_SUPPORTED_VERSION = 56; + private final int JAVA_MAX_SUPPORTED_VERSION = 57; private static final JavaLangModuleAccess JLMA = SharedSecrets.getJavaLangModuleAccess(); diff --git a/src/java.base/share/classes/jdk/internal/org/objectweb/asm/ClassReader.java b/src/java.base/share/classes/jdk/internal/org/objectweb/asm/ClassReader.java index 845e3b891823..5d2833e012b5 100644 --- a/src/java.base/share/classes/jdk/internal/org/objectweb/asm/ClassReader.java +++ b/src/java.base/share/classes/jdk/internal/org/objectweb/asm/ClassReader.java @@ -210,7 +210,7 @@ public ClassReader( b = classFileBuffer; // Check the class' major_version. This field is after the magic and minor_version fields, which // use 4 and 2 bytes respectively. - if (checkClassVersion && readShort(classFileOffset + 6) > Opcodes.V12) { + if (checkClassVersion && readShort(classFileOffset + 6) > Opcodes.V13) { throw new IllegalArgumentException( "Unsupported class file major version " + readShort(classFileOffset + 6)); } diff --git a/src/java.base/share/classes/jdk/internal/org/objectweb/asm/Opcodes.java b/src/java.base/share/classes/jdk/internal/org/objectweb/asm/Opcodes.java index e1095c535be7..0fb28cacd113 100644 --- a/src/java.base/share/classes/jdk/internal/org/objectweb/asm/Opcodes.java +++ b/src/java.base/share/classes/jdk/internal/org/objectweb/asm/Opcodes.java @@ -95,6 +95,7 @@ public interface Opcodes { int V10 = 0 << 16 | 54; int V11 = 0 << 16 | 55; int V12 = 0 << 16 | 56; + int V13 = 0 << 16 | 57; /** * Version flag indicating that the class is using 'preview' features. diff --git a/src/java.compiler/share/classes/javax/lang/model/SourceVersion.java b/src/java.compiler/share/classes/javax/lang/model/SourceVersion.java index c1cb262dd25d..aa2a8e780c2b 100644 --- a/src/java.compiler/share/classes/javax/lang/model/SourceVersion.java +++ b/src/java.compiler/share/classes/javax/lang/model/SourceVersion.java @@ -59,6 +59,7 @@ public enum SourceVersion { * 10: local-variable type inference (var) * 11: local-variable syntax for lambda parameters * 12: TBD + * 13: TBD */ /** @@ -183,7 +184,15 @@ public enum SourceVersion { * * @since 12 */ - RELEASE_12; + RELEASE_12, + + /** + * The version recognized by the Java Platform, Standard Edition + * 13. + * + * @since 13 + */ + RELEASE_13; // Note that when adding constants for newer releases, the // behavior of latest() and latestSupported() must be updated too. @@ -194,7 +203,7 @@ public enum SourceVersion { * @return the latest source version that can be modeled */ public static SourceVersion latest() { - return RELEASE_12; + return RELEASE_13; } private static final SourceVersion latestSupported = getLatestSupported(); @@ -204,6 +213,8 @@ private static SourceVersion getLatestSupported() { String specVersion = System.getProperty("java.specification.version"); switch (specVersion) { + case "13": + return RELEASE_13; case "12": return RELEASE_12; case "11": diff --git a/src/java.compiler/share/classes/javax/lang/model/util/AbstractAnnotationValueVisitor9.java b/src/java.compiler/share/classes/javax/lang/model/util/AbstractAnnotationValueVisitor9.java index 7bd239bdb782..da18c3fc82e8 100644 --- a/src/java.compiler/share/classes/javax/lang/model/util/AbstractAnnotationValueVisitor9.java +++ b/src/java.compiler/share/classes/javax/lang/model/util/AbstractAnnotationValueVisitor9.java @@ -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_12 RELEASE_12}. + * RELEASE_9} through {@link SourceVersion#RELEASE_13 RELEASE_13}. * *

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_12) +@SupportedSourceVersion(RELEASE_13) public abstract class AbstractAnnotationValueVisitor9 extends AbstractAnnotationValueVisitor8 { /** diff --git a/src/java.compiler/share/classes/javax/lang/model/util/AbstractElementVisitor9.java b/src/java.compiler/share/classes/javax/lang/model/util/AbstractElementVisitor9.java index f5d69c227bce..d8d5df0b6057 100644 --- a/src/java.compiler/share/classes/javax/lang/model/util/AbstractElementVisitor9.java +++ b/src/java.compiler/share/classes/javax/lang/model/util/AbstractElementVisitor9.java @@ -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_12 RELEASE_12}. + * RELEASE_9} through {@link SourceVersion#RELEASE_13 RELEASE_13}. * *

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_12) +@SupportedSourceVersion(RELEASE_13) public abstract class AbstractElementVisitor9 extends AbstractElementVisitor8 { /** * Constructor for concrete subclasses to call. diff --git a/src/java.compiler/share/classes/javax/lang/model/util/AbstractTypeVisitor9.java b/src/java.compiler/share/classes/javax/lang/model/util/AbstractTypeVisitor9.java index 65d6c2097031..a85ec879bd8f 100644 --- a/src/java.compiler/share/classes/javax/lang/model/util/AbstractTypeVisitor9.java +++ b/src/java.compiler/share/classes/javax/lang/model/util/AbstractTypeVisitor9.java @@ -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_12 RELEASE_12}. + * {@link SourceVersion#RELEASE_13 RELEASE_13}. * *

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_12) +@SupportedSourceVersion(RELEASE_13) public abstract class AbstractTypeVisitor9 extends AbstractTypeVisitor8 { /** * Constructor for concrete subclasses to call. diff --git a/src/java.compiler/share/classes/javax/lang/model/util/ElementKindVisitor9.java b/src/java.compiler/share/classes/javax/lang/model/util/ElementKindVisitor9.java index 5b209645c377..02a74d9e4e20 100644 --- a/src/java.compiler/share/classes/javax/lang/model/util/ElementKindVisitor9.java +++ b/src/java.compiler/share/classes/javax/lang/model/util/ElementKindVisitor9.java @@ -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_12 RELEASE_12}. + * SourceVersion#RELEASE_13 RELEASE_13}. * * For {@linkplain * Element elements} Xyz that may have more than one @@ -80,7 +80,7 @@ * @since 9 * @spec JPMS */ -@SupportedSourceVersion(RELEASE_12) +@SupportedSourceVersion(RELEASE_13) public class ElementKindVisitor9 extends ElementKindVisitor8 { /** * Constructor for concrete subclasses; uses {@code null} for the diff --git a/src/java.compiler/share/classes/javax/lang/model/util/ElementScanner9.java b/src/java.compiler/share/classes/javax/lang/model/util/ElementScanner9.java index 3a1ecc5a9c99..a399e3a2702a 100644 --- a/src/java.compiler/share/classes/javax/lang/model/util/ElementScanner9.java +++ b/src/java.compiler/share/classes/javax/lang/model/util/ElementScanner9.java @@ -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_12 RELEASE_12}. + * RELEASE_9} through {@link SourceVersion#RELEASE_13 RELEASE_13}. * * 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_12) +@SupportedSourceVersion(RELEASE_13) public class ElementScanner9 extends ElementScanner8 { /** * Constructor for concrete subclasses; uses {@code null} for the diff --git a/src/java.compiler/share/classes/javax/lang/model/util/SimpleAnnotationValueVisitor9.java b/src/java.compiler/share/classes/javax/lang/model/util/SimpleAnnotationValueVisitor9.java index 0bfb7f310419..ca1fabea66f9 100644 --- a/src/java.compiler/share/classes/javax/lang/model/util/SimpleAnnotationValueVisitor9.java +++ b/src/java.compiler/share/classes/javax/lang/model/util/SimpleAnnotationValueVisitor9.java @@ -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_12 RELEASE_12}. + * RELEASE_9} through {@link SourceVersion#RELEASE_13 RELEASE_13}. * * Visit methods call {@link #defaultAction * defaultAction} passing their arguments to {@code defaultAction}'s @@ -68,7 +68,7 @@ * @see SimpleAnnotationValueVisitor8 * @since 9 */ -@SupportedSourceVersion(RELEASE_12) +@SupportedSourceVersion(RELEASE_13) public class SimpleAnnotationValueVisitor9 extends SimpleAnnotationValueVisitor8 { /** * Constructor for concrete subclasses; uses {@code null} for the diff --git a/src/java.compiler/share/classes/javax/lang/model/util/SimpleElementVisitor9.java b/src/java.compiler/share/classes/javax/lang/model/util/SimpleElementVisitor9.java index 8228addc15e3..2d9218603fac 100644 --- a/src/java.compiler/share/classes/javax/lang/model/util/SimpleElementVisitor9.java +++ b/src/java.compiler/share/classes/javax/lang/model/util/SimpleElementVisitor9.java @@ -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_12 RELEASE_12}. + * RELEASE_9} through {@link SourceVersion#RELEASE_13 RELEASE_13}. * * 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_12) +@SupportedSourceVersion(RELEASE_13) public class SimpleElementVisitor9 extends SimpleElementVisitor8 { /** * Constructor for concrete subclasses; uses {@code null} for the diff --git a/src/java.compiler/share/classes/javax/lang/model/util/SimpleTypeVisitor9.java b/src/java.compiler/share/classes/javax/lang/model/util/SimpleTypeVisitor9.java index 8420e20a8002..b1e719747b31 100644 --- a/src/java.compiler/share/classes/javax/lang/model/util/SimpleTypeVisitor9.java +++ b/src/java.compiler/share/classes/javax/lang/model/util/SimpleTypeVisitor9.java @@ -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_12 RELEASE_12}. + * {@link SourceVersion#RELEASE_13 RELEASE_13}. * * 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_12) +@SupportedSourceVersion(RELEASE_13) public class SimpleTypeVisitor9 extends SimpleTypeVisitor8 { /** * Constructor for concrete subclasses; uses {@code null} for the diff --git a/src/java.compiler/share/classes/javax/lang/model/util/TypeKindVisitor9.java b/src/java.compiler/share/classes/javax/lang/model/util/TypeKindVisitor9.java index e0c55a85e5b6..83f91cb32da5 100644 --- a/src/java.compiler/share/classes/javax/lang/model/util/TypeKindVisitor9.java +++ b/src/java.compiler/share/classes/javax/lang/model/util/TypeKindVisitor9.java @@ -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_12 RELEASE_12}. + * SourceVersion#RELEASE_13 RELEASE_13}. * * For {@linkplain * TypeMirror types} Xyz that may have more than one @@ -77,7 +77,7 @@ * @see TypeKindVisitor8 * @since 9 */ -@SupportedSourceVersion(RELEASE_12) +@SupportedSourceVersion(RELEASE_13) public class TypeKindVisitor9 extends TypeKindVisitor8 { /** * Constructor for concrete subclasses to call; uses {@code null} diff --git a/src/jdk.compiler/share/classes/com/sun/tools/javac/code/Source.java b/src/jdk.compiler/share/classes/com/sun/tools/javac/code/Source.java index 269b6f6e63ab..9832f7312004 100644 --- a/src/jdk.compiler/share/classes/com/sun/tools/javac/code/Source.java +++ b/src/jdk.compiler/share/classes/com/sun/tools/javac/code/Source.java @@ -85,7 +85,10 @@ public enum Source { JDK11("11"), /** 12 covers the to be determined language features that will be added in JDK 12. */ - JDK12("12"); + JDK12("12"), + + /** 13 covers the to be determined language features that will be added in JDK 13. */ + JDK13("13"); private static final Context.Key sourceKey = new Context.Key<>(); @@ -136,6 +139,7 @@ public boolean isSupported() { } public Target requiredTarget() { + if (this.compareTo(JDK13) >= 0) return Target.JDK1_13; 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; @@ -182,10 +186,10 @@ public enum Feature { LOCAL_VARIABLE_TYPE_INFERENCE(JDK10), VAR_SYNTAX_IMPLICIT_LAMBDAS(JDK11, Fragments.FeatureVarSyntaxInImplicitLambda, DiagKind.PLURAL), IMPORT_ON_DEMAND_OBSERVABLE_PACKAGES(JDK1_2, JDK8), - SWITCH_MULTIPLE_CASE_LABELS(JDK12, Fragments.FeatureMultipleCaseLabels, DiagKind.PLURAL), - SWITCH_RULE(JDK12, Fragments.FeatureSwitchRules, DiagKind.PLURAL), - SWITCH_EXPRESSION(JDK12, Fragments.FeatureSwitchExpressions, DiagKind.PLURAL), - RAW_STRING_LITERALS(JDK12, Fragments.FeatureRawStringLiterals, DiagKind.PLURAL); + SWITCH_MULTIPLE_CASE_LABELS(JDK13, Fragments.FeatureMultipleCaseLabels, DiagKind.PLURAL), + SWITCH_RULE(JDK13, Fragments.FeatureSwitchRules, DiagKind.PLURAL), + SWITCH_EXPRESSION(JDK13, Fragments.FeatureSwitchExpressions, DiagKind.PLURAL), + RAW_STRING_LITERALS(JDK13, Fragments.FeatureRawStringLiterals, DiagKind.PLURAL); enum DiagKind { NORMAL, @@ -270,6 +274,8 @@ public static SourceVersion toSourceVersion(Source source) { return RELEASE_11; case JDK12: return RELEASE_12; + case JDK13: + return RELEASE_13; default: return null; } diff --git a/src/jdk.compiler/share/classes/com/sun/tools/javac/jvm/ClassFile.java b/src/jdk.compiler/share/classes/com/sun/tools/javac/jvm/ClassFile.java index a8b5774baf91..4897902d3de6 100644 --- a/src/jdk.compiler/share/classes/com/sun/tools/javac/jvm/ClassFile.java +++ b/src/jdk.compiler/share/classes/com/sun/tools/javac/jvm/ClassFile.java @@ -116,7 +116,8 @@ public enum Version { V53(53, 0), // JDK 1.9: modules, indy string concat V54(54, 0), // JDK 10 V55(55, 0), // JDK 11: constant dynamic, nest mates - V56(56, 0); // JDK 12 + V56(56, 0), // JDK 12 + V57(57, 0); // JDK 13 Version(int major, int minor) { this.major = major; this.minor = minor; diff --git a/src/jdk.compiler/share/classes/com/sun/tools/javac/jvm/Profile.java b/src/jdk.compiler/share/classes/com/sun/tools/javac/jvm/Profile.java index 69bb38125ef0..f0c41348705d 100644 --- a/src/jdk.compiler/share/classes/com/sun/tools/javac/jvm/Profile.java +++ b/src/jdk.compiler/share/classes/com/sun/tools/javac/jvm/Profile.java @@ -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, 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), + COMPACT1("compact1", 1, Target.JDK1_8, Target.JDK1_9, Target.JDK1_10, Target.JDK1_11, Target.JDK1_12, Target.JDK1_13), + COMPACT2("compact2", 2, Target.JDK1_8, Target.JDK1_9, Target.JDK1_10, Target.JDK1_11, Target.JDK1_12, Target.JDK1_13), + COMPACT3("compact3", 3, Target.JDK1_8, Target.JDK1_9, Target.JDK1_10, Target.JDK1_11, Target.JDK1_12, Target.JDK1_13), DEFAULT { @Override diff --git a/src/jdk.compiler/share/classes/com/sun/tools/javac/jvm/Target.java b/src/jdk.compiler/share/classes/com/sun/tools/javac/jvm/Target.java index 50ce888ea0df..c5bd79811c4c 100644 --- a/src/jdk.compiler/share/classes/com/sun/tools/javac/jvm/Target.java +++ b/src/jdk.compiler/share/classes/com/sun/tools/javac/jvm/Target.java @@ -70,7 +70,10 @@ public enum Target { JDK1_11("11", 55, 0), /** JDK 12. */ - JDK1_12("12", 56, 0); + JDK1_12("12", 56, 0), + + /** JDK 13. */ + JDK1_13("13", 57, 0); private static final Context.Key targetKey = new Context.Key<>(); diff --git a/src/jdk.compiler/share/classes/com/sun/tools/javac/processing/PrintingProcessor.java b/src/jdk.compiler/share/classes/com/sun/tools/javac/processing/PrintingProcessor.java index b26e6cf52bb9..dd12d26f94bd 100644 --- a/src/jdk.compiler/share/classes/com/sun/tools/javac/processing/PrintingProcessor.java +++ b/src/jdk.compiler/share/classes/com/sun/tools/javac/processing/PrintingProcessor.java @@ -55,7 +55,7 @@ * deletion without notice. */ @SupportedAnnotationTypes("*") -@SupportedSourceVersion(SourceVersion.RELEASE_12) +@SupportedSourceVersion(SourceVersion.RELEASE_13) public class PrintingProcessor extends AbstractProcessor { PrintWriter writer; diff --git a/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.replacements/src/org/graalvm/compiler/replacements/classfile/Classfile.java b/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.replacements/src/org/graalvm/compiler/replacements/classfile/Classfile.java index cfafa7de5c98..a671c6ef9e61 100644 --- a/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.replacements/src/org/graalvm/compiler/replacements/classfile/Classfile.java +++ b/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.replacements/src/org/graalvm/compiler/replacements/classfile/Classfile.java @@ -49,7 +49,7 @@ public class Classfile { private final List codeAttributes; private static final int MAJOR_VERSION_JAVA_MIN = 51; // JDK7 - private static final int MAJOR_VERSION_JAVA_MAX = 56; // JDK12 + private static final int MAJOR_VERSION_JAVA_MAX = 57; // JDK13 private static final int MAGIC = 0xCAFEBABE; /** diff --git a/src/jdk.jdeps/share/classes/com/sun/tools/jdeprscan/Main.java b/src/jdk.jdeps/share/classes/com/sun/tools/jdeprscan/Main.java index d46034664896..7fc54ae9e4a4 100644 --- a/src/jdk.jdeps/share/classes/com/sun/tools/jdeprscan/Main.java +++ b/src/jdk.jdeps/share/classes/com/sun/tools/jdeprscan/Main.java @@ -106,7 +106,7 @@ public class Main implements DiagnosticListener { // 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", "12"); + final Set releasesWithForRemoval = Set.of("9", "10", "11", "12", "13"); final Set validReleases; { diff --git a/src/jdk.rmic/share/classes/sun/tools/java/RuntimeConstants.java b/src/jdk.rmic/share/classes/sun/tools/java/RuntimeConstants.java index 851e823713b9..f6856ba708a7 100644 --- a/src/jdk.rmic/share/classes/sun/tools/java/RuntimeConstants.java +++ b/src/jdk.rmic/share/classes/sun/tools/java/RuntimeConstants.java @@ -67,7 +67,7 @@ public interface RuntimeConstants { /* Class File Constants */ int JAVA_MAGIC = 0xcafebabe; int JAVA_MIN_SUPPORTED_VERSION = 45; - int JAVA_MAX_SUPPORTED_VERSION = 56; + int JAVA_MAX_SUPPORTED_VERSION = 57; int JAVA_MAX_SUPPORTED_MINOR_VERSION = 0; /* Generate class file version for 1.1 by default */ diff --git a/test/jaxp/TEST.ROOT b/test/jaxp/TEST.ROOT index 6414d1335bfa..e9525b912b36 100644 --- a/test/jaxp/TEST.ROOT +++ b/test/jaxp/TEST.ROOT @@ -23,7 +23,7 @@ modules=java.xml groups=TEST.groups # Minimum jtreg version -requiredVersion=4.2 b12 +requiredVersion=4.2 b13 # Path to libraries in the topmost test directory. This is needed so @library # does not need ../../ notation to reach them diff --git a/test/jdk/TEST.ROOT b/test/jdk/TEST.ROOT index 588dec4e8f85..15be645fbf42 100644 --- a/test/jdk/TEST.ROOT +++ b/test/jdk/TEST.ROOT @@ -49,7 +49,7 @@ requires.properties= \ release.implementor # Minimum jtreg version -requiredVersion=4.2 b12 +requiredVersion=4.2 b13 # Path to libraries in the topmost test directory. This is needed so @library # does not need ../../ notation to reach them diff --git a/test/jdk/java/lang/module/ClassFileVersionsTest.java b/test/jdk/java/lang/module/ClassFileVersionsTest.java index e0fa0214023f..7b6e606eaaba 100644 --- a/test/jdk/java/lang/module/ClassFileVersionsTest.java +++ b/test/jdk/java/lang/module/ClassFileVersionsTest.java @@ -56,6 +56,7 @@ public Object[][] supported() { { 54, 0, Set.of() }, // JDK 10 { 55, 0, Set.of() }, // JDK 11 { 56, 0, Set.of() }, // JDK 12 + { 57, 0, Set.of() }, // JDK 13 }; } @@ -79,7 +80,11 @@ public Object[][] unsupported() { { 56, 0, Set.of(TRANSITIVE) }, { 56, 0, Set.of(STATIC, TRANSITIVE) }, - { 57, 0, Set.of()}, // JDK 13 + { 57, 0, Set.of(STATIC) }, // JDK 13 + { 57, 0, Set.of(TRANSITIVE) }, + { 57, 0, Set.of(STATIC, TRANSITIVE) }, + + { 58, 0, Set.of()}, // JDK 14 }; } diff --git a/test/langtools/TEST.ROOT b/test/langtools/TEST.ROOT index e1170445b255..f9dcfd9e360e 100644 --- a/test/langtools/TEST.ROOT +++ b/test/langtools/TEST.ROOT @@ -15,7 +15,7 @@ keys=intermittent randomness groups=TEST.groups # Minimum jtreg version -requiredVersion=4.2 b12 +requiredVersion=4.2 b13 # Use new module options useNewOptions=true diff --git a/test/langtools/tools/javac/6330997/T6330997.java b/test/langtools/tools/javac/6330997/T6330997.java index ee79299f9c17..297d448c24e7 100644 --- a/test/langtools/tools/javac/6330997/T6330997.java +++ b/test/langtools/tools/javac/6330997/T6330997.java @@ -32,8 +32,8 @@ * jdk.compiler/com.sun.tools.javac.main * jdk.compiler/com.sun.tools.javac.util * @clean T1 T2 - * @compile -source 11 -target 12 T1.java - * @compile -source 11 -target 12 T2.java + * @compile -source 12 -target 13 T1.java + * @compile -source 12 -target 13 T2.java * @run main/othervm T6330997 */ diff --git a/test/langtools/tools/javac/ConditionalWithVoid.java b/test/langtools/tools/javac/ConditionalWithVoid.java index 50e0aa2c9e28..93a918d1c1cf 100644 --- a/test/langtools/tools/javac/ConditionalWithVoid.java +++ b/test/langtools/tools/javac/ConditionalWithVoid.java @@ -4,7 +4,7 @@ * @summary The compiler was allowing void types in its parsing of conditional expressions. * @author tball * - * @compile/fail/ref=ConditionalWithVoid.out --enable-preview -source 12 -XDrawDiagnostics ConditionalWithVoid.java + * @compile/fail/ref=ConditionalWithVoid.out --enable-preview -source 13 -XDrawDiagnostics ConditionalWithVoid.java */ public class ConditionalWithVoid { public void test(Object o, String s) { diff --git a/test/langtools/tools/javac/RawStringLiteralLang.java b/test/langtools/tools/javac/RawStringLiteralLang.java index c142182dd45b..3589095b82e2 100644 --- a/test/langtools/tools/javac/RawStringLiteralLang.java +++ b/test/langtools/tools/javac/RawStringLiteralLang.java @@ -24,7 +24,7 @@ /* * @test * @summary Unit tests for Raw String Literal language changes - * @compile --enable-preview -source 12 -encoding utf8 RawStringLiteralLang.java + * @compile --enable-preview -source 13 -encoding utf8 RawStringLiteralLang.java * @run main/othervm --enable-preview RawStringLiteralLang */ diff --git a/test/langtools/tools/javac/RawStringLiteralLangAPI.java b/test/langtools/tools/javac/RawStringLiteralLangAPI.java index 0dcee4cc273f..7707525c49f8 100644 --- a/test/langtools/tools/javac/RawStringLiteralLangAPI.java +++ b/test/langtools/tools/javac/RawStringLiteralLangAPI.java @@ -130,7 +130,7 @@ static void test4() { new JavacTask(TOOLBOX) .sources(code) .classpath(".") - .options("--enable-preview", "-source", "12") + .options("--enable-preview", "-source", "13") .run(); String output = new JavaTask(TOOLBOX) .vmOptions("--enable-preview") @@ -153,7 +153,7 @@ static void compPass(String source) { String output = new JavacTask(TOOLBOX) .sources(source) .classpath(".") - .options("--enable-preview", "-source", "12", "-encoding", "utf8") + .options("--enable-preview", "-source", "13", "-encoding", "utf8") .run() .writeAll() .getOutput(Task.OutputKind.DIRECT); @@ -170,7 +170,7 @@ static void compFail(String source) { String errors = new JavacTask(TOOLBOX) .sources(source) .classpath(".") - .options("-XDrawDiagnostics", "--enable-preview", "-source", "12", "-encoding", "utf8") + .options("-XDrawDiagnostics", "--enable-preview", "-source", "13", "-encoding", "utf8") .run(Task.Expect.FAIL) .writeAll() .getOutput(Task.OutputKind.DIRECT); diff --git a/test/langtools/tools/javac/api/T6395981.java b/test/langtools/tools/javac/api/T6395981.java index 60b63dba3a66..60c4526dcd96 100644 --- a/test/langtools/tools/javac/api/T6395981.java +++ b/test/langtools/tools/javac/api/T6395981.java @@ -23,7 +23,7 @@ /* * @test - * @bug 6395981 6458819 7025784 8028543 8028544 8193291 8193292 8193292 + * @bug 6395981 6458819 7025784 8028543 8028544 8193291 8193292 8193292 8205393 * @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 RELEASE_12 + * @run main T6395981 RELEASE_3 RELEASE_4 RELEASE_5 RELEASE_6 RELEASE_7 RELEASE_8 RELEASE_9 RELEASE_10 RELEASE_11 RELEASE_12 RELEASE_13 */ import java.util.EnumSet; diff --git a/test/langtools/tools/javac/classfiles/ClassVersionChecker.java b/test/langtools/tools/javac/classfiles/ClassVersionChecker.java index e17bdc079f00..346441c9e6f1 100644 --- a/test/langtools/tools/javac/classfiles/ClassVersionChecker.java +++ b/test/langtools/tools/javac/classfiles/ClassVersionChecker.java @@ -47,7 +47,8 @@ private static enum Version { NINE("9", 53), TEN("10", 54), ELEVEN("11", 55), - TWELVE("12", 56); + TWELVE("12", 56), + THIRTEEN("13", 57); private Version(String release, int classFileVer) { this.release = release; diff --git a/test/langtools/tools/javac/diags/examples/BreakAmbiguousTarget.java b/test/langtools/tools/javac/diags/examples/BreakAmbiguousTarget.java index f5c63912eef7..c28960a8fbb2 100644 --- a/test/langtools/tools/javac/diags/examples/BreakAmbiguousTarget.java +++ b/test/langtools/tools/javac/diags/examples/BreakAmbiguousTarget.java @@ -24,7 +24,7 @@ // key: compiler.err.break.ambiguous.target // key: compiler.note.preview.filename // key: compiler.note.preview.recompile -// options: --enable-preview -source 12 +// options: --enable-preview -source 13 class BreakAmbiguousTarget { void m(int i, int j) { diff --git a/test/langtools/tools/javac/diags/examples/BreakExprNotImmediate.java b/test/langtools/tools/javac/diags/examples/BreakExprNotImmediate.java index a7e29e64c029..0eb1ab3799e8 100644 --- a/test/langtools/tools/javac/diags/examples/BreakExprNotImmediate.java +++ b/test/langtools/tools/javac/diags/examples/BreakExprNotImmediate.java @@ -33,7 +33,7 @@ // key: compiler.note.preview.filename // key: compiler.note.preview.recompile // key: compiler.note.note -// options: --enable-preview -source 12 +// options: --enable-preview -source 13 // run: backdoor class BreakExprNotImmediate { diff --git a/test/langtools/tools/javac/diags/examples/BreakMissingValue.java b/test/langtools/tools/javac/diags/examples/BreakMissingValue.java index 36346ccd2bdd..0ea668ba305c 100644 --- a/test/langtools/tools/javac/diags/examples/BreakMissingValue.java +++ b/test/langtools/tools/javac/diags/examples/BreakMissingValue.java @@ -24,7 +24,7 @@ // key: compiler.err.break.missing.value // key: compiler.note.preview.filename // key: compiler.note.preview.recompile -// options: --enable-preview -source 12 +// options: --enable-preview -source 13 class BreakMissingValue { int t(int i) { diff --git a/test/langtools/tools/javac/diags/examples/BreakOutsideSwitchExpression.java b/test/langtools/tools/javac/diags/examples/BreakOutsideSwitchExpression.java index 3012e9008422..f980c5e47200 100644 --- a/test/langtools/tools/javac/diags/examples/BreakOutsideSwitchExpression.java +++ b/test/langtools/tools/javac/diags/examples/BreakOutsideSwitchExpression.java @@ -24,7 +24,7 @@ // key: compiler.err.break.outside.switch.expression // key: compiler.note.preview.filename // key: compiler.note.preview.recompile -// options: --enable-preview -source 12 +// options: --enable-preview -source 13 class BreakOutsideSwitchExpression { int t(int i) { diff --git a/test/langtools/tools/javac/diags/examples/ContinueOutsideSwitchExpression.java b/test/langtools/tools/javac/diags/examples/ContinueOutsideSwitchExpression.java index 6cd8738c6261..f5d1d278dcc0 100644 --- a/test/langtools/tools/javac/diags/examples/ContinueOutsideSwitchExpression.java +++ b/test/langtools/tools/javac/diags/examples/ContinueOutsideSwitchExpression.java @@ -24,7 +24,7 @@ // key: compiler.err.continue.outside.switch.expression // key: compiler.note.preview.filename // key: compiler.note.preview.recompile -// options: --enable-preview -source 12 +// options: --enable-preview -source 13 class ContinueOutsideSwitchExpression { int t(int i) { diff --git a/test/langtools/tools/javac/diags/examples/IncompatibleTypesInSwitchExpression.java b/test/langtools/tools/javac/diags/examples/IncompatibleTypesInSwitchExpression.java index d182a36d21f3..bba166c3eb10 100644 --- a/test/langtools/tools/javac/diags/examples/IncompatibleTypesInSwitchExpression.java +++ b/test/langtools/tools/javac/diags/examples/IncompatibleTypesInSwitchExpression.java @@ -26,7 +26,7 @@ // key: compiler.misc.inconvertible.types // key: compiler.note.preview.filename // key: compiler.note.preview.recompile -// options: --enable-preview -source 12 +// options: --enable-preview -source 13 class IncompatibleTypesInSwitchExpression { diff --git a/test/langtools/tools/javac/diags/examples/MultipleCaseLabels.java b/test/langtools/tools/javac/diags/examples/MultipleCaseLabels.java index 469bf03f137e..0db0884115c1 100644 --- a/test/langtools/tools/javac/diags/examples/MultipleCaseLabels.java +++ b/test/langtools/tools/javac/diags/examples/MultipleCaseLabels.java @@ -23,7 +23,7 @@ // key: compiler.misc.feature.multiple.case.labels // key: compiler.warn.preview.feature.use.plural -// options: --enable-preview -source 12 -Xlint:preview +// options: --enable-preview -source 13 -Xlint:preview class MultipleCaseLabels { void m(int i) { diff --git a/test/langtools/tools/javac/diags/examples/NotExhaustive.java b/test/langtools/tools/javac/diags/examples/NotExhaustive.java index 008bffbeb77c..846bc9cdeb55 100644 --- a/test/langtools/tools/javac/diags/examples/NotExhaustive.java +++ b/test/langtools/tools/javac/diags/examples/NotExhaustive.java @@ -24,7 +24,7 @@ // key: compiler.err.not.exhaustive // key: compiler.note.preview.filename // key: compiler.note.preview.recompile -// options: --enable-preview -source 12 +// options: --enable-preview -source 13 class NotExhaustive { int t(int i) { diff --git a/test/langtools/tools/javac/diags/examples/PreviewFeatureUse.java b/test/langtools/tools/javac/diags/examples/PreviewFeatureUse.java index c1d669d4c816..3dbb2270c4e6 100644 --- a/test/langtools/tools/javac/diags/examples/PreviewFeatureUse.java +++ b/test/langtools/tools/javac/diags/examples/PreviewFeatureUse.java @@ -25,7 +25,7 @@ //key: compiler.warn.preview.feature.use.plural //key: compiler.misc.feature.diamond //key: compiler.misc.feature.lambda -//options: -Xlint:preview -XDforcePreview -source 12 --enable-preview +//options: -Xlint:preview -XDforcePreview -source 13 --enable-preview import java.util.ArrayList; diff --git a/test/langtools/tools/javac/diags/examples/PreviewFilename.java b/test/langtools/tools/javac/diags/examples/PreviewFilename.java index cb112127942d..04edcdf87155 100644 --- a/test/langtools/tools/javac/diags/examples/PreviewFilename.java +++ b/test/langtools/tools/javac/diags/examples/PreviewFilename.java @@ -23,7 +23,7 @@ // key: compiler.note.preview.filename // key: compiler.note.preview.recompile -// options: -XDforcePreview -source 12 --enable-preview +// options: -XDforcePreview -source 13 --enable-preview import java.util.ArrayList; import java.util.List; diff --git a/test/langtools/tools/javac/diags/examples/PreviewFilenameAdditional.java b/test/langtools/tools/javac/diags/examples/PreviewFilenameAdditional.java index 98b9bce94cbf..3d5430de3893 100644 --- a/test/langtools/tools/javac/diags/examples/PreviewFilenameAdditional.java +++ b/test/langtools/tools/javac/diags/examples/PreviewFilenameAdditional.java @@ -24,7 +24,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 12 --enable-preview +// options: -Xlint:preview -Xmaxwarns 1 -XDforcePreview -source 13 --enable-preview import java.util.ArrayList; diff --git a/test/langtools/tools/javac/diags/examples/PreviewPlural/PreviewPlural.java b/test/langtools/tools/javac/diags/examples/PreviewPlural/PreviewPlural.java index 43d46cf4b5a3..e9b92af8ded9 100644 --- a/test/langtools/tools/javac/diags/examples/PreviewPlural/PreviewPlural.java +++ b/test/langtools/tools/javac/diags/examples/PreviewPlural/PreviewPlural.java @@ -23,7 +23,7 @@ // key: compiler.note.preview.plural // key: compiler.note.preview.recompile -// options: -XDforcePreview -source 12 --enable-preview +// options: -XDforcePreview -source 13 --enable-preview import java.util.ArrayList; diff --git a/test/langtools/tools/javac/diags/examples/RawStringLiteral.java b/test/langtools/tools/javac/diags/examples/RawStringLiteral.java index f6b7b23b22f7..287d6ff7e59b 100644 --- a/test/langtools/tools/javac/diags/examples/RawStringLiteral.java +++ b/test/langtools/tools/javac/diags/examples/RawStringLiteral.java @@ -24,7 +24,7 @@ // key: compiler.err.unicode.backtick // key: compiler.misc.feature.raw.string.literals // key: compiler.warn.preview.feature.use.plural -// options: --enable-preview -source 12 -Xlint:preview +// options: --enable-preview -source 13 -Xlint:preview class RawStringLiteral { String m() { diff --git a/test/langtools/tools/javac/diags/examples/ReturnOutsideSwitchExpression.java b/test/langtools/tools/javac/diags/examples/ReturnOutsideSwitchExpression.java index 44cda3106275..9811287efc95 100644 --- a/test/langtools/tools/javac/diags/examples/ReturnOutsideSwitchExpression.java +++ b/test/langtools/tools/javac/diags/examples/ReturnOutsideSwitchExpression.java @@ -24,7 +24,7 @@ // key: compiler.err.return.outside.switch.expression // key: compiler.note.preview.filename // key: compiler.note.preview.recompile -// options: --enable-preview -source 12 +// options: --enable-preview -source 13 class ReturnOutsideSwitchExpression { int t(int i) { diff --git a/test/langtools/tools/javac/diags/examples/RuleCompletesNormally.java b/test/langtools/tools/javac/diags/examples/RuleCompletesNormally.java index 65d600c314a5..bb876ac9de2c 100644 --- a/test/langtools/tools/javac/diags/examples/RuleCompletesNormally.java +++ b/test/langtools/tools/javac/diags/examples/RuleCompletesNormally.java @@ -24,7 +24,7 @@ // key: compiler.err.rule.completes.normally // key: compiler.note.preview.filename // key: compiler.note.preview.recompile -// options: --enable-preview -source 12 +// options: --enable-preview -source 13 class RuleCompletesNormally { public String convert(int i) { diff --git a/test/langtools/tools/javac/diags/examples/SwitchCaseUnexpectedStatement.java b/test/langtools/tools/javac/diags/examples/SwitchCaseUnexpectedStatement.java index b21f83513127..d3509b0756bd 100644 --- a/test/langtools/tools/javac/diags/examples/SwitchCaseUnexpectedStatement.java +++ b/test/langtools/tools/javac/diags/examples/SwitchCaseUnexpectedStatement.java @@ -24,7 +24,7 @@ // key: compiler.err.switch.case.unexpected.statement // key: compiler.note.preview.filename // key: compiler.note.preview.recompile -// options: --enable-preview -source 12 +// options: --enable-preview -source 13 class ReturnOutsideSwitchExpression { void t(int i) { diff --git a/test/langtools/tools/javac/diags/examples/SwitchExpressionCompletesNormally.java b/test/langtools/tools/javac/diags/examples/SwitchExpressionCompletesNormally.java index 607aa2bb2771..f3fef28165a8 100644 --- a/test/langtools/tools/javac/diags/examples/SwitchExpressionCompletesNormally.java +++ b/test/langtools/tools/javac/diags/examples/SwitchExpressionCompletesNormally.java @@ -24,7 +24,7 @@ // key: compiler.err.switch.expression.completes.normally // key: compiler.note.preview.filename // key: compiler.note.preview.recompile -// options: --enable-preview -source 12 +// options: --enable-preview -source 13 class SwitchExpressionCompletesNormally { public String convert(int i) { diff --git a/test/langtools/tools/javac/diags/examples/SwitchExpressionEmpty.java b/test/langtools/tools/javac/diags/examples/SwitchExpressionEmpty.java index baa0d72d1059..61c1d43cc049 100644 --- a/test/langtools/tools/javac/diags/examples/SwitchExpressionEmpty.java +++ b/test/langtools/tools/javac/diags/examples/SwitchExpressionEmpty.java @@ -24,7 +24,7 @@ // key: compiler.err.switch.expression.empty // key: compiler.note.preview.filename // key: compiler.note.preview.recompile -// options: --enable-preview -source 12 +// options: --enable-preview -source 13 class BreakOutsideSwitchExpression { String t(E e) { diff --git a/test/langtools/tools/javac/diags/examples/SwitchExpressionTargetCantBeVoid.java b/test/langtools/tools/javac/diags/examples/SwitchExpressionTargetCantBeVoid.java index daaaa6c579d9..96a52cdcf874 100644 --- a/test/langtools/tools/javac/diags/examples/SwitchExpressionTargetCantBeVoid.java +++ b/test/langtools/tools/javac/diags/examples/SwitchExpressionTargetCantBeVoid.java @@ -26,7 +26,7 @@ // key: compiler.misc.switch.expression.target.cant.be.void // key: compiler.note.preview.filename // key: compiler.note.preview.recompile -// options: --enable-preview -source 12 +// options: --enable-preview -source 13 class SwitchExpressionTargetCantBeVoid { diff --git a/test/langtools/tools/javac/diags/examples/SwitchExpressions.java b/test/langtools/tools/javac/diags/examples/SwitchExpressions.java index a4a687748937..e386b651bd0b 100644 --- a/test/langtools/tools/javac/diags/examples/SwitchExpressions.java +++ b/test/langtools/tools/javac/diags/examples/SwitchExpressions.java @@ -23,7 +23,7 @@ // key: compiler.misc.feature.switch.expressions // key: compiler.warn.preview.feature.use.plural -// options: --enable-preview -source 12 -Xlint:preview +// options: --enable-preview -source 13 -Xlint:preview class SwitchExpressions { int m(int i) { diff --git a/test/langtools/tools/javac/diags/examples/SwitchMixingCaseTypes.java b/test/langtools/tools/javac/diags/examples/SwitchMixingCaseTypes.java index 5326077aea85..dcfcbbf0fc45 100644 --- a/test/langtools/tools/javac/diags/examples/SwitchMixingCaseTypes.java +++ b/test/langtools/tools/javac/diags/examples/SwitchMixingCaseTypes.java @@ -24,7 +24,7 @@ // key: compiler.err.switch.mixing.case.types // key: compiler.note.preview.filename // key: compiler.note.preview.recompile -// options: --enable-preview -source 12 +// options: --enable-preview -source 13 class SwitchMixingCaseTypes { diff --git a/test/langtools/tools/javac/diags/examples/SwitchRules.java b/test/langtools/tools/javac/diags/examples/SwitchRules.java index b4e12d6d8b23..fe99b8366bd1 100644 --- a/test/langtools/tools/javac/diags/examples/SwitchRules.java +++ b/test/langtools/tools/javac/diags/examples/SwitchRules.java @@ -23,7 +23,7 @@ // key: compiler.misc.feature.switch.rules // key: compiler.warn.preview.feature.use.plural -// options: --enable-preview -source 12 -Xlint:preview +// options: --enable-preview -source 13 -Xlint:preview class SwitchExpressions { void m(int i) { diff --git a/test/langtools/tools/javac/expswitch/ExpSwitchNestingTest.java b/test/langtools/tools/javac/expswitch/ExpSwitchNestingTest.java index 9af46a3cce31..84270313db02 100644 --- a/test/langtools/tools/javac/expswitch/ExpSwitchNestingTest.java +++ b/test/langtools/tools/javac/expswitch/ExpSwitchNestingTest.java @@ -75,6 +75,8 @@ public void dumpTemplateIfError(ITestResult result) { } } + private static String[] PREVIEW_OPTIONS = {"--enable-preview", "-source", "13"}; + private void program(String... constructs) { String s = "class C { static boolean cond = false; static int x = 0; void m() { # } }"; for (String c : constructs) @@ -84,7 +86,7 @@ private void program(String... constructs) { private void assertOK(String... constructs) { reset(); - addCompileOptions("--enable-preview", "-source", "12"); + addCompileOptions(PREVIEW_OPTIONS); program(constructs); try { compile(); @@ -97,7 +99,7 @@ private void assertOK(String... constructs) { private void assertOKWithWarning(String warning, String... constructs) { reset(); - addCompileOptions("--enable-preview", "-source", "12"); + addCompileOptions(PREVIEW_OPTIONS); program(constructs); try { compile(); @@ -110,7 +112,7 @@ private void assertOKWithWarning(String warning, String... constructs) { private void assertFail(String expectedDiag, String... constructs) { reset(); - addCompileOptions("--enable-preview", "-source", "12"); + addCompileOptions(PREVIEW_OPTIONS); program(constructs); try { compile(); diff --git a/test/langtools/tools/javac/lambda/BadSwitchExpressionLambda.java b/test/langtools/tools/javac/lambda/BadSwitchExpressionLambda.java index 3a1bd06f67f1..14fe01726d70 100644 --- a/test/langtools/tools/javac/lambda/BadSwitchExpressionLambda.java +++ b/test/langtools/tools/javac/lambda/BadSwitchExpressionLambda.java @@ -2,7 +2,7 @@ * @test /nodynamiccopyright/ * @bug 8206986 * @summary Adding switch expressions - * @compile/fail/ref=BadSwitchExpressionLambda.out -XDrawDiagnostics --enable-preview -source 12 BadSwitchExpressionLambda.java + * @compile/fail/ref=BadSwitchExpressionLambda.out -XDrawDiagnostics --enable-preview -source 13 BadSwitchExpressionLambda.java */ class BadSwitchExpressionLambda { diff --git a/test/langtools/tools/javac/lib/JavacTestingAbstractProcessor.java b/test/langtools/tools/javac/lib/JavacTestingAbstractProcessor.java index 59db96f45395..9e28eca56952 100644 --- a/test/langtools/tools/javac/lib/JavacTestingAbstractProcessor.java +++ b/test/langtools/tools/javac/lib/JavacTestingAbstractProcessor.java @@ -110,7 +110,7 @@ protected void addExports(String moduleName, String... packageNames) { * corresponding platform visitor type. */ - @SupportedSourceVersion(RELEASE_12) + @SupportedSourceVersion(RELEASE_13) public static abstract class AbstractAnnotationValueVisitor extends AbstractAnnotationValueVisitor9 { /** @@ -121,7 +121,7 @@ protected AbstractAnnotationValueVisitor() { } } - @SupportedSourceVersion(RELEASE_12) + @SupportedSourceVersion(RELEASE_13) public static abstract class AbstractElementVisitor extends AbstractElementVisitor9 { /** * Constructor for concrete subclasses to call. @@ -131,7 +131,7 @@ protected AbstractElementVisitor(){ } } - @SupportedSourceVersion(RELEASE_12) + @SupportedSourceVersion(RELEASE_13) public static abstract class AbstractTypeVisitor extends AbstractTypeVisitor9 { /** * Constructor for concrete subclasses to call. @@ -141,7 +141,7 @@ protected AbstractTypeVisitor() { } } - @SupportedSourceVersion(RELEASE_12) + @SupportedSourceVersion(RELEASE_13) public static class ElementKindVisitor extends ElementKindVisitor9 { /** * Constructor for concrete subclasses; uses {@code null} for the @@ -162,7 +162,7 @@ protected ElementKindVisitor(R defaultValue) { } } - @SupportedSourceVersion(RELEASE_12) + @SupportedSourceVersion(RELEASE_13) public static class ElementScanner extends ElementScanner9 { /** * Constructor for concrete subclasses; uses {@code null} for the @@ -181,7 +181,7 @@ protected ElementScanner(R defaultValue){ } } - @SupportedSourceVersion(RELEASE_12) + @SupportedSourceVersion(RELEASE_13) public static class SimpleAnnotationValueVisitor extends SimpleAnnotationValueVisitor9 { /** * Constructor for concrete subclasses; uses {@code null} for the @@ -202,7 +202,7 @@ protected SimpleAnnotationValueVisitor(R defaultValue) { } } - @SupportedSourceVersion(RELEASE_12) + @SupportedSourceVersion(RELEASE_13) public static class SimpleElementVisitor extends SimpleElementVisitor9 { /** * Constructor for concrete subclasses; uses {@code null} for the @@ -223,7 +223,7 @@ protected SimpleElementVisitor(R defaultValue){ } } - @SupportedSourceVersion(RELEASE_12) + @SupportedSourceVersion(RELEASE_13) public static class SimpleTypeVisitor extends SimpleTypeVisitor9 { /** * Constructor for concrete subclasses; uses {@code null} for the @@ -244,7 +244,7 @@ protected SimpleTypeVisitor(R defaultValue){ } } - @SupportedSourceVersion(RELEASE_12) + @SupportedSourceVersion(RELEASE_13) public static class TypeKindVisitor extends TypeKindVisitor9 { /** * Constructor for concrete subclasses to call; uses {@code null} diff --git a/test/langtools/tools/javac/parser/JavacParserTest.java b/test/langtools/tools/javac/parser/JavacParserTest.java index 8e7eddd2016e..6844282258f2 100644 --- a/test/langtools/tools/javac/parser/JavacParserTest.java +++ b/test/langtools/tools/javac/parser/JavacParserTest.java @@ -1096,7 +1096,7 @@ void testCaseBodyStatements() throws IOException { String expectedErrors = "Test.java:1:178: compiler.err.switch.case.unexpected.statement\n"; StringWriter out = new StringWriter(); JavacTaskImpl ct = (JavacTaskImpl) tool.getTask(out, fm, null, - Arrays.asList("-XDrawDiagnostics", "--enable-preview", "-source", "12"), + Arrays.asList("-XDrawDiagnostics", "--enable-preview", "-source", "13"), null, Arrays.asList(new MyFileObject(code))); CompilationUnitTree cut = ct.parse().iterator().next(); diff --git a/test/langtools/tools/javac/preview/classReaderTest/Client.java b/test/langtools/tools/javac/preview/classReaderTest/Client.java index e8a05ba89b51..4c1228870336 100644 --- a/test/langtools/tools/javac/preview/classReaderTest/Client.java +++ b/test/langtools/tools/javac/preview/classReaderTest/Client.java @@ -2,9 +2,9 @@ * @test /nodynamiccopyright/ * @bug 8199194 * @summary smoke test for --enabled-preview classreader support - * @compile -XDforcePreview --enable-preview -source 12 Bar.java + * @compile -XDforcePreview --enable-preview -source 13 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 12 Client.java + * @compile/fail/ref=Client.preview.out -Werror -Xlint:preview -XDrawDiagnostics --enable-preview -source 13 Client.java */ public class Client { diff --git a/test/langtools/tools/javac/preview/classReaderTest/Client.nopreview.out b/test/langtools/tools/javac/preview/classReaderTest/Client.nopreview.out index bd201c2ce542..05f9b25b3047 100644 --- a/test/langtools/tools/javac/preview/classReaderTest/Client.nopreview.out +++ b/test/langtools/tools/javac/preview/classReaderTest/Client.nopreview.out @@ -1,2 +1,2 @@ -- compiler.err.preview.feature.disabled.classfile: Bar.class, 12 +- compiler.err.preview.feature.disabled.classfile: Bar.class, 13 1 error diff --git a/test/langtools/tools/javac/preview/classReaderTest/Client.preview.out b/test/langtools/tools/javac/preview/classReaderTest/Client.preview.out index 2bfaffd4450f..d4c86919361a 100644 --- a/test/langtools/tools/javac/preview/classReaderTest/Client.preview.out +++ b/test/langtools/tools/javac/preview/classReaderTest/Client.preview.out @@ -1,4 +1,4 @@ -- compiler.warn.preview.feature.use.classfile: Bar.class, 12 +- compiler.warn.preview.feature.use.classfile: Bar.class, 13 - compiler.err.warnings.and.werror 1 error 1 warning diff --git a/test/langtools/tools/javac/profiles/ProfileOptionTest.java b/test/langtools/tools/javac/profiles/ProfileOptionTest.java index b5cb452583c1..67cb0487ce7a 100644 --- a/test/langtools/tools/javac/profiles/ProfileOptionTest.java +++ b/test/langtools/tools/javac/profiles/ProfileOptionTest.java @@ -151,6 +151,7 @@ void testTargetProfileCombinations() throws Exception { case JDK1_10: case JDK1_11: case JDK1_12: + case JDK1_13: if (p == Profile.DEFAULT) break; if (ise == null) diff --git a/test/langtools/tools/javac/switchexpr/BlockExpression.java b/test/langtools/tools/javac/switchexpr/BlockExpression.java index a6d300a63d11..0534ccb180ca 100644 --- a/test/langtools/tools/javac/switchexpr/BlockExpression.java +++ b/test/langtools/tools/javac/switchexpr/BlockExpression.java @@ -25,7 +25,7 @@ * @test * @bug 8206986 * @summary Verify rule cases with expression statements and throw statements work. - * @compile --enable-preview -source 12 BlockExpression.java + * @compile --enable-preview -source 13 BlockExpression.java * @run main/othervm --enable-preview BlockExpression */ diff --git a/test/langtools/tools/javac/switchexpr/BooleanNumericNonNumeric.java b/test/langtools/tools/javac/switchexpr/BooleanNumericNonNumeric.java index 1df8861c9574..2f5aac13fcef 100644 --- a/test/langtools/tools/javac/switchexpr/BooleanNumericNonNumeric.java +++ b/test/langtools/tools/javac/switchexpr/BooleanNumericNonNumeric.java @@ -2,7 +2,7 @@ * @test /nodynamiccopyright/ * @bug 8206986 * @summary Verify the type of a conditional expression with nested switch expression is computed properly - * @compile/fail/ref=BooleanNumericNonNumeric.out -XDrawDiagnostics --enable-preview -source 12 BooleanNumericNonNumeric.java + * @compile/fail/ref=BooleanNumericNonNumeric.out -XDrawDiagnostics --enable-preview -source 13 BooleanNumericNonNumeric.java */ public class BooleanNumericNonNumeric { diff --git a/test/langtools/tools/javac/switchexpr/BreakTest.java b/test/langtools/tools/javac/switchexpr/BreakTest.java index 7eca3a805de3..ea8b22580e5c 100644 --- a/test/langtools/tools/javac/switchexpr/BreakTest.java +++ b/test/langtools/tools/javac/switchexpr/BreakTest.java @@ -66,7 +66,7 @@ public static void main(String[] args) throws Exception { StringWriter out = new StringWriter(); JavacTask ct = (JavacTask) tool.getTask(out, null, noErrors, - List.of("-XDdev", "--enable-preview", "-source", "12"), null, + List.of("-XDdev", "--enable-preview", "-source", "13"), null, Arrays.asList(new MyFileObject(CODE))); List labels = new ArrayList<>(); new TreePathScanner() { diff --git a/test/langtools/tools/javac/switchexpr/CRT.java b/test/langtools/tools/javac/switchexpr/CRT.java index 630e9c257ce2..efaf656d8221 100644 --- a/test/langtools/tools/javac/switchexpr/CRT.java +++ b/test/langtools/tools/javac/switchexpr/CRT.java @@ -151,7 +151,7 @@ private void doTest(String code, String expected) throws Exception { new JavacTask(tb) .options("-Xjcov", "--enable-preview", - "-source", "12") + "-source", "13") .outdir(classes) .sources("public class Test {\n" + code + diff --git a/test/langtools/tools/javac/switchexpr/DefiniteAssignment1.java b/test/langtools/tools/javac/switchexpr/DefiniteAssignment1.java index c7c0fbfdb367..d58c23bbb59a 100644 --- a/test/langtools/tools/javac/switchexpr/DefiniteAssignment1.java +++ b/test/langtools/tools/javac/switchexpr/DefiniteAssignment1.java @@ -25,7 +25,7 @@ * @test * @bug 8214031 * @summary Verify that definite assignment when true works (legal code) - * @compile --enable-preview --source 12 DefiniteAssignment1.java + * @compile --enable-preview --source 13 DefiniteAssignment1.java * @run main/othervm --enable-preview DefiniteAssignment1 */ public class DefiniteAssignment1 { diff --git a/test/langtools/tools/javac/switchexpr/DefiniteAssignment2.java b/test/langtools/tools/javac/switchexpr/DefiniteAssignment2.java index 7c7e9db65009..706b83d5ab8d 100644 --- a/test/langtools/tools/javac/switchexpr/DefiniteAssignment2.java +++ b/test/langtools/tools/javac/switchexpr/DefiniteAssignment2.java @@ -2,7 +2,7 @@ * @test /nodynamiccopyright/ * @bug 8214031 * @summary Verify that definite assignment when true works (illegal code) - * @compile/fail/ref=DefiniteAssignment2.out --enable-preview --source 12 -XDrawDiagnostics DefiniteAssignment2.java + * @compile/fail/ref=DefiniteAssignment2.out --enable-preview --source 13 -XDrawDiagnostics DefiniteAssignment2.java */ public class DefiniteAssignment2 { diff --git a/test/langtools/tools/javac/switchexpr/EmptySwitch.java b/test/langtools/tools/javac/switchexpr/EmptySwitch.java index f1e169fb3142..bf26578ea1b9 100644 --- a/test/langtools/tools/javac/switchexpr/EmptySwitch.java +++ b/test/langtools/tools/javac/switchexpr/EmptySwitch.java @@ -25,7 +25,7 @@ * @test * @bug 8206986 * @summary Verify than an empty switch expression is rejected. - * @compile/fail/ref=EmptySwitch.out --enable-preview -source 12 -XDrawDiagnostics EmptySwitch.java + * @compile/fail/ref=EmptySwitch.out --enable-preview -source 13 -XDrawDiagnostics EmptySwitch.java */ public class EmptySwitch { diff --git a/test/langtools/tools/javac/switchexpr/ExhaustiveEnumSwitch.java b/test/langtools/tools/javac/switchexpr/ExhaustiveEnumSwitch.java index 3f13f98bc5f0..bbe728a5300a 100644 --- a/test/langtools/tools/javac/switchexpr/ExhaustiveEnumSwitch.java +++ b/test/langtools/tools/javac/switchexpr/ExhaustiveEnumSwitch.java @@ -25,7 +25,7 @@ * @test * @bug 8206986 * @summary Verify that an switch expression over enum can be exhaustive without default. - * @compile --enable-preview -source 12 ExhaustiveEnumSwitch.java + * @compile --enable-preview -source 13 ExhaustiveEnumSwitch.java * @compile ExhaustiveEnumSwitchExtra.java * @run main/othervm --enable-preview ExhaustiveEnumSwitch */ diff --git a/test/langtools/tools/javac/switchexpr/ExpressionSwitch.java b/test/langtools/tools/javac/switchexpr/ExpressionSwitch.java index 283ec3a5989a..67c0fbb61d74 100644 --- a/test/langtools/tools/javac/switchexpr/ExpressionSwitch.java +++ b/test/langtools/tools/javac/switchexpr/ExpressionSwitch.java @@ -3,7 +3,7 @@ * @bug 8206986 * @summary Check expression switch works. * @compile/fail/ref=ExpressionSwitch-old.out -source 9 -Xlint:-options -XDrawDiagnostics ExpressionSwitch.java - * @compile --enable-preview -source 12 ExpressionSwitch.java + * @compile --enable-preview -source 13 ExpressionSwitch.java * @run main/othervm --enable-preview ExpressionSwitch */ diff --git a/test/langtools/tools/javac/switchexpr/ExpressionSwitchBreaks1.java b/test/langtools/tools/javac/switchexpr/ExpressionSwitchBreaks1.java index 3b5774805c3e..198350e88629 100644 --- a/test/langtools/tools/javac/switchexpr/ExpressionSwitchBreaks1.java +++ b/test/langtools/tools/javac/switchexpr/ExpressionSwitchBreaks1.java @@ -25,7 +25,7 @@ * @test * @bug 8206986 * @summary Verify behavior of various kinds of breaks. - * @compile --enable-preview -source 12 ExpressionSwitchBreaks1.java + * @compile --enable-preview -source 13 ExpressionSwitchBreaks1.java * @run main/othervm --enable-preview ExpressionSwitchBreaks1 */ diff --git a/test/langtools/tools/javac/switchexpr/ExpressionSwitchBreaks2.java b/test/langtools/tools/javac/switchexpr/ExpressionSwitchBreaks2.java index 056ba32bc451..66e9023b4efa 100644 --- a/test/langtools/tools/javac/switchexpr/ExpressionSwitchBreaks2.java +++ b/test/langtools/tools/javac/switchexpr/ExpressionSwitchBreaks2.java @@ -2,7 +2,7 @@ * @test /nodynamiccopyright/ * @bug 8206986 * @summary Check behavior for invalid breaks. - * @compile/fail/ref=ExpressionSwitchBreaks2.out -XDrawDiagnostics --enable-preview -source 12 ExpressionSwitchBreaks2.java + * @compile/fail/ref=ExpressionSwitchBreaks2.out -XDrawDiagnostics --enable-preview -source 13 ExpressionSwitchBreaks2.java */ public class ExpressionSwitchBreaks2 { diff --git a/test/langtools/tools/javac/switchexpr/ExpressionSwitchBugs.java b/test/langtools/tools/javac/switchexpr/ExpressionSwitchBugs.java index b768a1638691..873f9d1b59a8 100644 --- a/test/langtools/tools/javac/switchexpr/ExpressionSwitchBugs.java +++ b/test/langtools/tools/javac/switchexpr/ExpressionSwitchBugs.java @@ -25,7 +25,7 @@ * @test * @bug 8206986 8214114 8214529 * @summary Verify various corner cases with nested switch expressions. - * @compile --enable-preview -source 12 ExpressionSwitchBugs.java + * @compile --enable-preview -source 13 ExpressionSwitchBugs.java * @run main/othervm --enable-preview ExpressionSwitchBugs */ diff --git a/test/langtools/tools/javac/switchexpr/ExpressionSwitchBugsInGen.java b/test/langtools/tools/javac/switchexpr/ExpressionSwitchBugsInGen.java index a2a175a04d53..9dd0c5e4b631 100644 --- a/test/langtools/tools/javac/switchexpr/ExpressionSwitchBugsInGen.java +++ b/test/langtools/tools/javac/switchexpr/ExpressionSwitchBugsInGen.java @@ -25,7 +25,7 @@ * @test * @bug 8214031 * @summary Verify various corner cases with nested switch expressions. - * @compile --enable-preview -source 12 ExpressionSwitchBugsInGen.java + * @compile --enable-preview -source 13 ExpressionSwitchBugsInGen.java * @run main/othervm --enable-preview ExpressionSwitchBugsInGen */ diff --git a/test/langtools/tools/javac/switchexpr/ExpressionSwitchCodeFromJLS.java b/test/langtools/tools/javac/switchexpr/ExpressionSwitchCodeFromJLS.java index 95b53fcaa058..f9564bafc86c 100644 --- a/test/langtools/tools/javac/switchexpr/ExpressionSwitchCodeFromJLS.java +++ b/test/langtools/tools/javac/switchexpr/ExpressionSwitchCodeFromJLS.java @@ -25,7 +25,7 @@ * @test * @bug 8206986 * @summary Check switch expressions - * @compile --enable-preview -source 12 ExpressionSwitchCodeFromJLS.java + * @compile --enable-preview -source 13 ExpressionSwitchCodeFromJLS.java * @run main/othervm --enable-preview ExpressionSwitchCodeFromJLS */ diff --git a/test/langtools/tools/javac/switchexpr/ExpressionSwitchDA.java b/test/langtools/tools/javac/switchexpr/ExpressionSwitchDA.java index 7e54f3f1732d..9815b27dd48a 100644 --- a/test/langtools/tools/javac/switchexpr/ExpressionSwitchDA.java +++ b/test/langtools/tools/javac/switchexpr/ExpressionSwitchDA.java @@ -25,7 +25,7 @@ * @test * @bug 8206986 * @summary Check definite (un)assignment for in switch expressions. - * @compile --enable-preview -source 12 ExpressionSwitchDA.java + * @compile --enable-preview -source 13 ExpressionSwitchDA.java * @run main/othervm --enable-preview ExpressionSwitchDA */ diff --git a/test/langtools/tools/javac/switchexpr/ExpressionSwitchEmbedding.java b/test/langtools/tools/javac/switchexpr/ExpressionSwitchEmbedding.java index d70ef7ead4e5..997b69ce9276 100644 --- a/test/langtools/tools/javac/switchexpr/ExpressionSwitchEmbedding.java +++ b/test/langtools/tools/javac/switchexpr/ExpressionSwitchEmbedding.java @@ -25,7 +25,7 @@ * @test * @bug 8214031 8214114 * @summary Verify switch expressions embedded in various statements work properly. - * @compile --enable-preview -source 12 ExpressionSwitchEmbedding.java + * @compile --enable-preview -source 13 ExpressionSwitchEmbedding.java * @run main/othervm --enable-preview ExpressionSwitchEmbedding */ diff --git a/test/langtools/tools/javac/switchexpr/ExpressionSwitchFallThrough.java b/test/langtools/tools/javac/switchexpr/ExpressionSwitchFallThrough.java index 4c1635e332aa..f51e51ad9a08 100644 --- a/test/langtools/tools/javac/switchexpr/ExpressionSwitchFallThrough.java +++ b/test/langtools/tools/javac/switchexpr/ExpressionSwitchFallThrough.java @@ -25,7 +25,7 @@ * @test * @bug 8206986 * @summary Check fall through in switch expressions. - * @compile --enable-preview -source 12 ExpressionSwitchFallThrough.java + * @compile --enable-preview -source 13 ExpressionSwitchFallThrough.java * @run main/othervm --enable-preview ExpressionSwitchFallThrough */ diff --git a/test/langtools/tools/javac/switchexpr/ExpressionSwitchFallThrough1.java b/test/langtools/tools/javac/switchexpr/ExpressionSwitchFallThrough1.java index 18f11035599a..2f60e88c7e51 100644 --- a/test/langtools/tools/javac/switchexpr/ExpressionSwitchFallThrough1.java +++ b/test/langtools/tools/javac/switchexpr/ExpressionSwitchFallThrough1.java @@ -25,7 +25,7 @@ * @test * @bug 8206986 * @summary Check fall through in switch expressions. - * @compile --enable-preview -source 12 ExpressionSwitchFallThrough1.java + * @compile --enable-preview -source 13 ExpressionSwitchFallThrough1.java * @run main/othervm --enable-preview ExpressionSwitchFallThrough1 */ diff --git a/test/langtools/tools/javac/switchexpr/ExpressionSwitchFlow.java b/test/langtools/tools/javac/switchexpr/ExpressionSwitchFlow.java index 31734f2c81bf..f5cd71af5cbe 100644 --- a/test/langtools/tools/javac/switchexpr/ExpressionSwitchFlow.java +++ b/test/langtools/tools/javac/switchexpr/ExpressionSwitchFlow.java @@ -2,7 +2,7 @@ * @test /nodynamiccopyright/ * @bug 8212982 * @summary Verify a compile-time error is produced if switch expression does not provide a value - * @compile/fail/ref=ExpressionSwitchFlow.out --enable-preview -source 12 -XDrawDiagnostics ExpressionSwitchFlow.java + * @compile/fail/ref=ExpressionSwitchFlow.out --enable-preview -source 13 -XDrawDiagnostics ExpressionSwitchFlow.java */ public class ExpressionSwitchFlow { diff --git a/test/langtools/tools/javac/switchexpr/ExpressionSwitchInExpressionSwitch.java b/test/langtools/tools/javac/switchexpr/ExpressionSwitchInExpressionSwitch.java index a4602c176583..6d57ffa16ea5 100644 --- a/test/langtools/tools/javac/switchexpr/ExpressionSwitchInExpressionSwitch.java +++ b/test/langtools/tools/javac/switchexpr/ExpressionSwitchInExpressionSwitch.java @@ -25,7 +25,7 @@ * @test * @bug 8206986 * @summary Check switch expressions embedded in switch expressions. - * @compile --enable-preview -source 12 ExpressionSwitchInExpressionSwitch.java + * @compile --enable-preview -source 13 ExpressionSwitchInExpressionSwitch.java * @run main/othervm --enable-preview ExpressionSwitchInExpressionSwitch */ diff --git a/test/langtools/tools/javac/switchexpr/ExpressionSwitchInfer.java b/test/langtools/tools/javac/switchexpr/ExpressionSwitchInfer.java index ea854b4c4f27..8b6d32535eb8 100644 --- a/test/langtools/tools/javac/switchexpr/ExpressionSwitchInfer.java +++ b/test/langtools/tools/javac/switchexpr/ExpressionSwitchInfer.java @@ -2,7 +2,7 @@ * @test /nodynamiccopyright/ * @bug 8206986 * @summary Check types inferred for switch expressions. - * @compile/fail/ref=ExpressionSwitchInfer.out -XDrawDiagnostics --enable-preview -source 12 ExpressionSwitchInfer.java + * @compile/fail/ref=ExpressionSwitchInfer.out -XDrawDiagnostics --enable-preview -source 13 ExpressionSwitchInfer.java */ import java.util.ArrayList; diff --git a/test/langtools/tools/javac/switchexpr/ExpressionSwitchIntersectionTypes.java b/test/langtools/tools/javac/switchexpr/ExpressionSwitchIntersectionTypes.java index 516ae2357ab1..a1f13b83d765 100644 --- a/test/langtools/tools/javac/switchexpr/ExpressionSwitchIntersectionTypes.java +++ b/test/langtools/tools/javac/switchexpr/ExpressionSwitchIntersectionTypes.java @@ -25,7 +25,7 @@ * @test * @bug 8206986 * @summary Verify behavior when an intersection type is inferred for switch expression. - * @compile --enable-preview -source 12 ExpressionSwitchIntersectionTypes.java + * @compile --enable-preview -source 13 ExpressionSwitchIntersectionTypes.java * @run main/othervm --enable-preview ExpressionSwitchIntersectionTypes */ diff --git a/test/langtools/tools/javac/switchexpr/ExpressionSwitchNotExhaustive.java b/test/langtools/tools/javac/switchexpr/ExpressionSwitchNotExhaustive.java index 42107b2c5a0e..8f4ea2e80c64 100644 --- a/test/langtools/tools/javac/switchexpr/ExpressionSwitchNotExhaustive.java +++ b/test/langtools/tools/javac/switchexpr/ExpressionSwitchNotExhaustive.java @@ -2,7 +2,7 @@ * @test /nodynamiccopyright/ * @bug 8206986 * @summary Verify behavior of not exhaustive switch expressions. - * @compile/fail/ref=ExpressionSwitchNotExhaustive.out -XDrawDiagnostics --enable-preview -source 12 ExpressionSwitchNotExhaustive.java + * @compile/fail/ref=ExpressionSwitchNotExhaustive.out -XDrawDiagnostics --enable-preview -source 13 ExpressionSwitchNotExhaustive.java */ public class ExpressionSwitchNotExhaustive { diff --git a/test/langtools/tools/javac/switchexpr/ExpressionSwitchUnreachable.java b/test/langtools/tools/javac/switchexpr/ExpressionSwitchUnreachable.java index 769e3dd0fbf9..978e49e10886 100644 --- a/test/langtools/tools/javac/switchexpr/ExpressionSwitchUnreachable.java +++ b/test/langtools/tools/javac/switchexpr/ExpressionSwitchUnreachable.java @@ -2,7 +2,7 @@ * @test /nodynamiccopyright/ * @bug 8206986 * @summary Verify reachability in switch expressions. - * @compile/fail/ref=ExpressionSwitchUnreachable.out -XDrawDiagnostics --enable-preview -source 12 ExpressionSwitchUnreachable.java + * @compile/fail/ref=ExpressionSwitchUnreachable.out -XDrawDiagnostics --enable-preview -source 13 ExpressionSwitchUnreachable.java */ public class ExpressionSwitchUnreachable { diff --git a/test/langtools/tools/javac/switchexpr/ParseIncomplete.java b/test/langtools/tools/javac/switchexpr/ParseIncomplete.java index 2463560c1bb4..159ba634d968 100644 --- a/test/langtools/tools/javac/switchexpr/ParseIncomplete.java +++ b/test/langtools/tools/javac/switchexpr/ParseIncomplete.java @@ -67,7 +67,7 @@ public static void main(String[] args) throws Exception { StringWriter out = new StringWriter(); try { JavacTask ct = (JavacTask) tool.getTask(out, null, noErrors, - List.of("-XDdev", "--enable-preview", "-source", "12"), null, + List.of("-XDdev", "--enable-preview", "-source", "13"), null, Arrays.asList(new MyFileObject(code))); ct.parse().iterator().next(); } catch (Throwable t) { diff --git a/test/langtools/tools/javac/switchexpr/ParserRecovery.java b/test/langtools/tools/javac/switchexpr/ParserRecovery.java index 261c1a8a31cb..7c197c288b89 100644 --- a/test/langtools/tools/javac/switchexpr/ParserRecovery.java +++ b/test/langtools/tools/javac/switchexpr/ParserRecovery.java @@ -2,7 +2,7 @@ * @test /nodynamiccopyright/ * @bug 8206986 * @summary Verify the parser handles broken input gracefully. - * @compile/fail/ref=ParserRecovery.out -XDrawDiagnostics --enable-preview -source 12 ParserRecovery.java + * @compile/fail/ref=ParserRecovery.out -XDrawDiagnostics --enable-preview -source 13 ParserRecovery.java */ public class ParserRecovery { diff --git a/test/langtools/tools/javac/switchexpr/SwitchExpressionIsNotAConstant.java b/test/langtools/tools/javac/switchexpr/SwitchExpressionIsNotAConstant.java index d7f9b6844c88..1cae5e7ade90 100644 --- a/test/langtools/tools/javac/switchexpr/SwitchExpressionIsNotAConstant.java +++ b/test/langtools/tools/javac/switchexpr/SwitchExpressionIsNotAConstant.java @@ -26,7 +26,7 @@ * @bug 8214113 * @summary Verify the switch expression's type does not have a constant attached, * and so the switch expression is not elided. - * @compile --enable-preview --source 12 SwitchExpressionIsNotAConstant.java + * @compile --enable-preview --source 13 SwitchExpressionIsNotAConstant.java * @run main/othervm --enable-preview SwitchExpressionIsNotAConstant */ public class SwitchExpressionIsNotAConstant { diff --git a/test/langtools/tools/javac/switchexpr/SwitchExpressionScopesIsolated.java b/test/langtools/tools/javac/switchexpr/SwitchExpressionScopesIsolated.java index cdd79721aeec..295a1dc9119f 100644 --- a/test/langtools/tools/javac/switchexpr/SwitchExpressionScopesIsolated.java +++ b/test/langtools/tools/javac/switchexpr/SwitchExpressionScopesIsolated.java @@ -2,7 +2,7 @@ * @test /nodynamiccopyright/ * @bug 8206986 * @summary Verify that scopes in rule cases are isolated. - * @compile/fail/ref=SwitchExpressionScopesIsolated.out -XDrawDiagnostics --enable-preview -source 12 SwitchExpressionScopesIsolated.java + * @compile/fail/ref=SwitchExpressionScopesIsolated.out -XDrawDiagnostics --enable-preview -source 13 SwitchExpressionScopesIsolated.java */ public class SwitchExpressionScopesIsolated { diff --git a/test/langtools/tools/javac/switchexpr/SwitchExpressionSimpleVisitorTest.java b/test/langtools/tools/javac/switchexpr/SwitchExpressionSimpleVisitorTest.java index b61bbdae4fb8..4df450874c65 100644 --- a/test/langtools/tools/javac/switchexpr/SwitchExpressionSimpleVisitorTest.java +++ b/test/langtools/tools/javac/switchexpr/SwitchExpressionSimpleVisitorTest.java @@ -89,7 +89,7 @@ private CompilationUnitTree parse(String code) throws IOException { StringWriter out = new StringWriter(); JavacTask ct = (JavacTask) tool.getTask(out, null, noErrors, - List.of("--enable-preview", "-source", "12"), null, + List.of("--enable-preview", "-source", "13"), null, Arrays.asList(new MyFileObject(code))); return ct.parse().iterator().next(); } diff --git a/test/langtools/tools/javac/switchexpr/TryCatch.java b/test/langtools/tools/javac/switchexpr/TryCatch.java index 459a97125921..768292b3b5de 100644 --- a/test/langtools/tools/javac/switchexpr/TryCatch.java +++ b/test/langtools/tools/javac/switchexpr/TryCatch.java @@ -25,7 +25,7 @@ * @test * @bug 8214114 * @summary Verify try-catch inside a switch expression works properly. - * @compile --enable-preview -source 12 TryCatch.java + * @compile --enable-preview -source 13 TryCatch.java * @run main/othervm --enable-preview TryCatch */ public class TryCatch { diff --git a/test/langtools/tools/javac/switchextra/CaseTest.java b/test/langtools/tools/javac/switchextra/CaseTest.java index 358cd5c58172..99315e792130 100644 --- a/test/langtools/tools/javac/switchextra/CaseTest.java +++ b/test/langtools/tools/javac/switchextra/CaseTest.java @@ -136,7 +136,7 @@ private CompilationUnitTree parse(String code) throws IOException { StringWriter out = new StringWriter(); JavacTask ct = (JavacTask) tool.getTask(out, null, noErrors, - List.of("-XDdev", "--enable-preview", "-source", "12"), null, + List.of("-XDdev", "--enable-preview", "-source", "13"), null, Arrays.asList(new MyFileObject(code))); return ct.parse().iterator().next(); } diff --git a/test/langtools/tools/javac/switchextra/MultipleLabelsExpression.java b/test/langtools/tools/javac/switchextra/MultipleLabelsExpression.java index 862b6fe5a46d..170da1b33759 100644 --- a/test/langtools/tools/javac/switchextra/MultipleLabelsExpression.java +++ b/test/langtools/tools/javac/switchextra/MultipleLabelsExpression.java @@ -3,7 +3,7 @@ * @bug 8206986 * @summary Verify cases with multiple labels work properly. * @compile/fail/ref=MultipleLabelsExpression-old.out -source 9 -Xlint:-options -XDrawDiagnostics MultipleLabelsExpression.java - * @compile --enable-preview -source 12 MultipleLabelsExpression.java + * @compile --enable-preview -source 13 MultipleLabelsExpression.java * @run main/othervm --enable-preview MultipleLabelsExpression */ diff --git a/test/langtools/tools/javac/switchextra/MultipleLabelsStatement.java b/test/langtools/tools/javac/switchextra/MultipleLabelsStatement.java index 8e29daeb6f1d..b674e92b9609 100644 --- a/test/langtools/tools/javac/switchextra/MultipleLabelsStatement.java +++ b/test/langtools/tools/javac/switchextra/MultipleLabelsStatement.java @@ -3,7 +3,7 @@ * @bug 8206986 * @summary Verify cases with multiple labels work properly. * @compile/fail/ref=MultipleLabelsStatement-old.out -source 9 -Xlint:-options -XDrawDiagnostics MultipleLabelsStatement.java - * @compile --enable-preview -source 12 MultipleLabelsStatement.java + * @compile --enable-preview -source 13 MultipleLabelsStatement.java * @run main/othervm --enable-preview MultipleLabelsStatement */ diff --git a/test/langtools/tools/javac/switchextra/RuleParsingTest.java b/test/langtools/tools/javac/switchextra/RuleParsingTest.java index bb9d7787802e..afdaa929edcc 100644 --- a/test/langtools/tools/javac/switchextra/RuleParsingTest.java +++ b/test/langtools/tools/javac/switchextra/RuleParsingTest.java @@ -94,7 +94,7 @@ void testParseComplexExpressions() throws Exception { StringWriter out = new StringWriter(); JavacTask ct = (JavacTask) tool.getTask(out, null, noErrors, - List.of("--enable-preview", "-source", "12"), null, + List.of("--enable-preview", "-source", "13"), null, Arrays.asList(new MyFileObject(code.toString()))); CompilationUnitTree cut = ct.parse().iterator().next(); Trees trees = Trees.instance(ct); diff --git a/test/langtools/tools/javac/switchextra/SwitchArrowBrokenConstant.java b/test/langtools/tools/javac/switchextra/SwitchArrowBrokenConstant.java index fddbde2819f2..e1cec5ac34d8 100644 --- a/test/langtools/tools/javac/switchextra/SwitchArrowBrokenConstant.java +++ b/test/langtools/tools/javac/switchextra/SwitchArrowBrokenConstant.java @@ -3,7 +3,7 @@ * @bug 8206986 * @summary Verify reasonable errors are produced when neither ':' nor '->' * is found are the expression of a case - * @compile/fail/ref=SwitchArrowBrokenConstant.out -source 12 --enable-preview -Xlint:-preview -XDrawDiagnostics SwitchArrowBrokenConstant.java + * @compile/fail/ref=SwitchArrowBrokenConstant.out -source 13 --enable-preview -Xlint:-preview -XDrawDiagnostics SwitchArrowBrokenConstant.java */ public class SwitchArrowBrokenConstant { diff --git a/test/langtools/tools/javac/switchextra/SwitchStatementArrow.java b/test/langtools/tools/javac/switchextra/SwitchStatementArrow.java index 8c004fa1a22a..599adacc97f0 100644 --- a/test/langtools/tools/javac/switchextra/SwitchStatementArrow.java +++ b/test/langtools/tools/javac/switchextra/SwitchStatementArrow.java @@ -3,7 +3,7 @@ * @bug 8206986 * @summary Verify rule cases work properly. * @compile/fail/ref=SwitchStatementArrow-old.out -source 9 -Xlint:-options -XDrawDiagnostics SwitchStatementArrow.java - * @compile --enable-preview -source 12 SwitchStatementArrow.java + * @compile --enable-preview -source 13 SwitchStatementArrow.java * @run main/othervm --enable-preview SwitchStatementArrow */ diff --git a/test/langtools/tools/javac/switchextra/SwitchStatementBroken.java b/test/langtools/tools/javac/switchextra/SwitchStatementBroken.java index 53493397e152..6882c2d0e1e3 100644 --- a/test/langtools/tools/javac/switchextra/SwitchStatementBroken.java +++ b/test/langtools/tools/javac/switchextra/SwitchStatementBroken.java @@ -2,7 +2,7 @@ * @test /nodynamiccopyright/ * @bug 8206986 * @summary Verify that rule and ordinary cases cannot be mixed. - * @compile/fail/ref=SwitchStatementBroken.out -XDrawDiagnostics --enable-preview -source 12 SwitchStatementBroken.java + * @compile/fail/ref=SwitchStatementBroken.out -XDrawDiagnostics --enable-preview -source 13 SwitchStatementBroken.java */ public class SwitchStatementBroken { diff --git a/test/langtools/tools/javac/switchextra/SwitchStatementBroken2.java b/test/langtools/tools/javac/switchextra/SwitchStatementBroken2.java index 5cc466c2710d..8bb6bc018ef9 100644 --- a/test/langtools/tools/javac/switchextra/SwitchStatementBroken2.java +++ b/test/langtools/tools/javac/switchextra/SwitchStatementBroken2.java @@ -2,7 +2,7 @@ * @test /nodynamiccopyright/ * @bug 8206986 * @summary Verify that not allowed types of statements cannot be used in rule case. - * @compile/fail/ref=SwitchStatementBroken2.out -XDrawDiagnostics --enable-preview -source 12 SwitchStatementBroken2.java + * @compile/fail/ref=SwitchStatementBroken2.out -XDrawDiagnostics --enable-preview -source 13 SwitchStatementBroken2.java */ public class SwitchStatementBroken2 { diff --git a/test/langtools/tools/javac/switchextra/SwitchStatementScopesIsolated.java b/test/langtools/tools/javac/switchextra/SwitchStatementScopesIsolated.java index b00fdf82df41..896a4d9ca3ba 100644 --- a/test/langtools/tools/javac/switchextra/SwitchStatementScopesIsolated.java +++ b/test/langtools/tools/javac/switchextra/SwitchStatementScopesIsolated.java @@ -2,7 +2,7 @@ * @test /nodynamiccopyright/ * @bug 8206986 * @summary Verify that scopes in rule cases are isolated. - * @compile/fail/ref=SwitchStatementScopesIsolated.out -XDrawDiagnostics --enable-preview -source 12 SwitchStatementScopesIsolated.java + * @compile/fail/ref=SwitchStatementScopesIsolated.out -XDrawDiagnostics --enable-preview -source 13 SwitchStatementScopesIsolated.java */ public class SwitchStatementScopesIsolated { diff --git a/test/langtools/tools/javac/versions/Versions.java b/test/langtools/tools/javac/versions/Versions.java index 60e8e5405253..c95e5c6d256e 100644 --- a/test/langtools/tools/javac/versions/Versions.java +++ b/test/langtools/tools/javac/versions/Versions.java @@ -69,9 +69,9 @@ public static void main(String... args) throws IOException { Set.of("1.2", "1.3", "1.4", "1.5", "1.6"); public static final Set VALID_SOURCES = - Set.of("1.7", "1.8", "1.9", "1.10", "11", "12"); + Set.of("1.7", "1.8", "1.9", "1.10", "11", "12", "13"); - public static final String LATEST_MAJOR_VERSION = "56.0"; + public static final String LATEST_MAJOR_VERSION = "57.0"; static enum SourceTarget { SEVEN(true, "51.0", "7", Versions::checksrc17), @@ -79,7 +79,8 @@ static enum SourceTarget { NINE(true, "53.0", "9", Versions::checksrc19), TEN(true, "54.0", "10", Versions::checksrc110), ELEVEN(false, "55.0", "11", Versions::checksrc111), - TWELVE(false, "56.0", "12", Versions::checksrc112); + TWELVE(false, "56.0", "12", Versions::checksrc112), + THIRTEEN(false, "57.0", "13", Versions::checksrc113); private final boolean dotOne; private final String classFileVer; @@ -293,6 +294,11 @@ protected void checksrc112(String... args) { checksrc111(args); } + protected void checksrc113(String... args) { + printargs("checksrc113", args); + checksrc111(args); + } + protected void pass(String... args) { printargs("pass", args); diff --git a/test/nashorn/TEST.ROOT b/test/nashorn/TEST.ROOT index 557a3c72a05b..e4489382dcfa 100644 --- a/test/nashorn/TEST.ROOT +++ b/test/nashorn/TEST.ROOT @@ -8,7 +8,7 @@ keys=intermittent randomness groups=TEST.groups # Minimum jtreg version -requiredVersion=4.2 b12 +requiredVersion=4.2 b13 # Use new module options useNewOptions=true