Bug 574039 Merge branch 'master' into BETA_JAVA17

Reapplied patch from Bug 575035 to fix Bug 575295 - [17][codegen]
Additional innner classes PatternMatching16test.Bug575035 failure

Change-Id: I2045129f95aaf1a5a4ec35ed9ddbf60332aa0381
Signed-off-by: Sravan Kumar Lakkimsetti <sravankumarl@in.ibm.com>
diff --git a/JCL/converterJclMin1.7/src/java/lang/Enum.java b/JCL/converterJclMin1.7/src/java/lang/Enum.java
index 13aba40..8e0a59b 100644
--- a/JCL/converterJclMin1.7/src/java/lang/Enum.java
+++ b/JCL/converterJclMin1.7/src/java/lang/Enum.java
@@ -33,4 +33,8 @@
 	public final Class<T> getDeclaringClass() {
         return null;
 	}
+	public static <T extends Enum<T>> T valueOf(Class<T> enumClass,
+			String name) {
+		return null;   
+	}
 }
\ No newline at end of file
diff --git a/JCL/converterJclMin1.8/src/java/lang/Enum.java b/JCL/converterJclMin1.8/src/java/lang/Enum.java
index 13aba40..8e0a59b 100644
--- a/JCL/converterJclMin1.8/src/java/lang/Enum.java
+++ b/JCL/converterJclMin1.8/src/java/lang/Enum.java
@@ -33,4 +33,8 @@
 	public final Class<T> getDeclaringClass() {
         return null;
 	}
+	public static <T extends Enum<T>> T valueOf(Class<T> enumClass,
+			String name) {
+		return null;   
+	}
 }
\ No newline at end of file
diff --git a/JCL/converterJclMin10/src/java/lang/Enum.java b/JCL/converterJclMin10/src/java/lang/Enum.java
index d95e7ae..f5761fb 100644
--- a/JCL/converterJclMin10/src/java/lang/Enum.java
+++ b/JCL/converterJclMin10/src/java/lang/Enum.java
@@ -11,4 +11,8 @@
 	public final int ordinal() {
 		return 0;
 	}
+	public static <T extends Enum<T>> T valueOf(Class<T> enumClass,
+			String name) {
+		return null;   
+	}
 }
\ No newline at end of file
diff --git a/JCL/converterJclMin11/src/java/lang/Enum.java b/JCL/converterJclMin11/src/java/lang/Enum.java
index d95e7ae..f5761fb 100644
--- a/JCL/converterJclMin11/src/java/lang/Enum.java
+++ b/JCL/converterJclMin11/src/java/lang/Enum.java
@@ -11,4 +11,8 @@
 	public final int ordinal() {
 		return 0;
 	}
+	public static <T extends Enum<T>> T valueOf(Class<T> enumClass,
+			String name) {
+		return null;   
+	}
 }
\ No newline at end of file
diff --git a/JCL/converterJclMin12/src/java/lang/Enum.java b/JCL/converterJclMin12/src/java/lang/Enum.java
index d95e7ae..f5761fb 100644
--- a/JCL/converterJclMin12/src/java/lang/Enum.java
+++ b/JCL/converterJclMin12/src/java/lang/Enum.java
@@ -11,4 +11,8 @@
 	public final int ordinal() {
 		return 0;
 	}
+	public static <T extends Enum<T>> T valueOf(Class<T> enumClass,
+			String name) {
+		return null;   
+	}
 }
\ No newline at end of file
diff --git a/JCL/converterJclMin13/src/java/lang/Enum.java b/JCL/converterJclMin13/src/java/lang/Enum.java
index d95e7ae..f5761fb 100644
--- a/JCL/converterJclMin13/src/java/lang/Enum.java
+++ b/JCL/converterJclMin13/src/java/lang/Enum.java
@@ -11,4 +11,8 @@
 	public final int ordinal() {
 		return 0;
 	}
+	public static <T extends Enum<T>> T valueOf(Class<T> enumClass,
+			String name) {
+		return null;   
+	}
 }
\ No newline at end of file
diff --git a/JCL/converterJclMin14/src/java/lang/Enum.java b/JCL/converterJclMin14/src/java/lang/Enum.java
index d95e7ae..f5761fb 100644
--- a/JCL/converterJclMin14/src/java/lang/Enum.java
+++ b/JCL/converterJclMin14/src/java/lang/Enum.java
@@ -11,4 +11,8 @@
 	public final int ordinal() {
 		return 0;
 	}
+	public static <T extends Enum<T>> T valueOf(Class<T> enumClass,
+			String name) {
+		return null;   
+	}
 }
\ No newline at end of file
diff --git a/JCL/converterJclMin14/src/java/lang/invoke/TypeDescriptor.java b/JCL/converterJclMin14/src/java/lang/invoke/TypeDescriptor.java
new file mode 100644
index 0000000..a5e158d
--- /dev/null
+++ b/JCL/converterJclMin14/src/java/lang/invoke/TypeDescriptor.java
@@ -0,0 +1,31 @@
+/*
+ * Copyright (c) 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
+ * under the terms of the GNU General Public License version 2 only, as
+ * published by the Free Software Foundation.  Oracle designates this
+ * particular file as subject to the "Classpath" exception as provided
+ * by Oracle in the LICENSE file that accompanied this code.
+ *
+ * This code is distributed in the hope that it will be useful, but WITHOUT
+ * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
+ * FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
+ * version 2 for more details (a copy is included in the LICENSE file that
+ * accompanied this code).
+ *
+ * You should have received a copy of the GNU General Public License version
+ * 2 along with this work; if not, write to the Free Software Foundation,
+ * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
+ *
+ * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
+ * or visit www.oracle.com if you need additional information or have any
+ * questions.
+ */
+package java.lang.invoke;
+
+import java.util.List;
+
+public interface TypeDescriptor {
+    String descriptorString();
+}
diff --git a/JCL/converterJclMin15/src/java/lang/Enum.java b/JCL/converterJclMin15/src/java/lang/Enum.java
index 05c8d27..d2ab844 100644
--- a/JCL/converterJclMin15/src/java/lang/Enum.java
+++ b/JCL/converterJclMin15/src/java/lang/Enum.java
@@ -11,4 +11,8 @@
 	public final int ordinal() {

 		return 0;

 	}

+	public static <T extends Enum<T>> T valueOf(Class<T> enumClass,

+			String name) {

+		return null;   

+	}

 }
\ No newline at end of file
diff --git a/JCL/converterJclMin15/src/java/lang/invoke/TypeDescriptor.java b/JCL/converterJclMin15/src/java/lang/invoke/TypeDescriptor.java
new file mode 100644
index 0000000..a5e158d
--- /dev/null
+++ b/JCL/converterJclMin15/src/java/lang/invoke/TypeDescriptor.java
@@ -0,0 +1,31 @@
+/*
+ * Copyright (c) 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
+ * under the terms of the GNU General Public License version 2 only, as
+ * published by the Free Software Foundation.  Oracle designates this
+ * particular file as subject to the "Classpath" exception as provided
+ * by Oracle in the LICENSE file that accompanied this code.
+ *
+ * This code is distributed in the hope that it will be useful, but WITHOUT
+ * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
+ * FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
+ * version 2 for more details (a copy is included in the LICENSE file that
+ * accompanied this code).
+ *
+ * You should have received a copy of the GNU General Public License version
+ * 2 along with this work; if not, write to the Free Software Foundation,
+ * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
+ *
+ * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
+ * or visit www.oracle.com if you need additional information or have any
+ * questions.
+ */
+package java.lang.invoke;
+
+import java.util.List;
+
+public interface TypeDescriptor {
+    String descriptorString();
+}
diff --git a/JCL/converterJclMin17/.settings/org.eclipse.jdt.core.prefs b/JCL/converterJclMin17/.settings/org.eclipse.jdt.core.prefs
new file mode 100644
index 0000000..223b166
--- /dev/null
+++ b/JCL/converterJclMin17/.settings/org.eclipse.jdt.core.prefs
@@ -0,0 +1,14 @@
+eclipse.preferences.version=1
+org.eclipse.jdt.core.compiler.codegen.inlineJsrBytecode=enabled
+org.eclipse.jdt.core.compiler.codegen.targetPlatform=15
+org.eclipse.jdt.core.compiler.codegen.unusedLocal=preserve
+org.eclipse.jdt.core.compiler.compliance=15
+org.eclipse.jdt.core.compiler.debug.lineNumber=generate
+org.eclipse.jdt.core.compiler.debug.localVariable=generate
+org.eclipse.jdt.core.compiler.debug.sourceFile=generate
+org.eclipse.jdt.core.compiler.problem.assertIdentifier=error
+org.eclipse.jdt.core.compiler.problem.enablePreviewFeatures=disabled
+org.eclipse.jdt.core.compiler.problem.enumIdentifier=error
+org.eclipse.jdt.core.compiler.problem.reportPreviewFeatures=warning
+org.eclipse.jdt.core.compiler.release=enabled
+org.eclipse.jdt.core.compiler.source=15
diff --git a/JCL/converterJclMin17/src/META-INF/MANIFEST.MF b/JCL/converterJclMin17/src/META-INF/MANIFEST.MF
new file mode 100644
index 0000000..c72a1fb
--- /dev/null
+++ b/JCL/converterJclMin17/src/META-INF/MANIFEST.MF
@@ -0,0 +1,3 @@
+Manifest-Version: 1.0
+Created-By: 1.8.0_151 (Oracle Corporation)
+
diff --git a/JCL/converterJclMin17/src/java/io/InputStream.java b/JCL/converterJclMin17/src/java/io/InputStream.java
new file mode 100644
index 0000000..82511ba
--- /dev/null
+++ b/JCL/converterJclMin17/src/java/io/InputStream.java
@@ -0,0 +1,5 @@
+package java.io;
+
+public class InputStream {
+
+}
diff --git a/JCL/converterJclMin17/src/java/io/PrintStream.java b/JCL/converterJclMin17/src/java/io/PrintStream.java
new file mode 100644
index 0000000..1905938
--- /dev/null
+++ b/JCL/converterJclMin17/src/java/io/PrintStream.java
@@ -0,0 +1,8 @@
+package java.io;
+
+public class PrintStream {
+    public void println(String x) {
+    }
+    public void println(int x) {
+    }
+}
diff --git a/JCL/converterJclMin17/src/java/io/Serializable.java b/JCL/converterJclMin17/src/java/io/Serializable.java
new file mode 100644
index 0000000..edd882d
--- /dev/null
+++ b/JCL/converterJclMin17/src/java/io/Serializable.java
@@ -0,0 +1,4 @@
+package java.io;

+

+public interface Serializable {

+}

diff --git a/JCL/converterJclMin17/src/java/lang/CharSequence.java b/JCL/converterJclMin17/src/java/lang/CharSequence.java
new file mode 100644
index 0000000..b9a0d9e
--- /dev/null
+++ b/JCL/converterJclMin17/src/java/lang/CharSequence.java
@@ -0,0 +1,5 @@
+package java.lang;

+

+public interface CharSequence {

+	int length();

+}

diff --git a/JCL/converterJclMin17/src/java/lang/Class.java b/JCL/converterJclMin17/src/java/lang/Class.java
new file mode 100644
index 0000000..a7667b9
--- /dev/null
+++ b/JCL/converterJclMin17/src/java/lang/Class.java
@@ -0,0 +1,4 @@
+package java.lang;

+

+public class Class<T> {

+}

diff --git a/JCL/converterJclMin17/src/java/lang/ClassNotFoundException.java b/JCL/converterJclMin17/src/java/lang/ClassNotFoundException.java
new file mode 100644
index 0000000..7765ed8
--- /dev/null
+++ b/JCL/converterJclMin17/src/java/lang/ClassNotFoundException.java
@@ -0,0 +1,20 @@
+package java.lang;
+
+public class ClassNotFoundException extends ReflectiveOperationException {
+
+    public ClassNotFoundException() {
+        super((Throwable)null);  // Disallow initCause
+    }
+
+    public ClassNotFoundException(String s) {
+        super(s, null);  //  Disallow initCause
+    }
+
+    public ClassNotFoundException(String s, Throwable ex) {
+        super(s, ex);  //  Disallow initCause
+    }
+
+    public Throwable getException() {
+        return getCause();
+    }
+}
\ No newline at end of file
diff --git a/JCL/converterJclMin17/src/java/lang/CloneNotSupportedException.java b/JCL/converterJclMin17/src/java/lang/CloneNotSupportedException.java
new file mode 100644
index 0000000..cb777dc
--- /dev/null
+++ b/JCL/converterJclMin17/src/java/lang/CloneNotSupportedException.java
@@ -0,0 +1,4 @@
+package java.lang;

+

+public class CloneNotSupportedException extends Exception {

+}

diff --git a/JCL/converterJclMin17/src/java/lang/Comparable.java b/JCL/converterJclMin17/src/java/lang/Comparable.java
new file mode 100644
index 0000000..fbc6c8b
--- /dev/null
+++ b/JCL/converterJclMin17/src/java/lang/Comparable.java
@@ -0,0 +1,4 @@
+package java.lang;

+

+public interface Comparable<T> {

+}

diff --git a/JCL/converterJclMin17/src/java/lang/Deprecated.java b/JCL/converterJclMin17/src/java/lang/Deprecated.java
new file mode 100644
index 0000000..6c73ded
--- /dev/null
+++ b/JCL/converterJclMin17/src/java/lang/Deprecated.java
@@ -0,0 +1,6 @@
+package java.lang;

+import java.lang.annotation.*;

+@Documented

+@Retention(RetentionPolicy.RUNTIME)

+public @interface Deprecated {

+}
\ No newline at end of file
diff --git a/JCL/converterJclMin17/src/java/lang/Enum.java b/JCL/converterJclMin17/src/java/lang/Enum.java
new file mode 100644
index 0000000..a510103
--- /dev/null
+++ b/JCL/converterJclMin17/src/java/lang/Enum.java
@@ -0,0 +1,18 @@
+package java.lang;

+

+public abstract class Enum<T extends Enum<T>> implements Comparable<T>, java.io.Serializable {

+	private static final long serialVersionUID = 2L;

+

+	protected Enum(String name, int ordinal) {

+	}

+	public final String name() {

+		return null;

+	}

+	public final int ordinal() {

+		return 0;

+	}

+	public static <T extends Enum<T>> T valueOf(Class<T> enumClass,

+			String name) {

+		return null;   

+	}

+}

diff --git a/JCL/converterJclMin17/src/java/lang/Error.java b/JCL/converterJclMin17/src/java/lang/Error.java
new file mode 100644
index 0000000..9a446d5
--- /dev/null
+++ b/JCL/converterJclMin17/src/java/lang/Error.java
@@ -0,0 +1,16 @@
+package java.lang;

+

+public class Error extends Throwable {

+

+	public Error(java.lang.String s) {

+		// TODO Auto-generated constructor stub

+	}

+

+	public Error(java.lang.String s, java.lang.Throwable cause) {

+		// TODO Auto-generated constructor stub

+	}

+

+	public Error() {

+		// TODO Auto-generated constructor stub

+	}

+}

diff --git a/JCL/converterJclMin17/src/java/lang/Exception.java b/JCL/converterJclMin17/src/java/lang/Exception.java
new file mode 100644
index 0000000..0adef36
--- /dev/null
+++ b/JCL/converterJclMin17/src/java/lang/Exception.java
@@ -0,0 +1,19 @@
+package java.lang;

+

+public class Exception extends Throwable {

+    public Exception() {

+        super();

+    }

+

+    public Exception(String message) {

+        super(message);

+    }

+

+    public Exception(String message, Throwable cause) {

+        super(message, cause);

+    }

+

+    public Exception(Throwable cause) {

+        super(cause);

+    }

+}

diff --git a/JCL/converterJclMin17/src/java/lang/IllegalAccessException.java b/JCL/converterJclMin17/src/java/lang/IllegalAccessException.java
new file mode 100644
index 0000000..8146490
--- /dev/null
+++ b/JCL/converterJclMin17/src/java/lang/IllegalAccessException.java
@@ -0,0 +1,5 @@
+package java.lang;

+

+public class IllegalAccessException extends RuntimeException {

+

+}

diff --git a/JCL/converterJclMin17/src/java/lang/IllegalMonitorStateException.java b/JCL/converterJclMin17/src/java/lang/IllegalMonitorStateException.java
new file mode 100644
index 0000000..e173f13
--- /dev/null
+++ b/JCL/converterJclMin17/src/java/lang/IllegalMonitorStateException.java
@@ -0,0 +1,4 @@
+package java.lang;

+

+public class IllegalMonitorStateException extends RuntimeException {

+}

diff --git a/JCL/converterJclMin17/src/java/lang/IncompatibleClassChangeError.java b/JCL/converterJclMin17/src/java/lang/IncompatibleClassChangeError.java
new file mode 100644
index 0000000..9552b87
--- /dev/null
+++ b/JCL/converterJclMin17/src/java/lang/IncompatibleClassChangeError.java
@@ -0,0 +1,13 @@
+
+package java.lang;
+public
+class IncompatibleClassChangeError extends LinkageError {
+
+    public IncompatibleClassChangeError () {
+        super();
+    }
+
+    public IncompatibleClassChangeError(String s) {
+        super(s);
+    }
+}
diff --git a/JCL/converterJclMin17/src/java/lang/Integer.java b/JCL/converterJclMin17/src/java/lang/Integer.java
new file mode 100644
index 0000000..f9b9e0b
--- /dev/null
+++ b/JCL/converterJclMin17/src/java/lang/Integer.java
@@ -0,0 +1,59 @@
+/*******************************************************************************
+ * Copyright (c) 2000, 2004 IBM Corporation and others.
+ * All rights reserved. This program and the accompanying materials
+ * are made available under the terms of the Eclipse Public License v1.0
+ * which accompanies this distribution, and is available at
+ * http://www.eclipse.org/legal/epl-v10.html
+ *
+ * Contributors:
+ *     IBM Corporation - initial API and implementation
+ *******************************************************************************/
+package java.lang;
+
+public class Integer extends Number implements Comparable<Integer> {
+	private static final long serialVersionUID = 6462609062775655000L;
+
+	public Integer(int i) {
+	}
+	public Integer(String s) {
+	}
+	public static final int MAX_VALUE= 2147483647;
+	public static final int MIN_VALUE= -2147483647;
+	
+	public static int parseInt(String s) {
+		return 0;
+	}
+	public static String toHexString(int i) {
+		return null;
+	}
+	public static String toString(int i) {
+		return null;
+	}
+	/* (non-Javadoc)
+	 * @see java.lang.Number#doubleValue()
+	 */
+	public double doubleValue() {
+		return 0;
+	}
+	/* (non-Javadoc)
+	 * @see java.lang.Number#floatValue()
+	 */
+	public float floatValue() {
+		return 0;
+	}
+	/* (non-Javadoc)
+	 * @see java.lang.Number#intValue()
+	 */
+	public int intValue() {
+		return 0;
+	}
+	/* (non-Javadoc)
+	 * @see java.lang.Number#longValue()
+	 */
+	public long longValue() {
+		return 0;
+	}
+	public int compareTo(Integer i) {
+		return 0;
+	}
+}
diff --git a/JCL/converterJclMin17/src/java/lang/InterruptedException.java b/JCL/converterJclMin17/src/java/lang/InterruptedException.java
new file mode 100644
index 0000000..e2e84ba
--- /dev/null
+++ b/JCL/converterJclMin17/src/java/lang/InterruptedException.java
@@ -0,0 +1,4 @@
+package java.lang;

+

+public class InterruptedException extends Exception {

+}

diff --git a/JCL/converterJclMin17/src/java/lang/Iterable.java b/JCL/converterJclMin17/src/java/lang/Iterable.java
new file mode 100644
index 0000000..ab4b9d5
--- /dev/null
+++ b/JCL/converterJclMin17/src/java/lang/Iterable.java
@@ -0,0 +1,10 @@
+package java.lang;
+
+import java.util.Iterator;
+import java.util.function.Consumer;
+
+public interface Iterable<T> {
+    Iterator<T> iterator();
+    default void forEach(Consumer<? super T> action) {
+    }
+}
diff --git a/JCL/converterJclMin17/src/java/lang/LinkageError.java b/JCL/converterJclMin17/src/java/lang/LinkageError.java
new file mode 100644
index 0000000..199d39d
--- /dev/null
+++ b/JCL/converterJclMin17/src/java/lang/LinkageError.java
@@ -0,0 +1,17 @@
+package java.lang;
+
+public
+class LinkageError extends Error {
+
+    public LinkageError() {
+        super();
+    }
+
+    public LinkageError(String s) {
+        super(s);
+    }
+
+    public LinkageError(String s, Throwable cause) {
+        super(s, cause);
+    }
+}
diff --git a/JCL/converterJclMin17/src/java/lang/NoClassDefFoundError.java b/JCL/converterJclMin17/src/java/lang/NoClassDefFoundError.java
new file mode 100644
index 0000000..da0fe41
--- /dev/null
+++ b/JCL/converterJclMin17/src/java/lang/NoClassDefFoundError.java
@@ -0,0 +1,13 @@
+package java.lang;
+
+public
+class NoClassDefFoundError extends LinkageError {
+
+    public NoClassDefFoundError() {
+        super();
+    }
+
+    public NoClassDefFoundError(String s) {
+        super(s);
+    }
+}
diff --git a/JCL/converterJclMin17/src/java/lang/NoSuchFieldError.java b/JCL/converterJclMin17/src/java/lang/NoSuchFieldError.java
new file mode 100644
index 0000000..486e533
--- /dev/null
+++ b/JCL/converterJclMin17/src/java/lang/NoSuchFieldError.java
@@ -0,0 +1,13 @@
+package java.lang;
+
+public
+class NoSuchFieldError extends IncompatibleClassChangeError {
+
+    public NoSuchFieldError() {
+        super();
+    }
+
+    public NoSuchFieldError(String s) {
+        super(s);
+    }
+}
diff --git a/JCL/converterJclMin17/src/java/lang/NoSuchMethodException.java b/JCL/converterJclMin17/src/java/lang/NoSuchMethodException.java
new file mode 100644
index 0000000..b8c5bce
--- /dev/null
+++ b/JCL/converterJclMin17/src/java/lang/NoSuchMethodException.java
@@ -0,0 +1,5 @@
+package java.lang;

+

+public class NoSuchMethodException extends RuntimeException {

+

+}

diff --git a/JCL/converterJclMin17/src/java/lang/NullPointerException.java b/JCL/converterJclMin17/src/java/lang/NullPointerException.java
new file mode 100644
index 0000000..5e4ffa6
--- /dev/null
+++ b/JCL/converterJclMin17/src/java/lang/NullPointerException.java
@@ -0,0 +1,11 @@
+package java.lang;
+public
+class NullPointerException extends RuntimeException {
+    public NullPointerException() {
+        super();
+    }
+
+    public NullPointerException(String s) {
+        super(s);
+    }
+}
\ No newline at end of file
diff --git a/JCL/converterJclMin17/src/java/lang/Number.java b/JCL/converterJclMin17/src/java/lang/Number.java
new file mode 100644
index 0000000..db90345
--- /dev/null
+++ b/JCL/converterJclMin17/src/java/lang/Number.java
@@ -0,0 +1,29 @@
+/*
+ * Copyright (c) 1994, 2021, 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
+ * under the terms of the GNU General Public License version 2 only, as
+ * published by the Free Software Foundation.  Oracle designates this
+ * particular file as subject to the "Classpath" exception as provided
+ * by Oracle in the LICENSE file that accompanied this code.
+ *
+ * This code is distributed in the hope that it will be useful, but WITHOUT
+ * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
+ * FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
+ * version 2 for more details (a copy is included in the LICENSE file that
+ * accompanied this code).
+ *
+ * You should have received a copy of the GNU General Public License version
+ * 2 along with this work; if not, write to the Free Software Foundation,
+ * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
+ *
+ * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
+ * or visit www.oracle.com if you need additional information or have any
+ * questions.
+ */
+
+package java.lang;
+
+public abstract class Number implements java.io.Serializable {
+}
diff --git a/JCL/converterJclMin17/src/java/lang/Object.java b/JCL/converterJclMin17/src/java/lang/Object.java
new file mode 100644
index 0000000..eb50899
--- /dev/null
+++ b/JCL/converterJclMin17/src/java/lang/Object.java
@@ -0,0 +1,34 @@
+package java.lang;

+

+public class Object {

+

+public Object() {

+}

+protected Object clone() throws CloneNotSupportedException {

+	return null;

+}

+public boolean equals (Object obj) {

+	return false;

+}

+protected void finalize () throws Throwable {

+}

+public final Class<? extends Object> getClass() {

+	return null;

+}

+public int hashCode() {

+	return -1;

+}

+public final void notify() throws IllegalMonitorStateException {

+}

+public final void notifyAll() throws IllegalMonitorStateException {

+}

+public String toString () {

+	return null;

+}

+public final void wait () throws IllegalMonitorStateException, InterruptedException {

+}

+public final void wait (long millis) throws IllegalMonitorStateException, InterruptedException {

+}

+public final void wait (long millis, int nanos) throws IllegalMonitorStateException, InterruptedException {

+}

+}

diff --git a/JCL/converterJclMin17/src/java/lang/Override.java b/JCL/converterJclMin17/src/java/lang/Override.java
new file mode 100644
index 0000000..b94fa6e
--- /dev/null
+++ b/JCL/converterJclMin17/src/java/lang/Override.java
@@ -0,0 +1,7 @@
+package java.lang;
+
+import java.lang.annotation.*;
+@Target(ElementType.METHOD)
+@Retention(RetentionPolicy.SOURCE)
+public @interface Override {
+}
diff --git a/JCL/converterJclMin17/src/java/lang/Record.java b/JCL/converterJclMin17/src/java/lang/Record.java
new file mode 100644
index 0000000..c991336
--- /dev/null
+++ b/JCL/converterJclMin17/src/java/lang/Record.java
@@ -0,0 +1,9 @@
+package java.lang;
+public abstract class Record {
+    @Override
+    public abstract boolean equals(Object obj);
+    @Override
+    public abstract int hashCode();
+    @Override
+    public abstract String toString();
+}
diff --git a/JCL/converterJclMin17/src/java/lang/ReflectiveOperationException.java b/JCL/converterJclMin17/src/java/lang/ReflectiveOperationException.java
new file mode 100644
index 0000000..0860c67
--- /dev/null
+++ b/JCL/converterJclMin17/src/java/lang/ReflectiveOperationException.java
@@ -0,0 +1,26 @@
+
+package java.lang;
+
+public class ReflectiveOperationException extends Exception {
+    static final long serialVersionUID = 123456789L;
+
+    public ReflectiveOperationException() {
+        super();
+    }
+
+    public ReflectiveOperationException(String message) {
+        super(message);
+    }
+
+    public ReflectiveOperationException(String message, Throwable cause) {
+        super(message, cause);
+    }
+
+    public ReflectiveOperationException(Throwable cause) {
+        super(cause);
+    }
+
+	public java.lang.Throwable getCause() {
+		return getCause();
+	}
+}
diff --git a/JCL/converterJclMin17/src/java/lang/RuntimeException.java b/JCL/converterJclMin17/src/java/lang/RuntimeException.java
new file mode 100644
index 0000000..80dc1db
--- /dev/null
+++ b/JCL/converterJclMin17/src/java/lang/RuntimeException.java
@@ -0,0 +1,12 @@
+package java.lang;

+

+public class RuntimeException extends Exception {

+

+	public RuntimeException(java.lang.String s) {

+		// TODO Auto-generated constructor stub

+	}

+

+	public RuntimeException() {

+		// TODO Auto-generated constructor stub

+	}

+}

diff --git a/JCL/converterJclMin17/src/java/lang/String.java b/JCL/converterJclMin17/src/java/lang/String.java
new file mode 100644
index 0000000..ba6bf08
--- /dev/null
+++ b/JCL/converterJclMin17/src/java/lang/String.java
@@ -0,0 +1,8 @@
+package java.lang;

+

+public class String implements CharSequence {

+	public int length() { return 0; }

+	 public int codePointAt(int index) {

+		 return 0;

+	 }

+}

diff --git a/JCL/converterJclMin17/src/java/lang/System.java b/JCL/converterJclMin17/src/java/lang/System.java
new file mode 100644
index 0000000..bf56c93
--- /dev/null
+++ b/JCL/converterJclMin17/src/java/lang/System.java
@@ -0,0 +1,20 @@
+package java.lang;
+
+import java.io.InputStream;
+import java.io.PrintStream;
+
+public final class System {
+    private static native void registerNatives();
+    static {
+        registerNatives();
+    }
+
+    private System() {
+    }
+
+    public static final InputStream in = null;
+
+    public static final PrintStream out = null;
+
+
+}
diff --git a/JCL/converterJclMin17/src/java/lang/Throwable.java b/JCL/converterJclMin17/src/java/lang/Throwable.java
new file mode 100644
index 0000000..2488269
--- /dev/null
+++ b/JCL/converterJclMin17/src/java/lang/Throwable.java
@@ -0,0 +1,20 @@
+package java.lang;

+

+public class Throwable {

+

+	public Throwable(java.lang.String message) {

+		// TODO Auto-generated constructor stub

+	}

+

+	public Throwable() {

+		// TODO Auto-generated constructor stub

+	}

+

+	public Throwable(java.lang.String message, Throwable cause) {

+		// TODO Auto-generated constructor stub

+	}

+

+	public Throwable(Throwable cause) {

+		// TODO Auto-generated constructor stub

+	}

+}

diff --git a/JCL/converterJclMin17/src/java/lang/annotation/Annotation.java b/JCL/converterJclMin17/src/java/lang/annotation/Annotation.java
new file mode 100644
index 0000000..ba72aad
--- /dev/null
+++ b/JCL/converterJclMin17/src/java/lang/annotation/Annotation.java
@@ -0,0 +1,4 @@
+package java.lang.annotation;

+public interface Annotation {

+

+}

diff --git a/JCL/converterJclMin17/src/java/lang/annotation/Documented.java b/JCL/converterJclMin17/src/java/lang/annotation/Documented.java
new file mode 100644
index 0000000..34494fb
--- /dev/null
+++ b/JCL/converterJclMin17/src/java/lang/annotation/Documented.java
@@ -0,0 +1,12 @@
+package java.lang.annotation;

+

+import java.lang.annotation.ElementType;

+import java.lang.annotation.Retention;

+import java.lang.annotation.RetentionPolicy;

+import java.lang.annotation.Target;

+

+@Documented

+@Retention(RetentionPolicy.RUNTIME)

+@Target(ElementType.ANNOTATION_TYPE)

+public @interface Documented {

+}

diff --git a/JCL/converterJclMin17/src/java/lang/annotation/ElementType.java b/JCL/converterJclMin17/src/java/lang/annotation/ElementType.java
new file mode 100644
index 0000000..7b5b595
--- /dev/null
+++ b/JCL/converterJclMin17/src/java/lang/annotation/ElementType.java
@@ -0,0 +1,48 @@
+package java.lang.annotation;
+
+public enum ElementType {
+    /** Class, interface (including annotation type), or enum declaration */
+    TYPE,
+
+    /** Field declaration (includes enum constants) */
+    FIELD,
+
+    /** Method declaration */
+    METHOD,
+
+    /** Formal parameter declaration */
+    PARAMETER,
+
+    /** Constructor declaration */
+    CONSTRUCTOR,
+
+    /** Local variable declaration */
+    LOCAL_VARIABLE,
+
+    /** Annotation type declaration */
+    ANNOTATION_TYPE,
+
+    /** Package declaration */
+    PACKAGE,
+
+    /**
+     * Type parameter declaration
+     *
+     * @since 1.8
+     */
+    TYPE_PARAMETER,
+
+    /**
+     * Use of a type
+     *
+     * @since 1.8
+     */
+    TYPE_USE,
+
+    /**
+     * Module declaration.
+     *
+     * @since 9
+     */
+    MODULE
+}
diff --git a/JCL/converterJclMin17/src/java/lang/annotation/Inherited.java b/JCL/converterJclMin17/src/java/lang/annotation/Inherited.java
new file mode 100644
index 0000000..9753e0c
--- /dev/null
+++ b/JCL/converterJclMin17/src/java/lang/annotation/Inherited.java
@@ -0,0 +1,13 @@
+package java.lang.annotation;

+

+import java.lang.annotation.Documented;

+import java.lang.annotation.ElementType;

+import java.lang.annotation.Retention;

+import java.lang.annotation.RetentionPolicy;

+import java.lang.annotation.Target;

+

+@Documented

+@Retention(RetentionPolicy.RUNTIME)

+@Target(ElementType.ANNOTATION_TYPE)

+public @interface Inherited {

+}
\ No newline at end of file
diff --git a/JCL/converterJclMin17/src/java/lang/annotation/Retention.java b/JCL/converterJclMin17/src/java/lang/annotation/Retention.java
new file mode 100644
index 0000000..72f1417
--- /dev/null
+++ b/JCL/converterJclMin17/src/java/lang/annotation/Retention.java
@@ -0,0 +1,14 @@
+package java.lang.annotation;

+

+import java.lang.annotation.Documented;

+import java.lang.annotation.ElementType;

+import java.lang.annotation.Retention;

+import java.lang.annotation.RetentionPolicy;

+import java.lang.annotation.Target;

+

+@Documented

+@Retention(RetentionPolicy.RUNTIME)

+@Target(ElementType.ANNOTATION_TYPE)

+public @interface Retention {

+    RetentionPolicy value();

+}
\ No newline at end of file
diff --git a/JCL/converterJclMin17/src/java/lang/annotation/RetentionPolicy.java b/JCL/converterJclMin17/src/java/lang/annotation/RetentionPolicy.java
new file mode 100644
index 0000000..b69fa7d
--- /dev/null
+++ b/JCL/converterJclMin17/src/java/lang/annotation/RetentionPolicy.java
@@ -0,0 +1,6 @@
+package java.lang.annotation;

+public enum RetentionPolicy {

+    CLASS,

+    SOURCE,

+    RUNTIME

+}
\ No newline at end of file
diff --git a/JCL/converterJclMin17/src/java/lang/annotation/Target.java b/JCL/converterJclMin17/src/java/lang/annotation/Target.java
new file mode 100644
index 0000000..239f6b1
--- /dev/null
+++ b/JCL/converterJclMin17/src/java/lang/annotation/Target.java
@@ -0,0 +1,14 @@
+package java.lang.annotation;

+

+import java.lang.annotation.Documented;

+import java.lang.annotation.ElementType;

+import java.lang.annotation.Retention;

+import java.lang.annotation.RetentionPolicy;

+import java.lang.annotation.Target;

+

+@Documented

+@Retention(RetentionPolicy.RUNTIME)

+@Target(ElementType.ANNOTATION_TYPE)

+public @interface Target {

+    ElementType[] value();

+}
\ No newline at end of file
diff --git a/JCL/converterJclMin17/src/java/lang/invoke/MethodHandle.java b/JCL/converterJclMin17/src/java/lang/invoke/MethodHandle.java
new file mode 100644
index 0000000..7894765
--- /dev/null
+++ b/JCL/converterJclMin17/src/java/lang/invoke/MethodHandle.java
@@ -0,0 +1,39 @@
+package java.lang.invoke;

+/*******************************************************************************

+ * Copyright (c) 2011 IBM Corporation and others.

+ * All rights reserved. This program and the accompanying materials

+ * are made available under the terms of the Eclipse Public License v1.0

+ * which accompanies this distribution, and is available at

+ * http://www.eclipse.org/legal/epl-v10.html

+ *

+ * Contributors:

+ *     IBM Corporation - initial API and implementation

+ *******************************************************************************/

+

+

+import static java.lang.annotation.ElementType.METHOD;

+import static java.lang.annotation.RetentionPolicy.RUNTIME;

+

+import java.lang.annotation.Retention;

+import java.lang.annotation.Target;

+import java.lang.invoke.MethodType;

+

+public abstract class MethodHandle {

+	@Target(METHOD)

+	@Retention(RUNTIME)

+	@interface PolymorphicSignature {

+	}

+

+	@PolymorphicSignature

+	public final native Object invoke(Object... args) throws Throwable;

+

+	@PolymorphicSignature

+	public final native Object invokeExact(Object... args) throws Throwable;

+

+	public native Object invokeWithArguments(Object... arguments)

+			throws Throwable;

+

+	public native boolean isVarargsCollector();

+

+	public native MethodHandle asType(MethodType newType);

+}
\ No newline at end of file
diff --git a/JCL/converterJclMin17/src/java/lang/invoke/MethodHandles.java b/JCL/converterJclMin17/src/java/lang/invoke/MethodHandles.java
new file mode 100644
index 0000000..49d9f1f
--- /dev/null
+++ b/JCL/converterJclMin17/src/java/lang/invoke/MethodHandles.java
@@ -0,0 +1,22 @@
+package java.lang.invoke;

+import java.lang.invoke.MethodType;

+

+public class MethodHandles {

+	public static final class Lookup {

+		public MethodHandle findVirtual(Class<?> refc, String name,

+				MethodType type) throws NoSuchMethodException,

+				IllegalAccessException {

+			return null;

+		}

+

+		public MethodHandle findStatic(Class<?> refc, String name,

+				MethodType type) throws NoSuchMethodException,

+				IllegalAccessException {

+			return null;

+		}

+	}

+

+	public static Lookup lookup() {

+		return null;

+	}

+}

diff --git a/JCL/converterJclMin17/src/java/lang/invoke/MethodType.java b/JCL/converterJclMin17/src/java/lang/invoke/MethodType.java
new file mode 100644
index 0000000..802a3f2
--- /dev/null
+++ b/JCL/converterJclMin17/src/java/lang/invoke/MethodType.java
@@ -0,0 +1,17 @@
+package java.lang.invoke;

+

+

+public final class MethodType {

+	public static MethodType methodType(Class<?> rtype, Class<?> ptype0,

+			Class<?>... ptypes) {

+		return null;

+	}

+

+	public static MethodType methodType(Class<?> rtype) {

+		return null;

+	}

+

+	public static MethodType genericMethodType(int objectArgCount) {

+		return null;

+	}

+}

diff --git a/JCL/converterJclMin17/src/java/lang/invoke/TypeDescriptor.java b/JCL/converterJclMin17/src/java/lang/invoke/TypeDescriptor.java
new file mode 100644
index 0000000..a5e158d
--- /dev/null
+++ b/JCL/converterJclMin17/src/java/lang/invoke/TypeDescriptor.java
@@ -0,0 +1,31 @@
+/*
+ * Copyright (c) 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
+ * under the terms of the GNU General Public License version 2 only, as
+ * published by the Free Software Foundation.  Oracle designates this
+ * particular file as subject to the "Classpath" exception as provided
+ * by Oracle in the LICENSE file that accompanied this code.
+ *
+ * This code is distributed in the hope that it will be useful, but WITHOUT
+ * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
+ * FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
+ * version 2 for more details (a copy is included in the LICENSE file that
+ * accompanied this code).
+ *
+ * You should have received a copy of the GNU General Public License version
+ * 2 along with this work; if not, write to the Free Software Foundation,
+ * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
+ *
+ * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
+ * or visit www.oracle.com if you need additional information or have any
+ * questions.
+ */
+package java.lang.invoke;
+
+import java.util.List;
+
+public interface TypeDescriptor {
+    String descriptorString();
+}
diff --git a/JCL/converterJclMin17/src/java/lang/runtime/ObjectMethods.java b/JCL/converterJclMin17/src/java/lang/runtime/ObjectMethods.java
new file mode 100644
index 0000000..7587fef
--- /dev/null
+++ b/JCL/converterJclMin17/src/java/lang/runtime/ObjectMethods.java
@@ -0,0 +1,14 @@
+package java.lang.runtime;
+
+import java.lang.invoke.MethodHandle;
+import java.lang.invoke.MethodHandles;
+import java.lang.invoke.TypeDescriptor;
+
+public class ObjectMethods {
+    public static Object bootstrap(MethodHandles.Lookup lookup, String methodName, TypeDescriptor type,
+                                   Class<?> recordClass,
+                                   String names,
+                                   MethodHandle... getters) throws Throwable {
+    	return null;
+    }
+}
diff --git a/JCL/converterJclMin17/src/java/lang/runtime/SwitchBootstraps.java b/JCL/converterJclMin17/src/java/lang/runtime/SwitchBootstraps.java
new file mode 100644
index 0000000..9289606
--- /dev/null
+++ b/JCL/converterJclMin17/src/java/lang/runtime/SwitchBootstraps.java
@@ -0,0 +1,30 @@
+/*
+ * Copyright (c) 2017, 2021, 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
+ * under the terms of the GNU General Public License version 2 only, as
+ * published by the Free Software Foundation.  Oracle designates this
+ * particular file as subject to the "Classpath" exception as provided
+ * by Oracle in the LICENSE file that accompanied this code.
+ *
+ * This code is distributed in the hope that it will be useful, but WITHOUT
+ * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
+ * FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
+ * version 2 for more details (a copy is included in the LICENSE file that
+ * accompanied this code).
+ *
+ * You should have received a copy of the GNU General Public License version
+ * 2 along with this work; if not, write to the Free Software Foundation,
+ * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
+ *
+ * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
+ * or visit www.oracle.com if you need additional information or have any
+ * questions.
+ */
+
+package java.lang.runtime;
+
+public class SwitchBootstraps {
+}
+
diff --git a/JCL/converterJclMin17/src/java/util/Collection.java b/JCL/converterJclMin17/src/java/util/Collection.java
new file mode 100644
index 0000000..a40b2d2
--- /dev/null
+++ b/JCL/converterJclMin17/src/java/util/Collection.java
@@ -0,0 +1,9 @@
+package java.util;

+

+public interface Collection<T> extends Iterable<T> {

+	public Iterator<T> iterator();

+	public int size();

+	public T get(int index);

+	public boolean addAll(Collection<T> c);

+	public T[] toArray(T[] o);

+}

diff --git a/JCL/converterJclMin17/src/java/util/Iterator.java b/JCL/converterJclMin17/src/java/util/Iterator.java
new file mode 100644
index 0000000..f90ee76
--- /dev/null
+++ b/JCL/converterJclMin17/src/java/util/Iterator.java
@@ -0,0 +1,7 @@
+package java.util;

+

+public interface Iterator<E> {

+    boolean hasNext();

+    E next();

+    void remove();

+}

diff --git a/JCL/converterJclMin17/src/java/util/List.java b/JCL/converterJclMin17/src/java/util/List.java
new file mode 100644
index 0000000..7d19bdf
--- /dev/null
+++ b/JCL/converterJclMin17/src/java/util/List.java
@@ -0,0 +1,4 @@
+package java.util;

+

+public interface List<E> extends Collection<E> {

+}

diff --git a/JCL/converterJclMin17/src/java/util/Map.java b/JCL/converterJclMin17/src/java/util/Map.java
new file mode 100644
index 0000000..574a7f8
--- /dev/null
+++ b/JCL/converterJclMin17/src/java/util/Map.java
@@ -0,0 +1,5 @@
+package java.util;

+

+public interface Map<K,V> {

+

+}
\ No newline at end of file
diff --git a/JCL/converterJclMin17/src/java/util/function/Consumer.java b/JCL/converterJclMin17/src/java/util/function/Consumer.java
new file mode 100644
index 0000000..dd5b3f4
--- /dev/null
+++ b/JCL/converterJclMin17/src/java/util/function/Consumer.java
@@ -0,0 +1,10 @@
+package java.util.function;
+
+public interface Consumer<T> {
+
+	void accept(T t);
+
+	default Consumer<T> andThen(Consumer<? super T> after) {
+		return null;
+	}
+}
diff --git a/JCL/converterJclMin17/src/javax/lang/model/SourceVersion.java b/JCL/converterJclMin17/src/javax/lang/model/SourceVersion.java
new file mode 100644
index 0000000..557ab18
--- /dev/null
+++ b/JCL/converterJclMin17/src/javax/lang/model/SourceVersion.java
@@ -0,0 +1,66 @@
+package javax.lang.model;
+
+public enum SourceVersion {
+
+	RELEASE_0,
+
+	RELEASE_1,
+
+	RELEASE_2,
+
+	RELEASE_3,
+
+	RELEASE_4,
+
+	RELEASE_5,
+
+	RELEASE_6,
+
+	RELEASE_7,
+
+	RELEASE_8, 
+	RELEASE_9,
+
+	RELEASE_10,
+
+	RELEASE_11,
+
+	RELEASE_12,
+
+	RELEASE_13, 
+	RELEASE_14;
+
+	public static SourceVersion latest() {
+		return RELEASE_14;
+	}
+
+	private static final SourceVersion latestSupported = getLatestSupported();
+
+	private static SourceVersion getLatestSupported() {
+		return RELEASE_14;
+	}
+
+	public static SourceVersion latestSupported() {
+		return latestSupported;
+	}
+
+	public static boolean isIdentifier(CharSequence name) {
+		return true;
+	}
+
+	public static boolean isName(CharSequence name) {
+		return isName(name, latest());
+	}
+
+	public static boolean isName(CharSequence name, SourceVersion version) {
+		return true;
+	}
+
+	public static boolean isKeyword(CharSequence s) {
+		return isKeyword(s, latest());
+	}
+
+	public static boolean isKeyword(CharSequence s, SourceVersion version) {
+		return true;
+	}
+}
diff --git a/JCL/converterJclMin17/src/module-info.java b/JCL/converterJclMin17/src/module-info.java
new file mode 100644
index 0000000..51a23b1
--- /dev/null
+++ b/JCL/converterJclMin17/src/module-info.java
@@ -0,0 +1,7 @@
+module java.base {
+	exports java.lang;
+	exports java.lang.annotation;
+	exports java.lang.invoke;
+	exports java.io;
+	exports java.util;
+}
\ No newline at end of file
diff --git a/JCL/converterJclMin9/src/java/lang/Enum.java b/JCL/converterJclMin9/src/java/lang/Enum.java
index d95e7ae..f5761fb 100644
--- a/JCL/converterJclMin9/src/java/lang/Enum.java
+++ b/JCL/converterJclMin9/src/java/lang/Enum.java
@@ -11,4 +11,8 @@
 	public final int ordinal() {
 		return 0;
 	}
+	public static <T extends Enum<T>> T valueOf(Class<T> enumClass,
+			String name) {
+		return null;   
+	}
 }
\ No newline at end of file
diff --git a/org.eclipse.jdt.apt.core/src/org/eclipse/jdt/apt/core/internal/env/BaseProcessorEnv.java b/org.eclipse.jdt.apt.core/src/org/eclipse/jdt/apt/core/internal/env/BaseProcessorEnv.java
index b4d69e0..518e9c9 100644
--- a/org.eclipse.jdt.apt.core/src/org/eclipse/jdt/apt/core/internal/env/BaseProcessorEnv.java
+++ b/org.eclipse.jdt.apt.core/src/org/eclipse/jdt/apt/core/internal/env/BaseProcessorEnv.java
@@ -7,6 +7,10 @@
  * https://www.eclipse.org/legal/epl-2.0/
  *
  * SPDX-License-Identifier: EPL-2.0
+ * 
+ * This is an implementation of an early-draft specification developed under the Java
+ * Community Process (JCP) and is made available for testing and evaluation purposes
+ * only. The code is not compatible with any specification of the JCP.
  *
  * Contributors:
  *    tyeung@bea.com - initial API and implementation
@@ -85,7 +89,7 @@
  */
 public class BaseProcessorEnv implements AnnotationProcessorEnvironment
 {
-	private static final int JLS_LATEST = AST.JLS16;
+	private static final int JLS_LATEST = AST.getJLSLatest();
 	static{
 		final AST ast = AST.newAST(JLS_LATEST, true);
 		EMPTY_AST_UNIT = ast.newCompilationUnit();
diff --git a/org.eclipse.jdt.apt.tests/src/org/eclipse/jdt/apt/tests/ReadAnnotationTests2.java b/org.eclipse.jdt.apt.tests/src/org/eclipse/jdt/apt/tests/ReadAnnotationTests2.java
index 69a425a..478b888 100644
--- a/org.eclipse.jdt.apt.tests/src/org/eclipse/jdt/apt/tests/ReadAnnotationTests2.java
+++ b/org.eclipse.jdt.apt.tests/src/org/eclipse/jdt/apt/tests/ReadAnnotationTests2.java
@@ -8,6 +8,10 @@
  *
  * SPDX-License-Identifier: EPL-2.0
  *
+ * This is an implementation of an early-draft specification developed under the Java
+ * Community Process (JCP) and is made available for testing and evaluation purposes
+ * only. The code is not compatible with any specification of the JCP.
+ *
  * Contributors:
  *     tyeung@bea.com - initial API and implementation
  *******************************************************************************/
@@ -187,7 +191,7 @@
 		}
 
 		final BindingRequestor requestor = new BindingRequestor();
-		final ASTParser parser = ASTParser.newParser(AST.JLS16);
+		final ASTParser parser = ASTParser.newParser(AST.getJLSLatest());
 		parser.setResolveBindings(true);
 		parser.setProject(javaProj);
 		parser.setIgnoreMethodBodies(true);
diff --git a/org.eclipse.jdt.compiler.apt.tests/.classpath b/org.eclipse.jdt.compiler.apt.tests/.classpath
index b56014d..b60a194 100644
--- a/org.eclipse.jdt.compiler.apt.tests/.classpath
+++ b/org.eclipse.jdt.compiler.apt.tests/.classpath
@@ -16,6 +16,7 @@
 		</attributes>
 	</classpathentry>
 	<classpathentry kind="con" path="org.eclipse.pde.core.requiredPlugins"/>
+	<classpathentry kind="lib" path="lib/javax17api.jar"/>
 	<classpathentry kind="con" path="org.eclipse.jdt.launching.JRE_CONTAINER/org.eclipse.jdt.internal.debug.ui.launcher.StandardVMType/JavaSE-11">
 		<attributes>
 			<attribute name="module" value="true"/>
diff --git a/org.eclipse.jdt.compiler.apt.tests/build.properties b/org.eclipse.jdt.compiler.apt.tests/build.properties
index c01785a..f1edd39 100644
--- a/org.eclipse.jdt.compiler.apt.tests/build.properties
+++ b/org.eclipse.jdt.compiler.apt.tests/build.properties
@@ -27,4 +27,4 @@
                .
 src.includes = about.html
 compilerArg=-proc:none
-jars.extra.classpath = lib/javax16api.jar
+jars.extra.classpath = lib/javax17api.jar
diff --git a/org.eclipse.jdt.compiler.apt.tests/lib/apttestprocessors8.jar b/org.eclipse.jdt.compiler.apt.tests/lib/apttestprocessors8.jar
index a16235f..693619d 100644
--- a/org.eclipse.jdt.compiler.apt.tests/lib/apttestprocessors8.jar
+++ b/org.eclipse.jdt.compiler.apt.tests/lib/apttestprocessors8.jar
Binary files differ
diff --git a/org.eclipse.jdt.compiler.apt.tests/lib/javax16api.jar b/org.eclipse.jdt.compiler.apt.tests/lib/javax17api.jar
similarity index 60%
rename from org.eclipse.jdt.compiler.apt.tests/lib/javax16api.jar
rename to org.eclipse.jdt.compiler.apt.tests/lib/javax17api.jar
index 3064089..ea20c1e 100644
--- a/org.eclipse.jdt.compiler.apt.tests/lib/javax16api.jar
+++ b/org.eclipse.jdt.compiler.apt.tests/lib/javax17api.jar
Binary files differ
diff --git a/org.eclipse.jdt.compiler.apt.tests/lib/lib.x.jar b/org.eclipse.jdt.compiler.apt.tests/lib/lib.x.jar
new file mode 100644
index 0000000..5aa2ee5
--- /dev/null
+++ b/org.eclipse.jdt.compiler.apt.tests/lib/lib.x.jar
Binary files differ
diff --git a/org.eclipse.jdt.compiler.apt.tests/processors8/org/eclipse/jdt/compiler/apt/tests/processors/elements/BaseElementProcessor.java b/org.eclipse.jdt.compiler.apt.tests/processors8/org/eclipse/jdt/compiler/apt/tests/processors/elements/BaseElementProcessor.java
index ff6d4e2..7e4a06e 100644
--- a/org.eclipse.jdt.compiler.apt.tests/processors8/org/eclipse/jdt/compiler/apt/tests/processors/elements/BaseElementProcessor.java
+++ b/org.eclipse.jdt.compiler.apt.tests/processors8/org/eclipse/jdt/compiler/apt/tests/processors/elements/BaseElementProcessor.java
@@ -1,5 +1,5 @@
 /*******************************************************************************
- * Copyright (c) 2020 IBM Corporation.
+ * Copyright (c) 2020, 2021 IBM Corporation.
  *
  * This program and the accompanying materials
  * are made available under the terms of the Eclipse Public License 2.0
@@ -8,6 +8,10 @@
  *
  * SPDX-License-Identifier: EPL-2.0
  *
+ * This is an implementation of an early-draft specification developed under the Java
+ * Community Process (JCP) and is made available for testing and evaluation purposes
+ * only. The code is not compatible with any specification of the JCP.
+ *
  * Contributors:
  *     IBM Corporation - initial API and implementation
  *******************************************************************************/
diff --git a/org.eclipse.jdt.compiler.apt.tests/processors8/org/eclipse/jdt/compiler/apt/tests/processors/elements/Java9ElementProcessor.java b/org.eclipse.jdt.compiler.apt.tests/processors8/org/eclipse/jdt/compiler/apt/tests/processors/elements/Java9ElementProcessor.java
index 5360104..dd89ca6 100644
--- a/org.eclipse.jdt.compiler.apt.tests/processors8/org/eclipse/jdt/compiler/apt/tests/processors/elements/Java9ElementProcessor.java
+++ b/org.eclipse.jdt.compiler.apt.tests/processors8/org/eclipse/jdt/compiler/apt/tests/processors/elements/Java9ElementProcessor.java
@@ -1,5 +1,5 @@
 /*******************************************************************************
- * Copyright (c) 2017, 2020 IBM Corporation.
+ * Copyright (c) 2017, 2021 IBM Corporation.
  *
  * This program and the accompanying materials
  * are made available under the terms of the Eclipse Public License 2.0
@@ -8,6 +8,10 @@
  *
  * SPDX-License-Identifier: EPL-2.0
  *
+ * This is an implementation of an early-draft specification developed under the Java
+ * Community Process (JCP) and is made available for testing and evaluation purposes
+ * only. The code is not compatible with any specification of the JCP.
+ *
  * Contributors:
  *     IBM Corporation - initial API and implementation
  *******************************************************************************/
@@ -52,6 +56,7 @@
 import javax.lang.model.type.NoType;
 import javax.lang.model.type.TypeKind;
 import javax.lang.model.type.TypeMirror;
+import javax.lang.model.util.ElementFilter;
 import javax.tools.JavaFileObject;
 
 import org.eclipse.jdt.compiler.apt.tests.processors.base.BaseProcessor;
@@ -70,15 +75,20 @@
 	boolean reportSuccessAlready = true;
 	RoundEnvironment roundEnv = null;
 	Messager _messager = null;
+	boolean isJre17;
 	boolean isJre12;
 	boolean isJre11;
 	boolean isJre10;
 	int roundNo = 0;
+	boolean isJavac;
 	@Override
 	public synchronized void init(ProcessingEnvironment processingEnv) {
 		super.init(processingEnv);
 		_typeUtils = processingEnv.getTypeUtils();
 		_messager = processingEnv.getMessager();
+		if (!(processingEnv.getClass().getSimpleName().equals("BatchProcessingEnvImpl"))) {
+			this.isJavac = true;
+		}
 		String property = System.getProperty("java.specification.version");
 		if (property.equals(CompilerOptions.VERSION_10)) {
 			this.isJre10 = true;
@@ -89,7 +99,14 @@
 			if (property.indexOf(c) == -1) {
 				int ver12 = Integer.parseInt(CompilerOptions.VERSION_12);
 				int current = Integer.parseInt(property);
-				if (current >= ver12) this.isJre12 = true;
+				if (current >= ver12) {
+					int ver17 = Integer.parseInt(CompilerOptions.VERSION_17);
+					if (current >= ver17) {
+						this.isJre17 = true;
+					} else {
+						this.isJre12 = true;
+					}
+				}
 			}
 		}
 	}
@@ -501,7 +518,7 @@
 		assertNotNull("java.base module null", base);
 		List<? extends Directive> directives = base.getDirectives();
 		List<Directive> filterDirective = filterDirective(directives, DirectiveKind.PROVIDES);
-		assertEquals("incorrect no of provides", 1 , filterDirective.size());
+		assertEquals("incorrect no of provides", (isJre17 ? (this.isJavac ? 4 : 2) : 1), filterDirective.size());
 		ProvidesDirective provides = (ProvidesDirective) filterDirective.get(0);
 		assertEquals("incorrect service name", "java.nio.file.spi.FileSystemProvider", provides.getService().getQualifiedName().toString());
 		List<? extends TypeElement> implementations = provides.getImplementations();
@@ -539,7 +556,7 @@
 		assertNotNull("java.sql module null", base);
 		List<? extends Directive> directives = base.getDirectives();
 		List<Directive> filterDirective = filterDirective(directives, DirectiveKind.REQUIRES);
-		assertEquals("Incorrect no of requires", (this.isJre11 || this.isJre12) ? 4 : 3, filterDirective.size());
+		assertEquals("Incorrect no of requires", (this.isJre11 || this.isJre12 || this.isJre17) ? 4 : 3, filterDirective.size());
 		RequiresDirective req = null;
 		for (Directive directive : filterDirective) {
 			if (((RequiresDirective) directive).getDependency().getQualifiedName().toString().equals("java.logging")) {
@@ -880,6 +897,30 @@
 		}
 		return false;
 	}
+	public void testBug572673() {
+		Set<? extends Element> rootElements = roundEnv.getRootElements();
+		Set<ModuleElement> modulesIn = ElementFilter.modulesIn(rootElements);
+		assertEquals("incorrect modules" , 1, modulesIn.size());
+		boolean found = false;
+		for (ModuleElement moduleElement : modulesIn) {
+			if (moduleElement.getQualifiedName().toString().equals("mod.one")) {
+				found = true;
+				List<? extends Directive> directives = moduleElement.getDirectives();
+				List<Directive> requires = filterDirective(directives, DirectiveKind.REQUIRES);
+				assertEquals("incorrect requires" , 2, requires.size());
+				for (Directive r : requires) {
+					RequiresDirective req = (RequiresDirective) r;
+					ModuleElement depModule = req.getDependency();
+					if (_elementUtils.isAutomaticModule(depModule)) {
+						assertEquals("incorrect auto-module", "lib.x", depModule.getQualifiedName().toString());
+					} else {
+						assertEquals("incorrect non auto-module", "java.base", depModule.getQualifiedName().toString());
+					}
+				}
+			}
+		}
+		assertTrue("module not found", found);
+	}
 	private void validateModifiers(ExecutableElement method, Modifier[] expected) {
 		Set<Modifier> modifiers = method.getModifiers();
 		List<Modifier> list = new ArrayList<>(modifiers);
diff --git a/org.eclipse.jdt.compiler.apt.tests/processors8/org/eclipse/jdt/compiler/apt/tests/processors/elements/RecordElementProcessor.java b/org.eclipse.jdt.compiler.apt.tests/processors8/org/eclipse/jdt/compiler/apt/tests/processors/elements/RecordElementProcessor.java
index 3f2f818..0122e4c 100644
--- a/org.eclipse.jdt.compiler.apt.tests/processors8/org/eclipse/jdt/compiler/apt/tests/processors/elements/RecordElementProcessor.java
+++ b/org.eclipse.jdt.compiler.apt.tests/processors8/org/eclipse/jdt/compiler/apt/tests/processors/elements/RecordElementProcessor.java
@@ -8,6 +8,10 @@
  *
  * SPDX-License-Identifier: EPL-2.0
  *
+ * This is an implementation of an early-draft specification developed under the Java
+ * Community Process (JCP) and is made available for testing and evaluation purposes
+ * only. The code is not compatible with any specification of the JCP.
+ *
  * Contributors:
  *     IBM Corporation - initial API and implementation
  *******************************************************************************/
@@ -32,6 +36,7 @@
 import javax.annotation.processing.ProcessingEnvironment;
 import javax.annotation.processing.RoundEnvironment;
 import javax.annotation.processing.SupportedAnnotationTypes;
+import javax.lang.model.SourceVersion;
 import javax.lang.model.element.AnnotationMirror;
 import javax.lang.model.element.Element;
 import javax.lang.model.element.ElementKind;
@@ -140,6 +145,8 @@
 			boolean preview = ((BaseProcessingEnvImpl) this.processingEnv).isPreviewEnabled();
 			assertTrue("Preview flag not seen as enabled", preview);
 		}
+		SourceVersion sourceVersion = this.processingEnv.getSourceVersion();
+		assertNotSame("Should support the latest compliance", sourceVersion, SourceVersion.RELEASE_6);
 	}
 	/*
 	 * Basic test for record element and kind
diff --git a/org.eclipse.jdt.compiler.apt.tests/resources/targets/bug572673/module-info.java b/org.eclipse.jdt.compiler.apt.tests/resources/targets/bug572673/module-info.java
new file mode 100644
index 0000000..3936742
--- /dev/null
+++ b/org.eclipse.jdt.compiler.apt.tests/resources/targets/bug572673/module-info.java
@@ -0,0 +1,3 @@
+module mod.one { 
+	requires lib.x;
+}
\ No newline at end of file
diff --git a/org.eclipse.jdt.compiler.apt.tests/resources/targets/bug572673/pkg/Entity1.java b/org.eclipse.jdt.compiler.apt.tests/resources/targets/bug572673/pkg/Entity1.java
new file mode 100644
index 0000000..069dbdf
--- /dev/null
+++ b/org.eclipse.jdt.compiler.apt.tests/resources/targets/bug572673/pkg/Entity1.java
@@ -0,0 +1,9 @@
+//package targets.bug535819;
+////import javax.persistence.Entity;
+//
+//@Deprecated
+//public class Entity1 {
+//
+////	private String name;
+//
+//}
\ No newline at end of file
diff --git a/org.eclipse.jdt.compiler.apt.tests/resources/targets/bug572673/pkg/Finder.java b/org.eclipse.jdt.compiler.apt.tests/resources/targets/bug572673/pkg/Finder.java
new file mode 100644
index 0000000..d02fc70
--- /dev/null
+++ b/org.eclipse.jdt.compiler.apt.tests/resources/targets/bug572673/pkg/Finder.java
@@ -0,0 +1,16 @@
+//
+//package targets.bug535819;
+//
+//import javax.annotation.Nonnull;
+//
+////import targets.bug535819.query.QEntity1;
+//import targets.bug535819.query.QEntity2;
+//
+//public class Finder {
+//
+//	@Nonnull
+//	public static QEntity2 getQuery2() {
+//		return new QEntity2();
+//	}
+//
+//}
diff --git a/org.eclipse.jdt.compiler.apt.tests/src/org/eclipse/jdt/compiler/apt/tests/BatchTestUtils.java b/org.eclipse.jdt.compiler.apt.tests/src/org/eclipse/jdt/compiler/apt/tests/BatchTestUtils.java
index 377d9d7..56a4184 100644
--- a/org.eclipse.jdt.compiler.apt.tests/src/org/eclipse/jdt/compiler/apt/tests/BatchTestUtils.java
+++ b/org.eclipse.jdt.compiler.apt.tests/src/org/eclipse/jdt/compiler/apt/tests/BatchTestUtils.java
@@ -1,5 +1,5 @@
 /*******************************************************************************
- * Copyright (c) 2007, 2017 BEA Systems, Inc.
+ * Copyright (c) 2007, 2021 BEA Systems, Inc.
  *
  * This program and the accompanying materials
  * are made available under the terms of the Eclipse Public License 2.0
@@ -63,7 +63,7 @@
 	public static String _jls8ProcessorJarPath;
 
 	// locations to copy and generate files
-	private static String _tmpFolder;
+	public static String _tmpFolder;
 
 	private static JavaCompiler _eclipseCompiler;
 
@@ -261,6 +261,9 @@
 			e.printStackTrace();
 		}
 	}
+	public interface InjectCustomOptions {
+		public void execute(List<String> options);
+	}
 	/*
 	 * First compiles the given files without processor, then processes them
 	 * with the just compiled binaries.
@@ -282,7 +285,7 @@
 		copyOptions.add("-s");
 		copyOptions.add(_tmpGenFolderName);
 		addProcessorPaths(copyOptions, true, true);
-		options.add("-XprintRounds");
+		copyOptions.add("-XprintRounds");
 		CompilationTask task = compiler.getTask(printWriter, manager, listener, copyOptions, null, units);
 		Boolean result = task.call();
 
@@ -346,7 +349,9 @@
 			List<String> options,
 			File targetFolder,
 			DiagnosticListener<? super JavaFileObject> diagnosticListener,
-			boolean useJLS8Processors, boolean addProcessorsToClasspath) {
+			boolean useJLS8Processors, 
+			boolean addProcessorsToClasspath,
+			InjectCustomOptions custom) {
 		StandardJavaFileManager manager = compiler.getStandardFileManager(null, Locale.getDefault(), Charset.defaultCharset());
 
 		// create new list containing inputfile
@@ -359,6 +364,7 @@
 		options.add("-s");
 		options.add(_tmpGenFolderName);
 		addProcessorPaths(options, useJLS8Processors, addProcessorsToClasspath);
+		if (custom != null) custom.execute(options);
 		// use writer to prevent System.out/err to be polluted with problems
 		StringWriter writer = new StringWriter();
 		CompilationTask task = compiler.getTask(writer, manager, diagnosticListener, options, null, units);
@@ -370,7 +376,14 @@
 		}
 		return result.booleanValue();
 	}
-
+	public static boolean compileTreeWithErrors(
+			JavaCompiler compiler,
+			List<String> options,
+			File targetFolder,
+			DiagnosticListener<? super JavaFileObject> diagnosticListener,
+			boolean useJLS8Processors, boolean addProcessorsToClasspath) {
+			return compileTreeWithErrors(compiler, options, targetFolder, diagnosticListener, useJLS8Processors, addProcessorsToClasspath, null);
+		}
 	/**
 	 * Recursively collect all the files under some root.  Ignore directories named "CVS".
 	 * Used when compiling multiple source files.
diff --git a/org.eclipse.jdt.compiler.apt.tests/src/org/eclipse/jdt/compiler/apt/tests/Java9ElementsTests.java b/org.eclipse.jdt.compiler.apt.tests/src/org/eclipse/jdt/compiler/apt/tests/Java9ElementsTests.java
index 0431639..fbcb6df 100644
--- a/org.eclipse.jdt.compiler.apt.tests/src/org/eclipse/jdt/compiler/apt/tests/Java9ElementsTests.java
+++ b/org.eclipse.jdt.compiler.apt.tests/src/org/eclipse/jdt/compiler/apt/tests/Java9ElementsTests.java
@@ -1,5 +1,5 @@
 /*******************************************************************************
- * Copyright (c) 2017, 2020 IBM Corporation.
+ * Copyright (c) 2017, 2021 IBM Corporation.
  *
  * This program and the accompanying materials
  * are made available under the terms of the Eclipse Public License 2.0
@@ -8,6 +8,10 @@
  *
  * SPDX-License-Identifier: EPL-2.0
  *
+ * This is an implementation of an early-draft specification developed under the Java
+ * Community Process (JCP) and is made available for testing and evaluation purposes
+ * only. The code is not compatible with any specification of the JCP.
+ *
  * Contributors:
  *     IBM Corporation - initial API and implementation
  *******************************************************************************/
@@ -418,7 +422,20 @@
 	}
 	public void testBug535819() throws IOException {
 		JavaCompiler compiler = BatchTestUtils.getEclipseCompiler();
-		internalTest(compiler, MODULE_PROC, "testBug535819", null, "bug535819", true);
+		internalTest(compiler, MODULE_PROC, "testBug535819", null, "bug535819", true, null);
+	}
+	public void testBug572673() throws IOException {
+		if (!canRunJava17()) {
+			return;
+		}
+		JavaCompiler compiler = BatchTestUtils.getEclipseCompiler();
+		final String autoModuleJar = BatchTestUtils.setupProcessorJar("lib/lib.x.jar", BatchTestUtils._tmpFolder);
+		internalTest(compiler, MODULE_PROC, "testBug572673", null, "bug572673", true, 
+				(options) -> {
+					options.add("--module-path");
+					options.add(BatchTestUtils._jls8ProcessorJarPath + 
+							File.pathSeparator + autoModuleJar);
+				});
 	}
 	protected void internalTestWithBinary(JavaCompiler compiler, String processor, String compliance, String testMethod, String testClass, String resourceArea) throws IOException {
 		if (!canRunJava9()) {
@@ -478,9 +495,10 @@
 		assertEquals("succeeded", System.getProperty(processor));
 	}
 	private void internalTest(JavaCompiler compiler, String processor, String testMethod, String testClass, String resourceArea) throws IOException {
-		internalTest(compiler, processor, testMethod, testClass, resourceArea, false);
+		internalTest(compiler, processor, testMethod, testClass, resourceArea, false, null);
 	}
-	private void internalTest(JavaCompiler compiler, String processor, String testMethod, String testClass, String resourceArea, boolean continueWithErrors) throws IOException {
+	private void internalTest(JavaCompiler compiler, String processor, String testMethod, String testClass, String resourceArea, 
+			boolean continueWithErrors, BatchTestUtils.InjectCustomOptions custom) throws IOException {
 		if (!canRunJava9()) {
 			return;
 		}
@@ -503,7 +521,7 @@
 		PrintWriter printWriter = new PrintWriter(errBuffer);
 		TestDiagnosticListener diagnosticListener = new TestDiagnosticListener(printWriter);
 		if (continueWithErrors) {
-			BatchTestUtils.compileTreeWithErrors(compiler, options, targetFolder, diagnosticListener, true, true);
+			BatchTestUtils.compileTreeWithErrors(compiler, options, targetFolder, diagnosticListener, true, true, custom);
 		} else {
 			BatchTestUtils.compileTree(compiler, options, targetFolder, true);
 		}
@@ -556,7 +574,14 @@
 		BatchTestUtils.compileInModuleMode(compiler, options, processor, srcRoot, null, true, binaryMode);
 		assertEquals("succeeded", System.getProperty(processor));
 	}
-	
+	public boolean canRunJava17() {
+		try {
+			SourceVersion.valueOf("RELEASE_17");
+		} catch(IllegalArgumentException iae) {
+			return false;
+		}
+		return true;
+	}
 	public boolean canRunJava9() {
 		try {
 			SourceVersion.valueOf("RELEASE_9");
diff --git a/org.eclipse.jdt.compiler.apt.tests/src/org/eclipse/jdt/compiler/apt/tests/RecordElementsTests.java b/org.eclipse.jdt.compiler.apt.tests/src/org/eclipse/jdt/compiler/apt/tests/RecordElementsTests.java
index b82530a..00eaf0a 100644
--- a/org.eclipse.jdt.compiler.apt.tests/src/org/eclipse/jdt/compiler/apt/tests/RecordElementsTests.java
+++ b/org.eclipse.jdt.compiler.apt.tests/src/org/eclipse/jdt/compiler/apt/tests/RecordElementsTests.java
@@ -8,6 +8,10 @@
  *
  * SPDX-License-Identifier: EPL-2.0
  *
+ * This is an implementation of an early-draft specification developed under the Java
+ * Community Process (JCP) and is made available for testing and evaluation purposes
+ * only. The code is not compatible with any specification of the JCP.
+ *
  * Contributors:
  *     IBM Corporation - initial API and implementation
  *******************************************************************************/
@@ -19,6 +23,7 @@
 import java.util.ArrayList;
 import java.util.List;
 
+import javax.lang.model.SourceVersion;
 import javax.tools.JavaCompiler;
 import javax.tools.ToolProvider;
 
@@ -31,112 +36,115 @@
 	private static final String MODULE_PROC = "org.eclipse.jdt.compiler.apt.tests.processors.elements.RecordElementProcessor";
 
 	public void testPreviewFlagTrue() throws IOException {
+		if (!isRunning17()) {
+			return;
+		}
 		JavaCompiler compiler = BatchTestUtils.getEclipseCompiler();
-		internalTestWithPreview(compiler, MODULE_PROC, "16", "testPreviewFlagTrue", null, "records", true);
+		internalTestWithPreview(compiler, MODULE_PROC, CompilerOptions.getLatestVersion(), "testPreviewFlagTrue", null, "records", true);
 	}
 	public void testRecords1() throws IOException {
 		JavaCompiler compiler = BatchTestUtils.getEclipseCompiler();
-		internalTestWithPreview(compiler, MODULE_PROC, "16", "testRecords1", null, "records", true);
+		internalTestWithPreview(compiler, MODULE_PROC, "16", "testRecords1", null, "records", false);
 	}
 	public void testRecords1Javac() throws Exception {
 		JavaCompiler compiler = ToolProvider.getSystemJavaCompiler();
-		internalTestWithPreview(compiler, MODULE_PROC, "16", "testRecords1", null, "records", true);
+		internalTestWithPreview(compiler, MODULE_PROC, "16", "testRecords1", null, "records", false);
 	}
 	public void testRecords2() throws IOException {
 		JavaCompiler compiler = BatchTestUtils.getEclipseCompiler();
-		internalTestWithPreview(compiler, MODULE_PROC, "16", "testRecords2", null, "records", true);
+		internalTestWithPreview(compiler, MODULE_PROC, "16", "testRecords2", null, "records", false);
 	}
 	public void testRecords2Javac() throws Exception {
 		JavaCompiler compiler = ToolProvider.getSystemJavaCompiler();
-		internalTestWithPreview(compiler, MODULE_PROC, "16", "testRecords2", null, "records", true);
+		internalTestWithPreview(compiler, MODULE_PROC, "16", "testRecords2", null, "records", false);
 	}
 	public void testRecords3() throws IOException {
 		JavaCompiler compiler = BatchTestUtils.getEclipseCompiler();
-		internalTestWithPreview(compiler, MODULE_PROC, "16", "testRecords3", null, "records", true);
+		internalTestWithPreview(compiler, MODULE_PROC, "16", "testRecords3", null, "records", false);
 	}
 	public void testRecords3Javac() throws Exception {
 		JavaCompiler compiler = ToolProvider.getSystemJavaCompiler();
-		internalTestWithPreview(compiler, MODULE_PROC, "16", "testRecords3", null, "records", true);
+		internalTestWithPreview(compiler, MODULE_PROC, "16", "testRecords3", null, "records", false);
 	}
 	public void testRecords3a() throws IOException {
 		JavaCompiler compiler = BatchTestUtils.getEclipseCompiler();
-		internalTestWithPreview(compiler, MODULE_PROC, "16", "testRecords3a", null, "records", true);
+		internalTestWithPreview(compiler, MODULE_PROC, "16", "testRecords3a", null, "records", false);
 	}
 	public void testRecords3aJavac() throws Exception {
 		JavaCompiler compiler = ToolProvider.getSystemJavaCompiler();
-		internalTestWithPreview(compiler, MODULE_PROC, "16", "testRecords3a", null, "records", true);
+		internalTestWithPreview(compiler, MODULE_PROC, "16", "testRecords3a", null, "records", false);
 	}
 	public void testRecords4() throws IOException {
 		JavaCompiler compiler = BatchTestUtils.getEclipseCompiler();
-		internalTestWithPreview(compiler, MODULE_PROC, "16", "testRecords4", null, "records", true);
+		internalTestWithPreview(compiler, MODULE_PROC, "16", "testRecords4", null, "records", false);
 	}
 	public void testRecords4Javac() throws Exception {
 		JavaCompiler compiler = ToolProvider.getSystemJavaCompiler();
-		internalTestWithPreview(compiler, MODULE_PROC, "16", "testRecords4", null, "records", true);
+		internalTestWithPreview(compiler, MODULE_PROC, "16", "testRecords4", null, "records", false);
 	}
 	public void testRecords4a() throws IOException {
 		JavaCompiler compiler = BatchTestUtils.getEclipseCompiler();
-		internalTestWithPreview(compiler, MODULE_PROC, "16", "testRecords4a", null, "records", true, true);
+		internalTestWithPreview(compiler, MODULE_PROC, "16", "testRecords4a", null, "records", false, true);
 	}
 	public void _testRecords4aJavac() throws Exception {
 		JavaCompiler compiler = ToolProvider.getSystemJavaCompiler();
-		internalTestWithPreview(compiler, MODULE_PROC, "16", "testRecords4a", null, "records", true, true);
+		internalTestWithPreview(compiler, MODULE_PROC, "16", "testRecords4a", null, "records", false, true);
 	}
 	public void testRecords5() throws IOException {
 		JavaCompiler compiler = BatchTestUtils.getEclipseCompiler();
-		internalTestWithPreview(compiler, MODULE_PROC, "16", "testRecords5", null, "records", true);
+		internalTestWithPreview(compiler, MODULE_PROC, "16", "testRecords5", null, "records", false);
 	}
 	public void testRecords5Javac() throws IOException {
 		JavaCompiler compiler = ToolProvider.getSystemJavaCompiler();
-		internalTestWithPreview(compiler, MODULE_PROC, "16", "testRecords5", null, "records", true);
+		internalTestWithPreview(compiler, MODULE_PROC, "16", "testRecords5", null, "records", false);
 	}
 	public void testRecords5a() throws IOException {
 		JavaCompiler compiler = BatchTestUtils.getEclipseCompiler();
-		internalTestWithPreview(compiler, MODULE_PROC, "16", "testRecords5a", null, "records", true);
+		internalTestWithPreview(compiler, MODULE_PROC, "16", "testRecords5a", null, "records", false);
 	}
 	public void testRecords5aJavac() throws IOException {
 		JavaCompiler compiler = ToolProvider.getSystemJavaCompiler();
-		internalTestWithPreview(compiler, MODULE_PROC, "16", "testRecords5a", null, "records", true);
+		internalTestWithPreview(compiler, MODULE_PROC, "16", "testRecords5a", null, "records", false);
 	}
 	public void testRecords6() throws IOException {
 		JavaCompiler compiler = BatchTestUtils.getEclipseCompiler();
-		internalTestWithPreview(compiler, MODULE_PROC, "16", "testRecords6", null, "records", true);
+		internalTestWithPreview(compiler, MODULE_PROC, "16", "testRecords6", null, "records", false);
 	}
 	public void testRecords6Javac() throws IOException {
 		JavaCompiler compiler = ToolProvider.getSystemJavaCompiler();
-		internalTestWithPreview(compiler, MODULE_PROC, "16", "testRecords6", null, "records", true);
+		internalTestWithPreview(compiler, MODULE_PROC, "16", "testRecords6", null, "records", false);
 	}
 	public void testRecords7() throws IOException {
 		JavaCompiler compiler = BatchTestUtils.getEclipseCompiler();
-		internalTestWithPreview(compiler, MODULE_PROC, "16", "testRecords7", null, "records", true);
+		internalTestWithPreview(compiler, MODULE_PROC, "16", "testRecords7", null, "records", false);
 	}
 	public void testRecords7Javac() throws IOException {
 		JavaCompiler compiler = ToolProvider.getSystemJavaCompiler();
-		internalTestWithPreview(compiler, MODULE_PROC, "16", "testRecords7", null, "records", true);
+		internalTestWithPreview(compiler, MODULE_PROC, "16", "testRecords7", null, "records", false);
 	}
 	public void testRecords8() throws IOException {
 		JavaCompiler compiler = BatchTestUtils.getEclipseCompiler();
-		internalTestWithPreview(compiler, MODULE_PROC, "16", "testRecords8", null, "records", true);
+		internalTestWithPreview(compiler, MODULE_PROC, "16", "testRecords8", null, "records", false);
 	}
 	public void testRecords8Javac() throws IOException {
 		JavaCompiler compiler = ToolProvider.getSystemJavaCompiler();
-		internalTestWithPreview(compiler, MODULE_PROC, "16", "testRecords8", null, "records", true);
+		internalTestWithPreview(compiler, MODULE_PROC, "16", "testRecords8", null, "records", false);
 	}
 	public void testRecords9() throws IOException {
 		JavaCompiler compiler = BatchTestUtils.getEclipseCompiler();
-		internalTestWithPreview(compiler, MODULE_PROC, "16", "testRecords9", null, "records", true);
+		internalTestWithPreview(compiler, MODULE_PROC, "16", "testRecords9", null, "records", false);
 	}
 	public void testRecords9Javac() throws IOException {
 		JavaCompiler compiler = ToolProvider.getSystemJavaCompiler();
-		internalTestWithPreview(compiler, MODULE_PROC, "16", "testRecords9", null, "records", true);
+		internalTestWithPreview(compiler, MODULE_PROC, "16", "testRecords9", null, "records", false);
 	}
 	public void testRecords10() throws IOException {
 		JavaCompiler compiler = BatchTestUtils.getEclipseCompiler();
-		internalTestWithPreview(compiler, MODULE_PROC, "16", "testRecords10", null, "records", true);
+		internalTestWithPreview(compiler, MODULE_PROC, "16", "testRecords10", null, "records", false);
 	}
 	public void testRecords10Javac() throws IOException {
 		JavaCompiler compiler = ToolProvider.getSystemJavaCompiler();
-		internalTestWithPreview(compiler, MODULE_PROC, "16", "testRecords10", null, "records", true);
+		internalTestWithPreview(compiler, MODULE_PROC, "16", "testRecords10", null, "records", false);
 	}
 
 	protected void internalTestWithPreview(JavaCompiler compiler, String processor, String compliance,
@@ -174,9 +182,21 @@
 		// if not, it will set it to an error value.
 		assertEquals("succeeded", System.getProperty(processor));
 	}
+	public boolean isRunning17() {
+		try {
+			SourceVersion.valueOf("RELEASE_17");
+		} catch(IllegalArgumentException iae) {
+			return false;
+		}
+		return true;
+	}
 	public boolean isRunning16() {
-		String specVersion = System.getProperty("java.specification.version");
-		return CompilerOptions.VERSION_16.equals(specVersion);
+		try {
+			SourceVersion.valueOf("RELEASE_16");
+		} catch(IllegalArgumentException iae) {
+			return false;
+		}
+		return true;
 	}
 	/* (non-Javadoc)
 	 * @see junit.framework.TestCase#setUp()
diff --git a/org.eclipse.jdt.compiler.apt.tests/src/org/eclipse/jdt/compiler/apt/tests/SealedTypeElementsTests.java b/org.eclipse.jdt.compiler.apt.tests/src/org/eclipse/jdt/compiler/apt/tests/SealedTypeElementsTests.java
index ffc293c..1f6d15e 100644
--- a/org.eclipse.jdt.compiler.apt.tests/src/org/eclipse/jdt/compiler/apt/tests/SealedTypeElementsTests.java
+++ b/org.eclipse.jdt.compiler.apt.tests/src/org/eclipse/jdt/compiler/apt/tests/SealedTypeElementsTests.java
@@ -32,64 +32,64 @@
 
 	public void test001() throws IOException {
 		JavaCompiler compiler = BatchTestUtils.getEclipseCompiler();
-		internalTestWithPreview(compiler, MODULE_PROC, "16", "test001", null, "sealed", true);
+		internalTestWithPreview(compiler, MODULE_PROC, "17", "test001", null, "sealed", false);
 	}
 	public void test001Javac() throws IOException {
 		JavaCompiler compiler = ToolProvider.getSystemJavaCompiler();
-		internalTestWithPreview(compiler, MODULE_PROC, "16", "test001", null, "sealed", true);
+		internalTestWithPreview(compiler, MODULE_PROC, "17", "test001", null, "sealed", true);
 	}
 	public void test002() throws IOException {
 		JavaCompiler compiler = BatchTestUtils.getEclipseCompiler();
-		internalTestWithPreview(compiler, MODULE_PROC, "16", "test002", null, "sealed", true);
+		internalTestWithPreview(compiler, MODULE_PROC, "17", "test002", null, "sealed", false);
 	}
 	public void test002Javac() throws IOException {
 		JavaCompiler compiler = ToolProvider.getSystemJavaCompiler();
-		internalTestWithPreview(compiler, MODULE_PROC, "16", "test002", null, "sealed", true);
+		internalTestWithPreview(compiler, MODULE_PROC, "17", "test002", null, "sealed", true);
 	}
 	public void test003() throws IOException {
 		JavaCompiler compiler = BatchTestUtils.getEclipseCompiler();
-		internalTestWithPreview(compiler, MODULE_PROC, "16", "test003", null, "sealed", true);
+		internalTestWithPreview(compiler, MODULE_PROC, "17", "test003", null, "sealed", false);
 	}
 	public void test003Javac() throws IOException {
 		JavaCompiler compiler = ToolProvider.getSystemJavaCompiler();
-		internalTestWithPreview(compiler, MODULE_PROC, "16", "test003", null, "sealed", true);
+		internalTestWithPreview(compiler, MODULE_PROC, "17", "test003", null, "sealed", true);
 	}
 	public void test004() throws IOException {
 		JavaCompiler compiler = BatchTestUtils.getEclipseCompiler();
-		internalTestWithPreview(compiler, MODULE_PROC, "16", "test004", null, "sealed", true);
+		internalTestWithPreview(compiler, MODULE_PROC, "17", "test004", null, "sealed", false);
 	}
 	public void test004Javac() throws IOException {
 		JavaCompiler compiler = ToolProvider.getSystemJavaCompiler();
-		internalTestWithPreview(compiler, MODULE_PROC, "16", "test004", null, "sealed", true);
+		internalTestWithPreview(compiler, MODULE_PROC, "17", "test004", null, "sealed", true);
 	}
 	public void test005Src() throws IOException {
 		JavaCompiler compiler = BatchTestUtils.getEclipseCompiler();
-		internalTestWithPreview(compiler, MODULE_PROC, "16", "test005Src", null, "sealed", true);
+		internalTestWithPreview(compiler, MODULE_PROC, "17", "test005Src", null, "sealed", false);
 	}
 	public void test005SrcJavac() throws IOException {
 		JavaCompiler compiler = ToolProvider.getSystemJavaCompiler();
-		internalTestWithPreview(compiler, MODULE_PROC, "16", "test005Src", null, "sealed", true);
+		internalTestWithPreview(compiler, MODULE_PROC, "17", "test005Src", null, "sealed", true);
 	}
 	public void test005Binary() throws IOException {
 		JavaCompiler compiler = BatchTestUtils.getEclipseCompiler();
-		internalTestWithPreview(compiler, MODULE_PROC, "16", "test005Binary", null, "sealed", true);
+		internalTestWithPreview(compiler, MODULE_PROC, "17", "test005Binary", null, "sealed", false);
 	}
 	public void test005BinaryJavac() throws IOException {
 		JavaCompiler compiler = ToolProvider.getSystemJavaCompiler();
-		internalTestWithPreview(compiler, MODULE_PROC, "16", "test005Binary", null, "sealed", true);
+		internalTestWithPreview(compiler, MODULE_PROC, "17", "test005Binary", null, "sealed", true);
 	}
 	public void test006() throws IOException {
 		JavaCompiler compiler = BatchTestUtils.getEclipseCompiler();
-		internalTestWithPreview(compiler, MODULE_PROC, "16", "test006", null, "sealed", true);
+		internalTestWithPreview(compiler, MODULE_PROC, "17", "test006", null, "sealed", false);
 	}
 	public void test006Javac() throws IOException {
 		JavaCompiler compiler = ToolProvider.getSystemJavaCompiler();
-		internalTestWithPreview(compiler, MODULE_PROC, "16", "test006", null, "sealed", true);
+		internalTestWithPreview(compiler, MODULE_PROC, "17", "test006", null, "sealed", true);
 	}
 
 	protected void internalTestWithPreview(JavaCompiler compiler, String processor, String compliance,
 			String testMethod, String testClass, String resourceArea, boolean preview) throws IOException {
-		if (!canRunJava16()) {
+		if (!canRunJava17()) {
 			return;
 		}
 		System.clearProperty(processor);
@@ -118,9 +118,9 @@
 		// if not, it will set it to an error value.
 		assertEquals("succeeded", System.getProperty(processor));
 	}
-	public boolean canRunJava16() {
+	public boolean canRunJava17() {
 		try {
-			SourceVersion.valueOf("RELEASE_16");
+			SourceVersion.valueOf("RELEASE_17");
 		} catch(IllegalArgumentException iae) {
 			return false;
 		}
diff --git a/org.eclipse.jdt.compiler.apt/build.properties b/org.eclipse.jdt.compiler.apt/build.properties
index 47dbd75..8538c59 100644
--- a/org.eclipse.jdt.compiler.apt/build.properties
+++ b/org.eclipse.jdt.compiler.apt/build.properties
@@ -22,4 +22,4 @@
 output.. = bin/
 source.. = src/
 
-jars.extra.classpath = lib/javax16api.jar
+jars.extra.classpath = lib/javax17api.jar
diff --git a/org.eclipse.jdt.compiler.apt/lib/javax16api.jar b/org.eclipse.jdt.compiler.apt/lib/javax16api.jar
deleted file mode 100644
index 3064089..0000000
--- a/org.eclipse.jdt.compiler.apt/lib/javax16api.jar
+++ /dev/null
Binary files differ
diff --git a/org.eclipse.jdt.compiler.apt.tests/lib/javax16api.jar b/org.eclipse.jdt.compiler.apt/lib/javax17api.jar
similarity index 60%
copy from org.eclipse.jdt.compiler.apt.tests/lib/javax16api.jar
copy to org.eclipse.jdt.compiler.apt/lib/javax17api.jar
index 3064089..ea20c1e 100644
--- a/org.eclipse.jdt.compiler.apt.tests/lib/javax16api.jar
+++ b/org.eclipse.jdt.compiler.apt/lib/javax17api.jar
Binary files differ
diff --git a/org.eclipse.jdt.compiler.apt/src/org/eclipse/jdt/internal/compiler/apt/dispatch/BaseProcessingEnvImpl.java b/org.eclipse.jdt.compiler.apt/src/org/eclipse/jdt/internal/compiler/apt/dispatch/BaseProcessingEnvImpl.java
index d15571e..77c3b41 100644
--- a/org.eclipse.jdt.compiler.apt/src/org/eclipse/jdt/internal/compiler/apt/dispatch/BaseProcessingEnvImpl.java
+++ b/org.eclipse.jdt.compiler.apt/src/org/eclipse/jdt/internal/compiler/apt/dispatch/BaseProcessingEnvImpl.java
@@ -1,5 +1,5 @@
 /*******************************************************************************
- * Copyright (c) 2007, 2019 BEA Systems, Inc.
+ * Copyright (c) 2007, 2021 BEA Systems, Inc.
  *
  * This program and the accompanying materials
  * are made available under the terms of the Eclipse Public License 2.0
@@ -8,6 +8,10 @@
  *
  * SPDX-License-Identifier: EPL-2.0
  *
+ * This is an implementation of an early-draft specification developed under the Java
+ * Community Process (JCP) and is made available for testing and evaluation purposes
+ * only. The code is not compatible with any specification of the JCP.
+ *
  * Contributors:
  *    wharley@bea.com - initial API and implementation
  *    IBM Corporation - fix for 342598
@@ -159,6 +163,9 @@
 			if (this._compiler.options.sourceLevel == ClassFileConstants.JDK16) {
 				return SourceVersion.valueOf("RELEASE_16"); //$NON-NLS-1$
 			}
+			if (this._compiler.options.sourceLevel == ClassFileConstants.JDK17) {
+				return SourceVersion.valueOf("RELEASE_17"); //$NON-NLS-1$
+			}
 		} catch(IllegalArgumentException e) {
 			// handle call on a JDK 6
 			return SourceVersion.RELEASE_6;
diff --git a/org.eclipse.jdt.compiler.apt/src/org/eclipse/jdt/internal/compiler/apt/model/ElementsImpl9.java b/org.eclipse.jdt.compiler.apt/src/org/eclipse/jdt/internal/compiler/apt/model/ElementsImpl9.java
index 60bb931..06c9d03 100644
--- a/org.eclipse.jdt.compiler.apt/src/org/eclipse/jdt/internal/compiler/apt/model/ElementsImpl9.java
+++ b/org.eclipse.jdt.compiler.apt/src/org/eclipse/jdt/internal/compiler/apt/model/ElementsImpl9.java
@@ -1,5 +1,5 @@
 /*******************************************************************************
- * Copyright (c) 2006, 2017 BEA Systems, Inc. and others
+ * Copyright (c) 2006, 2021 BEA Systems, Inc. and others
  *
  * This program and the accompanying materials
  * are made available under the terms of the Eclipse Public License 2.0
@@ -8,6 +8,10 @@
  *
  * SPDX-License-Identifier: EPL-2.0
  *
+ * This is an implementation of an early-draft specification developed under the Java
+ * Community Process (JCP) and is made available for testing and evaluation purposes
+ * only. The code is not compatible with any specification of the JCP.
+ *
  * Contributors:
  *    Igor Fedorenko - extracted from ElementsImpl
  *******************************************************************************/
@@ -182,4 +186,8 @@
 			return null;
 		return (PackageElement) _env.getFactory().newElement(p);
 	}
+	public boolean isAutomaticModule(ModuleElement module) {
+		ModuleBinding mBinding = ((ModuleElementImpl) module).binding;
+        return mBinding.isAutomatic();
+    }
 }
diff --git a/org.eclipse.jdt.compiler.tool.tests/.classpath b/org.eclipse.jdt.compiler.tool.tests/.classpath
index 3623077..6b4813d 100644
--- a/org.eclipse.jdt.compiler.tool.tests/.classpath
+++ b/org.eclipse.jdt.compiler.tool.tests/.classpath
@@ -6,6 +6,7 @@
 		</attributes>
 	</classpathentry>
 	<classpathentry kind="con" path="org.eclipse.pde.core.requiredPlugins"/>
+	<classpathentry kind="lib" path="lib/javax17api.jar"/>
 	<classpathentry kind="con" path="org.eclipse.jdt.launching.JRE_CONTAINER/org.eclipse.jdt.internal.debug.ui.launcher.StandardVMType/JavaSE-11">
 		<attributes>
 			<attribute name="module" value="true"/>
diff --git a/org.eclipse.jdt.compiler.tool.tests/build.properties b/org.eclipse.jdt.compiler.tool.tests/build.properties
index ed29075..aa3e963 100644
--- a/org.eclipse.jdt.compiler.tool.tests/build.properties
+++ b/org.eclipse.jdt.compiler.tool.tests/build.properties
@@ -22,4 +22,4 @@
 src.includes = about.html
 source.. = src/
 output.. = bin/
-jars.extra.classpath = lib/javax16api.jar
+jars.extra.classpath = lib/javax17api.jar
diff --git a/org.eclipse.jdt.compiler.tool.tests/lib/javax16api.jar b/org.eclipse.jdt.compiler.tool.tests/lib/javax16api.jar
deleted file mode 100644
index 3064089..0000000
--- a/org.eclipse.jdt.compiler.tool.tests/lib/javax16api.jar
+++ /dev/null
Binary files differ
diff --git a/org.eclipse.jdt.compiler.apt.tests/lib/javax16api.jar b/org.eclipse.jdt.compiler.tool.tests/lib/javax17api.jar
similarity index 60%
copy from org.eclipse.jdt.compiler.apt.tests/lib/javax16api.jar
copy to org.eclipse.jdt.compiler.tool.tests/lib/javax17api.jar
index 3064089..ea20c1e 100644
--- a/org.eclipse.jdt.compiler.apt.tests/lib/javax16api.jar
+++ b/org.eclipse.jdt.compiler.tool.tests/lib/javax17api.jar
Binary files differ
diff --git a/org.eclipse.jdt.compiler.tool/.classpath b/org.eclipse.jdt.compiler.tool/.classpath
index 038950c..807f17e 100644
--- a/org.eclipse.jdt.compiler.tool/.classpath
+++ b/org.eclipse.jdt.compiler.tool/.classpath
@@ -2,6 +2,7 @@
 <classpath>
 	<classpathentry kind="src" path="src"/>
 	<classpathentry kind="con" path="org.eclipse.pde.core.requiredPlugins"/>
+	<classpathentry kind="lib" path="lib/javax17api.jar"/>
 	<classpathentry kind="con" path="org.eclipse.jdt.launching.JRE_CONTAINER/org.eclipse.jdt.internal.debug.ui.launcher.StandardVMType/JavaSE-11">
 		<attributes>
 			<attribute name="module" value="true"/>
diff --git a/org.eclipse.jdt.compiler.tool/build.properties b/org.eclipse.jdt.compiler.tool/build.properties
index 7ac238f..678ee0d 100644
--- a/org.eclipse.jdt.compiler.tool/build.properties
+++ b/org.eclipse.jdt.compiler.tool/build.properties
@@ -17,6 +17,7 @@
 bin.includes = META-INF/,\
                .,\
                about.html,\
-               compiler_tool_fragment.properties
+               compiler_tool_fragment.properties,\
+               lib/javax17api.jar
 src.includes = about.html
-jars.extra.classpath = lib/javax16api.jar
\ No newline at end of file
+jars.extra.classpath = lib/javax17api.jar
diff --git a/org.eclipse.jdt.compiler.tool/lib/javax16api.jar b/org.eclipse.jdt.compiler.tool/lib/javax16api.jar
deleted file mode 100644
index 3064089..0000000
--- a/org.eclipse.jdt.compiler.tool/lib/javax16api.jar
+++ /dev/null
Binary files differ
diff --git a/org.eclipse.jdt.compiler.apt.tests/lib/javax16api.jar b/org.eclipse.jdt.compiler.tool/lib/javax17api.jar
similarity index 60%
copy from org.eclipse.jdt.compiler.apt.tests/lib/javax16api.jar
copy to org.eclipse.jdt.compiler.tool/lib/javax17api.jar
index 3064089..ea20c1e 100644
--- a/org.eclipse.jdt.compiler.apt.tests/lib/javax16api.jar
+++ b/org.eclipse.jdt.compiler.tool/lib/javax17api.jar
Binary files differ
diff --git a/org.eclipse.jdt.core.tests.builder/src/org/eclipse/jdt/core/tests/builder/Bug571363Test.java b/org.eclipse.jdt.core.tests.builder/src/org/eclipse/jdt/core/tests/builder/Bug571363Test.java
index b86706c..726fb39 100644
--- a/org.eclipse.jdt.core.tests.builder/src/org/eclipse/jdt/core/tests/builder/Bug571363Test.java
+++ b/org.eclipse.jdt.core.tests.builder/src/org/eclipse/jdt/core/tests/builder/Bug571363Test.java
@@ -48,7 +48,7 @@
 		return null;
 	}
 
-	public void testBug571363() throws JavaModelException, Exception {
+	public void _testBug571363() throws JavaModelException, Exception {
 		IPath projectPath = env.addProject("Bug571364Test", "12"); //$NON-NLS-1$
 		env.getJavaProject(projectPath).setOption(JavaCore.COMPILER_COMPLIANCE, JavaCore.VERSION_11);
 		env.getJavaProject(projectPath).setOption(JavaCore.COMPILER_RELEASE, JavaCore.ENABLED);
diff --git a/org.eclipse.jdt.core.tests.builder/src/org/eclipse/jdt/core/tests/builder/TestingEnvironment.java b/org.eclipse.jdt.core.tests.builder/src/org/eclipse/jdt/core/tests/builder/TestingEnvironment.java
index 9b680d9..1153d16 100644
--- a/org.eclipse.jdt.core.tests.builder/src/org/eclipse/jdt/core/tests/builder/TestingEnvironment.java
+++ b/org.eclipse.jdt.core.tests.builder/src/org/eclipse/jdt/core/tests/builder/TestingEnvironment.java
@@ -29,13 +29,12 @@
 import java.io.*;
 import java.util.*;
 
-@SuppressWarnings({"rawtypes", "unchecked"})
 public class TestingEnvironment {
 
 	private boolean isOpen = false;
 
 	private IWorkspace workspace = null;
-	private Hashtable projects = null;
+	private Hashtable<String, IProject> projects = null;
 
 	private void addBuilderSpecs(String projectName) {
 		try {
@@ -225,15 +224,29 @@
 		else if ("12".equals(compliance)) {
 			requiredComplianceFlag = AbstractCompilerTest.F_12;
 			compilerVersion = CompilerOptions.VERSION_12;
-		}
-		else if (!"1.4".equals(compliance) && !"1.3".equals(compliance)) {
+		} else if ("13".equals(compliance)) {
+			requiredComplianceFlag = AbstractCompilerTest.F_13;
+			compilerVersion = CompilerOptions.VERSION_13;
+		} else if ("14".equals(compliance)) {
+			requiredComplianceFlag = AbstractCompilerTest.F_14;
+			compilerVersion = CompilerOptions.VERSION_14;
+		} else if ("15".equals(compliance)) {
+			requiredComplianceFlag = AbstractCompilerTest.F_15;
+			compilerVersion = CompilerOptions.VERSION_15;
+		} else if ("16".equals(compliance)) {
+			requiredComplianceFlag = AbstractCompilerTest.F_16;
+			compilerVersion = CompilerOptions.VERSION_16;
+		} else if ("17".equals(compliance)) {
+			requiredComplianceFlag = AbstractCompilerTest.F_17;
+			compilerVersion = CompilerOptions.VERSION_17;
+		} else if (!"1.4".equals(compliance) && !"1.3".equals(compliance)) {
 			throw new UnsupportedOperationException("Test framework doesn't support compliance level: " + compliance);
 		}
 		if (requiredComplianceFlag != 0) {
 			if (CompilerOptions.versionToJdkLevel(System.getProperty("java.specification.version")) < requiredComplianceFlag)
 				throw new RuntimeException("This test requires a " + compliance + " JRE");
 			IJavaProject javaProject = JavaCore.create(project);
-			Map options = new HashMap();
+			Map<String, String> options = new HashMap<>();
 			options.put(CompilerOptions.OPTION_Compliance, compilerVersion);
 			options.put(CompilerOptions.OPTION_Source, compilerVersion);
 			options.put(CompilerOptions.OPTION_TargetPlatform, compilerVersion);
@@ -419,9 +432,9 @@
 	public void close() {
 		try {
 			if (this.projects != null) {
-				Enumeration projectNames = this.projects.keys();
+				Enumeration<String> projectNames = this.projects.keys();
 				while (projectNames.hasMoreElements()) {
-					String projectName = (String) projectNames.nextElement();
+					String projectName = projectNames.nextElement();
 					getJavaProject(projectName).getJavaModel().close();
 				}
 			}
@@ -657,7 +670,7 @@
 			}
 		}
 		try {
-			ArrayList problems = new ArrayList();
+			ArrayList<Problem> problems = new ArrayList<>();
 			IMarker[] markers = resource.findMarkers(IJavaModelMarker.JAVA_MODEL_PROBLEM_MARKER, true, IResource.DEPTH_INFINITE);
 			for (int i = 0; i < markers.length; i++)
 				problems.add(new Problem(markers[i]));
@@ -678,8 +691,8 @@
 
 			Problem[] result = new Problem[problems.size()];
 			problems.toArray(result);
-			Arrays.sort(result, new Comparator() {
-				public int compare(Object o1, Object o2) {
+			Arrays.sort(result, new Comparator<Problem>() {
+				public int compare(Problem o1, Problem o2) {
 					return o1.toString().compareTo(o2.toString());
 				}
 			});
@@ -712,10 +725,10 @@
 			if (resource != null) {
 				final IMarker[] markers = resource.findMarkers(IJavaModelMarker.TASK_MARKER, true, IResource.DEPTH_INFINITE);
 				if (markers.length > 1) {
-					Arrays.sort(markers, new Comparator() {
-						public int compare(Object o1, Object o2) {
-							IMarker marker1 = (IMarker) o1;
-							IMarker marker2 = (IMarker) o2;
+					Arrays.sort(markers, new Comparator<IMarker>() {
+						public int compare(IMarker o1, IMarker o2) {
+							IMarker marker1 = o1;
+							IMarker marker2 = o2;
 							try {
 								final int start1 = ((Integer) marker1.getAttribute(IMarker.CHAR_START)).intValue();
 								final int start2 = ((Integer) marker2.getAttribute(IMarker.CHAR_START)).intValue();
@@ -762,14 +775,14 @@
 	* Returns the core project.
 	*/
 	public IProject getProject(String projectName) {
-		return (IProject)this.projects.get(projectName);
+		return this.projects.get(projectName);
 	}
 
 	/**
 	* Returns the core project.
 	*/
 	public IProject getProject(IPath projectPath) {
-		return (IProject)this.projects.get(projectPath.lastSegment());
+		return this.projects.get(projectPath.lastSegment());
 	}
 
 	private File tmpDirectory;
@@ -885,7 +898,7 @@
 	public void openEmptyWorkspace() {
 		close();
 		openWorkspace();
-		this.projects = new Hashtable(10);
+		this.projects = new Hashtable<>(10);
 		setup();
 	}
 
@@ -1000,9 +1013,9 @@
 	 */
 	public void resetWorkspace(){
 		if (this.projects != null) {
-			Enumeration projectNames = this.projects.keys();
+			Enumeration<String> projectNames = this.projects.keys();
 			while (projectNames.hasMoreElements()) {
-				String projectName = (String) projectNames.nextElement();
+				String projectName = projectNames.nextElement();
 				removeProject(getProject(projectName).getFullPath());
 			}
 		}
diff --git a/org.eclipse.jdt.core.tests.compiler/pom.xml b/org.eclipse.jdt.core.tests.compiler/pom.xml
index 62b3aa6..9d1ca90 100644
--- a/org.eclipse.jdt.core.tests.compiler/pom.xml
+++ b/org.eclipse.jdt.core.tests.compiler/pom.xml
@@ -1,6 +1,6 @@
 <?xml version="1.0" encoding="UTF-8"?>
 <!--
-  Copyright (c) 2012, 2020 Eclipse Foundation and others.
+  Copyright (c) 2012, 2021 Eclipse Foundation and others.
   All rights reserved. This program and the accompanying materials
   are made available under the terms of the Eclipse Distribution License v1.0
   which accompanies this distribution, and is available at
@@ -226,6 +226,36 @@
 			<tycho.surefire.argLine>--add-modules ALL-SYSTEM -Dcompliance=1.4,1.7,1.8,15,16</tycho.surefire.argLine>
 		</properties>
 	</profile>
+	<profile>
+		<id>test-on-javase-17</id>
+		<build>
+			<plugins>
+				<plugin>
+					<groupId>org.apache.maven.plugins</groupId>
+					<artifactId>maven-toolchains-plugin</artifactId>
+					<version>1.1</version>
+					<executions>
+						<execution>
+							<phase>validate</phase>
+							<goals>
+								<goal>toolchain</goal>
+							</goals>
+						</execution>
+					</executions>
+					<configuration>
+						<toolchains>
+							<jdk>
+								<id>JavaSE-17</id>
+							</jdk>
+						</toolchains>
+					</configuration>
+				</plugin>
+			</plugins>
+		</build>
+		<properties>
+			<tycho.surefire.argLine>--add-modules ALL-SYSTEM -Dcompliance=1.4,1.7,1.8,14,17</tycho.surefire.argLine>
+		</properties>
+	</profile>
   </profiles>
 
 </project>
diff --git a/org.eclipse.jdt.core.tests.compiler/src/org/eclipse/jdt/core/tests/compiler/parser/ComplianceDiagnoseTest.java b/org.eclipse.jdt.core.tests.compiler/src/org/eclipse/jdt/core/tests/compiler/parser/ComplianceDiagnoseTest.java
index 2d77b89..bf1017f 100644
--- a/org.eclipse.jdt.core.tests.compiler/src/org/eclipse/jdt/core/tests/compiler/parser/ComplianceDiagnoseTest.java
+++ b/org.eclipse.jdt.core.tests.compiler/src/org/eclipse/jdt/core/tests/compiler/parser/ComplianceDiagnoseTest.java
@@ -1,5 +1,5 @@
 /*******************************************************************************
- * Copyright (c) 2000, 2020 IBM Corporation and others.
+ * Copyright (c) 2000, 2021 IBM Corporation and others.
  *
  * This program and the accompanying materials
  * are made available under the terms of the Eclipse Public License 2.0
@@ -8,6 +8,10 @@
  *
  * SPDX-License-Identifier: EPL-2.0
  *
+ * This is an implementation of an early-draft specification developed under the Java
+ * Community Process (JCP) and is made available for testing and evaluation purposes
+ * only. The code is not compatible with any specification of the JCP.
+ *
  * Contributors:
  *     IBM Corporation - initial API and implementation
  *     Jesper S Moller - realigned with bug 399695
@@ -183,6 +187,7 @@
 		expected15ProblemLog
 	);
 }
+// TODO: Fix this and Enable
 public void test0003() {
 	String[] testFiles = new String[] {
 		"X.java",
@@ -195,7 +200,7 @@
 		"1. ERROR in X.java (at line 1)\n" +
 		"	public enum X {\n" +
 		"	       ^^^^\n" +
-		"Syntax error on token \"enum\", interface expected\n" +
+		"Syntax error on token \"enum\", class expected\n" +
 		"----------\n";
 	String expected14ProblemLog =
 		expected13ProblemLog;
diff --git a/org.eclipse.jdt.core.tests.compiler/src/org/eclipse/jdt/core/tests/compiler/parser/PatternMatchingSelectionTest.java b/org.eclipse.jdt.core.tests.compiler/src/org/eclipse/jdt/core/tests/compiler/parser/PatternMatchingSelectionTest.java
index 8cc8264..94a5232 100644
--- a/org.eclipse.jdt.core.tests.compiler/src/org/eclipse/jdt/core/tests/compiler/parser/PatternMatchingSelectionTest.java
+++ b/org.eclipse.jdt.core.tests.compiler/src/org/eclipse/jdt/core/tests/compiler/parser/PatternMatchingSelectionTest.java
@@ -85,7 +85,7 @@
 					"  public X() {\n" +
 					"  }\n" +
 					"  public @SuppressWarnings(\"preview\") void f(Object obj, boolean b) {\n" +
-					"    final String y_;\n" +
+					"    String y_;\n" +
 					"    {\n" +
 					"      <SelectOnName:y_>;\n" +
 					"    }\n" +
@@ -120,7 +120,7 @@
 					"  public X() {\n" +
 					"  }\n" +
 					"  public @SuppressWarnings(\"preview\") void f(Object obj, boolean b) {\n" +
-					"    final String y_;\n" +
+					"    String y_;\n" +
 					"    <SelectOnName:y_>;\n" +
 					"  }\n" +
 					"}\n";
@@ -142,7 +142,7 @@
 			+ "}";
 
 	String selection = "y_";
-	String selectKey = "<SelectionOnLocalName:final String ";
+	String selectKey = "<SelectionOnLocalName:String ";
 	String expectedSelection = selectKey + selection + ">;";
 
 	String selectionIdentifier = "y_";
@@ -151,7 +151,7 @@
 					"  public X() {\n" +
 					"  }\n" +
 					"  public @SuppressWarnings(\"preview\") void f(Object obj, boolean b) {\n" +
-					"    <SelectionOnLocalName:final String y_>;\n" +
+					"    <SelectionOnLocalName:String y_>;\n" +
 					"  }\n" +
 					"}\n";
 	String expectedReplacedSource = "y_";
diff --git a/org.eclipse.jdt.core.tests.compiler/src/org/eclipse/jdt/core/tests/compiler/parser/TestAll.java b/org.eclipse.jdt.core.tests.compiler/src/org/eclipse/jdt/core/tests/compiler/parser/TestAll.java
index 2832012..84a0b6a 100644
--- a/org.eclipse.jdt.core.tests.compiler/src/org/eclipse/jdt/core/tests/compiler/parser/TestAll.java
+++ b/org.eclipse.jdt.core.tests.compiler/src/org/eclipse/jdt/core/tests/compiler/parser/TestAll.java
@@ -1,5 +1,5 @@
 /*******************************************************************************
- * Copyright (c) 2000, 2020 IBM Corporation and others.
+ * Copyright (c) 2000, 2021 IBM Corporation and others.
  *
  * This program and the accompanying materials
  * are made available under the terms of the Eclipse Public License 2.0
@@ -266,7 +266,6 @@
 		tests_15.add(SelectionParserTest12.class);
 		tests_15.add(ModuleDeclarationSyntaxTest.class);
 		tests_15.add(JEP286ReservedWordTest.class);
-		tests_15.add(PatternMatchingSelectionTest.class);
 		// Reset forgotten subsets tests
 		TestCase.TESTS_PREFIX = null;
 		TestCase.TESTS_NAMES = null;
@@ -275,6 +274,53 @@
 		TestCase.RUN_ONLY_ID = null;
 		all.addTest(AbstractCompilerTest.buildComplianceTestSuite(ClassFileConstants.getComplianceLevelForJavaVersion(ClassFileConstants.MAJOR_VERSION_15), tests_15));
 	}
+	if ((possibleComplianceLevels & AbstractCompilerTest.F_16) != 0) {
+		ArrayList tests_16 = (ArrayList)testClasses.clone();
+		tests_16.addAll(TEST_CLASSES_1_5);
+		tests_16.add(ParserTest1_7.class);
+		tests_16.add(LambdaExpressionSyntaxTest.class);
+		tests_16.add(ReferenceExpressionSyntaxTest.class);
+		tests_16.add(TypeAnnotationSyntaxTest.class);
+		tests_16.add(CompletionParserTest18.class);
+		tests_16.add(SelectionParserTest18.class);
+		tests_16.add(SelectionParserTest9.class);
+		tests_16.add(SelectionParserTest10.class);
+		tests_16.add(SelectionParserTest12.class);
+		tests_16.add(ModuleDeclarationSyntaxTest.class);
+		tests_16.add(JEP286ReservedWordTest.class);
+		tests_16.add(PatternMatchingSelectionTest.class);
+		// Reset forgotten subsets tests
+		TestCase.TESTS_PREFIX = null;
+		TestCase.TESTS_NAMES = null;
+		TestCase.TESTS_NUMBERS= null;
+		TestCase.TESTS_RANGE = null;
+		TestCase.RUN_ONLY_ID = null;
+
+		all.addTest(AbstractCompilerTest.buildComplianceTestSuite(ClassFileConstants.getComplianceLevelForJavaVersion(ClassFileConstants.MAJOR_VERSION_16), tests_16));
+	}
+	if ((possibleComplianceLevels & AbstractCompilerTest.F_17) != 0) {
+		ArrayList tests_17 = (ArrayList)testClasses.clone();
+		tests_17.addAll(TEST_CLASSES_1_5);
+		tests_17.add(ParserTest1_7.class);
+		tests_17.add(LambdaExpressionSyntaxTest.class);
+		tests_17.add(ReferenceExpressionSyntaxTest.class);
+		tests_17.add(TypeAnnotationSyntaxTest.class);
+		tests_17.add(CompletionParserTest18.class);
+		tests_17.add(SelectionParserTest18.class);
+		tests_17.add(SelectionParserTest9.class);
+		tests_17.add(SelectionParserTest10.class);
+		tests_17.add(SelectionParserTest12.class);
+		tests_17.add(ModuleDeclarationSyntaxTest.class);
+		tests_17.add(JEP286ReservedWordTest.class);
+		tests_17.add(PatternMatchingSelectionTest.class);
+		// Reset forgotten subsets tests
+		TestCase.TESTS_PREFIX = null;
+		TestCase.TESTS_NAMES = null;
+		TestCase.TESTS_NUMBERS= null;
+		TestCase.TESTS_RANGE = null;
+		TestCase.RUN_ONLY_ID = null;
+		all.addTest(AbstractCompilerTest.buildComplianceTestSuite(ClassFileConstants.getComplianceLevelForJavaVersion(ClassFileConstants.MAJOR_VERSION_17), tests_17));
+	}
 	return all;
 }
 public static Test suite() {
diff --git a/org.eclipse.jdt.core.tests.compiler/src/org/eclipse/jdt/core/tests/compiler/regression/AbstractRegressionTest.java b/org.eclipse.jdt.core.tests.compiler/src/org/eclipse/jdt/core/tests/compiler/regression/AbstractRegressionTest.java
index 430b045..ef6b33e 100644
--- a/org.eclipse.jdt.core.tests.compiler/src/org/eclipse/jdt/core/tests/compiler/regression/AbstractRegressionTest.java
+++ b/org.eclipse.jdt.core.tests.compiler/src/org/eclipse/jdt/core/tests/compiler/regression/AbstractRegressionTest.java
@@ -8,6 +8,10 @@
  *
  * SPDX-License-Identifier: EPL-2.0
  *
+ * This is an implementation of an early-draft specification developed under the Java
+ * Community Process (JCP) and is made available for testing and evaluation purposes
+ * only. The code is not compatible with any specification of the JCP.
+ *
  * Contributors:
  *     IBM Corporation - initial API and implementation
  *     Stephan Herrmann - Contribution for
@@ -308,6 +312,8 @@
 			return JavaCore.VERSION_15;
 		} else if(rawVersion.startsWith("16")) {
 			return JavaCore.VERSION_16;
+		} else if(rawVersion.startsWith("17")) {
+			return JavaCore.VERSION_17;
 		} else {
 			throw new RuntimeException("unknown javac version: " + rawVersion);
 		}
@@ -491,6 +497,20 @@
 				return 0200;
 			}
 		}
+		if (version == JavaCore.VERSION_17) {
+			if ("17-ea".equals(rawVersion)) {
+				return 0000;
+			}
+			if ("17".equals(rawVersion)) {
+				return 0000;
+			}
+			if ("17.0.1".equals(rawVersion)) {
+				return 0100;
+			}
+			if ("17.0.2".equals(rawVersion)) {
+				return 0200;
+			}
+		}
 		throw new RuntimeException("unknown raw javac version: " + rawVersion);
 	}
 	// returns 0L if everything went fine; else the lower word contains the
diff --git a/org.eclipse.jdt.core.tests.compiler/src/org/eclipse/jdt/core/tests/compiler/regression/AnnotationTest.java b/org.eclipse.jdt.core.tests.compiler/src/org/eclipse/jdt/core/tests/compiler/regression/AnnotationTest.java
index b770209..37f3a60 100644
--- a/org.eclipse.jdt.core.tests.compiler/src/org/eclipse/jdt/core/tests/compiler/regression/AnnotationTest.java
+++ b/org.eclipse.jdt.core.tests.compiler/src/org/eclipse/jdt/core/tests/compiler/regression/AnnotationTest.java
@@ -1077,6 +1077,13 @@
 	// check annotation member modifiers (validity unchanged despite grammar change from JSR 335 - default methods)
 	// and https://bugs.eclipse.org/bugs/show_bug.cgi?id=3383968
 	public void test039a() {
+		String extra = this.complianceLevel < ClassFileConstants.JDK17 ? "" :
+				"----------\n" +
+				"1. WARNING in X.java (at line 2)\n" +
+				"	strictfp double val() default 0.1;\n" +
+				"	^^^^^^^^\n" +
+				"Floating-point expressions are always strictly evaluated from source level 17. Keyword \'strictfp\' is not required.\n";
+		int offset = this.complianceLevel < ClassFileConstants.JDK17 ? 0 : 1;
 		this.runNegativeTest(
 			new String[] {
 				"X.java",
@@ -1085,13 +1092,14 @@
 				"	synchronized String id() default \"zero\";\n" +
 				"}"
 			},
+			extra +
 			"----------\n" +
-			"1. ERROR in X.java (at line 2)\n" +
+			(1 + offset) + ". ERROR in X.java (at line 2)\n" +
 			"	strictfp double val() default 0.1;\n" +
 			"	                ^^^^^\n" +
 			"Illegal modifier for the annotation attribute X.val; only public & abstract are permitted\n" +
 			"----------\n" +
-			"2. ERROR in X.java (at line 3)\n" +
+			(2 + offset) + ". ERROR in X.java (at line 3)\n" +
 			"	synchronized String id() default \"zero\";\n" +
 			"	                    ^^^^\n" +
 			"Illegal modifier for the annotation attribute X.id; only public & abstract are permitted\n" +
diff --git a/org.eclipse.jdt.core.tests.compiler/src/org/eclipse/jdt/core/tests/compiler/regression/BatchCompilerTest.java b/org.eclipse.jdt.core.tests.compiler/src/org/eclipse/jdt/core/tests/compiler/regression/BatchCompilerTest.java
index 4872470..e5548e5 100644
--- a/org.eclipse.jdt.core.tests.compiler/src/org/eclipse/jdt/core/tests/compiler/regression/BatchCompilerTest.java
+++ b/org.eclipse.jdt.core.tests.compiler/src/org/eclipse/jdt/core/tests/compiler/regression/BatchCompilerTest.java
@@ -1,5 +1,5 @@
 /*******************************************************************************
- * Copyright (c) 2000, 2020 IBM Corporation and others.
+ * Copyright (c) 2000, 2021 IBM Corporation and others.
  *
  * This program and the accompanying materials
  * are made available under the terms of the Eclipse Public License 2.0
@@ -8,6 +8,10 @@
  *
  * SPDX-License-Identifier: EPL-2.0
  *
+ * This is an implementation of an early-draft specification developed under the Java
+ * Community Process (JCP) and is made available for testing and evaluation purposes
+ * only. The code is not compatible with any specification of the JCP.
+ *
  * Contributors:
  *     IBM Corporation - initial API and implementation
  *     Benjamin Muskalla - Contribution for bug 239066
@@ -59,8 +63,10 @@
 import org.eclipse.jdt.internal.compiler.batch.ClasspathJar;
 import org.eclipse.jdt.internal.compiler.batch.FileSystem;
 import org.eclipse.jdt.internal.compiler.batch.Main;
+import org.eclipse.jdt.internal.compiler.classfmt.ClassFileConstants;
 import org.eclipse.jdt.internal.compiler.batch.FileSystem.Classpath;
 import org.eclipse.jdt.internal.compiler.env.NameEnvironmentAnswer;
+import org.eclipse.jdt.internal.compiler.impl.CompilerOptions;
 import org.eclipse.jdt.internal.compiler.lookup.TypeConstants;
 import org.eclipse.jdt.internal.compiler.util.ManifestAnalyzer;
 
@@ -588,6 +594,14 @@
         "",
         true);
 }
+private String getVersionOptions() {
+	StringBuilder builder = new StringBuilder();
+	String template = "    -15 -15.0          use 15  compliance (-source 15  -target 15)\n";
+	for(int i = ClassFileConstants.MAJOR_VERSION_15; i <= ClassFileConstants.MAJOR_LATEST_VERSION; i++) {
+		builder.append(template.replace("15", "" + (i - ClassFileConstants.MAJOR_VERSION_0)));
+	}
+	return builder.toString();
+}
 // command line - help
 // amended for https://bugs.eclipse.org/bugs/show_bug.cgi?id=141512 (checking
 // width)
@@ -673,11 +687,10 @@
         "    -12 -12.0          use 12  compliance (-source 12  -target 12)\n" +
         "    -13 -13.0          use 13  compliance (-source 13  -target 13)\n" +
         "    -14 -14.0          use 14  compliance (-source 14  -target 14)\n" +
-        "    -15 -15.0          use 15  compliance (-source 15  -target 15)\n" +
-        "    -16 -16.0          use 16  compliance (-source 16  -target 16)\n" +
-        "    -source <version>  set source level: 1.3 to 1.9, 10 to 16\n" +
+        getVersionOptions() +
+        "    -source <version>  set source level: 1.3 to 1.9, 10 to "+ CompilerOptions.getLatestVersion() +"\n" +
         "                       (or 6, 6.0, etc)\n" +
-        "    -target <version>  set classfile target: 1.3 to 1.9, 10 to 16\n" +
+        "    -target <version>  set classfile target: 1.3 to 1.9, 10 to "+ CompilerOptions.getLatestVersion() +"\n" +
         "                       (or 6, 6.0, etc)\n" +
         "                       cldc1.1 can also be used to generate the StackMap\n" +
         "                       attribute\n" +
@@ -13230,4 +13243,15 @@
 		true);
 
 }
+public void testBug573153() {
+	String output = MAIN.bind("configure.source", "10");
+	String template = "source level should be in '1.1'...'1.8','9'...'15' (or '5.0'..'15.0'): 10";
+	template = template.replace("15", CompilerOptions.getLatestVersion());
+	assertEquals("configure.source is not updated", template, output);
+
+	output = MAIN.bind("configure.targetJDK", "10");
+	template = "target level should be in '1.1'...'1.8','9'...'15' (or '5.0'..'15.0') or cldc1.1: 10";
+	template = template.replace("15", CompilerOptions.getLatestVersion());
+	assertEquals("configure.source is not updated", template, output);
+}
 }
diff --git a/org.eclipse.jdt.core.tests.compiler/src/org/eclipse/jdt/core/tests/compiler/regression/ClassFileReaderTest_15.java b/org.eclipse.jdt.core.tests.compiler/src/org/eclipse/jdt/core/tests/compiler/regression/ClassFileReaderTest_17.java
similarity index 60%
rename from org.eclipse.jdt.core.tests.compiler/src/org/eclipse/jdt/core/tests/compiler/regression/ClassFileReaderTest_15.java
rename to org.eclipse.jdt.core.tests.compiler/src/org/eclipse/jdt/core/tests/compiler/regression/ClassFileReaderTest_17.java
index eb0282d..716d006 100644
--- a/org.eclipse.jdt.core.tests.compiler/src/org/eclipse/jdt/core/tests/compiler/regression/ClassFileReaderTest_15.java
+++ b/org.eclipse.jdt.core.tests.compiler/src/org/eclipse/jdt/core/tests/compiler/regression/ClassFileReaderTest_17.java
@@ -1,16 +1,18 @@
 /*******************************************************************************
- * Copyright (c) 2013, 2020 GoPivotal, Inc and others
- *
- * This program and the accompanying materials
- * are made available under the terms of the Eclipse Public License 2.0
+ * Copyright (c) 2020, 2021 IBM Corporation and others.
+ * All rights reserved. This program and the accompanying materials
+ * are made available under the terms of the Eclipse Public License v1.0
  * which accompanies this distribution, and is available at
  * https://www.eclipse.org/legal/epl-2.0/
  *
  * SPDX-License-Identifier: EPL-2.0
  *
+ * This is an implementation of an early-draft specification developed under the Java
+ * Community Process (JCP) and is made available for testing and evaluation purposes
+ * only. The code is not compatible with any specification of the JCP.
+ *
  * Contributors:
- *		Andy Clement (GoPivotal, Inc) aclement@gopivotal.com - Contributions for
- *			Bug 407191 - [1.8] Binary access support for type annotations
+ *     IBM Corporation - initial API and implementation
  *******************************************************************************/
 package org.eclipse.jdt.core.tests.compiler.regression;
 
@@ -18,21 +20,22 @@
 
 import org.eclipse.jdt.core.compiler.CharOperation;
 import org.eclipse.jdt.internal.compiler.classfmt.ClassFileConstants;
+import org.eclipse.jdt.internal.compiler.env.IBinaryMethod;
 import org.eclipse.jdt.internal.compiler.lookup.ExtraCompilerModifiers;
 
 @SuppressWarnings({ "rawtypes" })
-public class ClassFileReaderTest_15 extends AbstractRegressionTest {
+public class ClassFileReaderTest_17 extends AbstractRegressionTest {
 	static {
 	}
 
 	public static Test suite() {
-		return buildMinimalComplianceTestSuite(testClass(), F_15);
+		return buildMinimalComplianceTestSuite(testClass(), F_17);
 	}
 	public static Class testClass() {
-		return ClassFileReaderTest_15.class;
+		return ClassFileReaderTest_17.class;
 	}
 
-	public ClassFileReaderTest_15(String name) {
+	public ClassFileReaderTest_17(String name) {
 		super(name);
 	}
 
@@ -40,8 +43,7 @@
 	@Override
 	protected void setUp() throws Exception {
 		super.setUp();
-		this.complianceLevel = ClassFileConstants.JDK16;
-		this.enablePreview = true;
+		this.complianceLevel = ClassFileConstants.JDK17;
 	}
 
 	public void testBug564227_001() throws Exception {
@@ -107,4 +109,38 @@
 		int modifiers = classFileReader.getModifiers();
 		assertTrue("sealed modifier expected", (modifiers & ExtraCompilerModifiers.AccSealed) != 0);
 	}
+	public void testBug545510_1() throws Exception {
+		String source =
+				"strictfp class X {\n"+
+				"}";
+
+		org.eclipse.jdt.internal.compiler.classfmt.ClassFileReader classFileReader = getInternalClassFile("", "X", "X", source);
+
+		int modifiers = classFileReader.getModifiers();
+		assertTrue("strictfp modifier not expected", (modifiers & ClassFileConstants.AccStrictfp) == 0);
+	}
+	public void testBug545510_2() throws Exception {
+		String source =
+				"class X {\n"+
+				"  strictfp void foo() {}\n"+
+				"}";
+
+		org.eclipse.jdt.internal.compiler.classfmt.ClassFileReader classFileReader = getInternalClassFile("", "X", "X", source);
+		IBinaryMethod[] methods = classFileReader.getMethods();
+		IBinaryMethod method = methods[1];
+		int modifiers = method.getModifiers();
+		assertTrue("strictfp modifier not expected", (modifiers & ClassFileConstants.AccStrictfp) == 0);
+	}
+	public void testBug545510_3() throws Exception {
+		String source =
+				"strictfp class X {\n"+
+				"  void foo() {}\n"+
+				"}";
+
+		org.eclipse.jdt.internal.compiler.classfmt.ClassFileReader classFileReader = getInternalClassFile("", "X", "X", source);
+		IBinaryMethod[] methods = classFileReader.getMethods();
+		IBinaryMethod method = methods[1];
+		int modifiers = method.getModifiers();
+		assertTrue("strictfp modifier not expected", (modifiers & ClassFileConstants.AccStrictfp) == 0);
+	}
 }
diff --git a/org.eclipse.jdt.core.tests.compiler/src/org/eclipse/jdt/core/tests/compiler/regression/CompilerInvocationTests.java b/org.eclipse.jdt.core.tests.compiler/src/org/eclipse/jdt/core/tests/compiler/regression/CompilerInvocationTests.java
index aab86aa..48bed67 100644
--- a/org.eclipse.jdt.core.tests.compiler/src/org/eclipse/jdt/core/tests/compiler/regression/CompilerInvocationTests.java
+++ b/org.eclipse.jdt.core.tests.compiler/src/org/eclipse/jdt/core/tests/compiler/regression/CompilerInvocationTests.java
@@ -8,6 +8,10 @@
  *
  * SPDX-License-Identifier: EPL-2.0
  *
+ * This is an implementation of an early-draft specification developed under the Java
+ * Community Process (JCP) and is made available for testing and evaluation purposes
+ * only. The code is not compatible with any specification of the JCP.
+ *
  * Contributors:
  *     IBM Corporation - initial API and implementation
  *     Benjamin Muskalla - Contribution for bug 239066
@@ -556,6 +560,7 @@
 		expectedProblemAttributes.put("IllegalModifierForArgument", new ProblemAttributes(CategorizedProblem.CAT_MEMBER));
 		expectedProblemAttributes.put("IllegalModifierForClass", new ProblemAttributes(CategorizedProblem.CAT_TYPE));
 		expectedProblemAttributes.put("IllegalModifierForConstructor", new ProblemAttributes(CategorizedProblem.CAT_MEMBER));
+		expectedProblemAttributes.put("StrictfpNotRequired", new ProblemAttributes(CategorizedProblem.CAT_SYNTAX));
 		expectedProblemAttributes.put("IllegalModifierForEnum", new ProblemAttributes(CategorizedProblem.CAT_TYPE));
 		expectedProblemAttributes.put("IllegalModifierForEnumConstant", new ProblemAttributes(CategorizedProblem.CAT_MEMBER));
 		expectedProblemAttributes.put("IllegalModifierForEnumConstructor", new ProblemAttributes(CategorizedProblem.CAT_MEMBER));
@@ -1287,10 +1292,20 @@
 	    expectedProblemAttributes.put("SealedNotDirectSuperInterface", new ProblemAttributes(CategorizedProblem.CAT_PREVIEW_RELATED));
 	    expectedProblemAttributes.put("SealedLocalDirectSuperTypeSealed", new ProblemAttributes(CategorizedProblem.CAT_PREVIEW_RELATED));
 	    expectedProblemAttributes.put("SealedAnonymousClassCannotExtendSealedType", new ProblemAttributes(CategorizedProblem.CAT_PREVIEW_RELATED));
+	    expectedProblemAttributes.put("LocalReferencedInGuardMustBeEffectivelyFinal", new ProblemAttributes(CategorizedProblem.CAT_PREVIEW_RELATED));
 	    expectedProblemAttributes.put("SealedSuperTypeInDifferentPackage", new ProblemAttributes(CategorizedProblem.CAT_PREVIEW_RELATED));
 	    expectedProblemAttributes.put("SealedSuperTypeDisallowed", new ProblemAttributes(CategorizedProblem.CAT_PREVIEW_RELATED));
 	    expectedProblemAttributes.put("SafeVarargsOnSyntheticRecordAccessor", new ProblemAttributes(true));
 	    expectedProblemAttributes.put("DiscouragedValueBasedTypeSynchronization", new ProblemAttributes(true));
+	    expectedProblemAttributes.put("SwitchPatternConstantCaseLabelIncompatible", new ProblemAttributes(true));
+	    expectedProblemAttributes.put("SwitchPatternConstantWithPatternIncompatible", new ProblemAttributes(true));
+	    expectedProblemAttributes.put("IllegalFallthroughToPattern", new ProblemAttributes(true));
+	    expectedProblemAttributes.put("SwitchPatternOnlyOnePatternCaseLabelAllowed", new ProblemAttributes(true));
+	    expectedProblemAttributes.put("SwitchPatternBothPatternAndDefaultCaseLabelsNotAllowed", new ProblemAttributes(true));
+	    expectedProblemAttributes.put("SwitchPatternBothNullAndNonTypePatternNotAllowed", new ProblemAttributes(true));
+	    expectedProblemAttributes.put("PatternDominates", new ProblemAttributes(true));
+	    expectedProblemAttributes.put("IllegalTotalPatternWithDefault", new ProblemAttributes(true));
+
 	    StringBuffer failures = new StringBuffer();
 		StringBuffer correctResult = new StringBuffer(70000);
 		Field[] fields = (iProblemClass = IProblem.class).getFields();
@@ -1617,6 +1632,7 @@
 		expectedProblemAttributes.put("IllegalModifierForArgument", SKIP);
 		expectedProblemAttributes.put("IllegalModifierForClass", SKIP);
 		expectedProblemAttributes.put("IllegalModifierForConstructor", SKIP);
+		expectedProblemAttributes.put("StrictfpNotRequired", SKIP);
 		expectedProblemAttributes.put("IllegalModifierForEnum", SKIP);
 		expectedProblemAttributes.put("IllegalModifierForEnumConstant", SKIP);
 		expectedProblemAttributes.put("IllegalModifierForEnumConstructor", SKIP);
@@ -2353,8 +2369,17 @@
 	    expectedProblemAttributes.put("SealedSuperTypeInDifferentPackage", SKIP);
 	    expectedProblemAttributes.put("SealedSuperTypeDisallowed", SKIP);
 	    expectedProblemAttributes.put("SealedAnonymousClassCannotExtendSealedType", SKIP);
+	    expectedProblemAttributes.put("LocalReferencedInGuardMustBeEffectivelyFinal", SKIP);
 	    expectedProblemAttributes.put("SafeVarargsOnSyntheticRecordAccessor", SKIP);
 	    expectedProblemAttributes.put("DiscouragedValueBasedTypeSynchronization", SKIP);
+	    expectedProblemAttributes.put("SwitchPatternConstantCaseLabelIncompatible", SKIP);
+	    expectedProblemAttributes.put("SwitchPatternConstantWithPatternIncompatible", SKIP);
+	    expectedProblemAttributes.put("IllegalFallthroughToPattern", SKIP);
+	    expectedProblemAttributes.put("SwitchPatternOnlyOnePatternCaseLabelAllowed", SKIP);
+	    expectedProblemAttributes.put("SwitchPatternBothPatternAndDefaultCaseLabelsNotAllowed", SKIP);
+	    expectedProblemAttributes.put("SwitchPatternBothNullAndNonTypePatternNotAllowed", SKIP);
+	    expectedProblemAttributes.put("PatternDominates", SKIP);
+	    expectedProblemAttributes.put("IllegalTotalPatternWithDefault", SKIP);
 	    Map constantNamesIndex = new HashMap();
 		Field[] fields = JavaCore.class.getFields();
 		for (int i = 0, length = fields.length; i < length; i++) {
diff --git a/org.eclipse.jdt.core.tests.compiler/src/org/eclipse/jdt/core/tests/compiler/regression/EnumTest.java b/org.eclipse.jdt.core.tests.compiler/src/org/eclipse/jdt/core/tests/compiler/regression/EnumTest.java
index 6819422..0046d79 100644
--- a/org.eclipse.jdt.core.tests.compiler/src/org/eclipse/jdt/core/tests/compiler/regression/EnumTest.java
+++ b/org.eclipse.jdt.core.tests.compiler/src/org/eclipse/jdt/core/tests/compiler/regression/EnumTest.java
@@ -2466,6 +2466,25 @@
 
 // https://bugs.eclipse.org/bugs/show_bug.cgi?id=85397
 public void test079() throws Exception {
+	String op =
+			this.complianceLevel < ClassFileConstants.JDK17 ?
+					"----------\n" +
+					"1. ERROR in X.java (at line 3)\n" +
+					"	private strictfp X() {}\n" +
+					"	                 ^^^\n" +
+					"Illegal modifier for the constructor in type X; only public, protected & private are permitted\n" +
+					"----------\n" :
+					"----------\n" +
+					"1. WARNING in X.java (at line 3)\n" +
+					"	private strictfp X() {}\n" +
+					"	        ^^^^^^^^\n" +
+					"Floating-point expressions are always strictly evaluated from source level 17. Keyword \'strictfp\' is not required.\n" +
+					"----------\n" +
+					"2. ERROR in X.java (at line 3)\n" +
+					"	private strictfp X() {}\n" +
+					"	                 ^^^\n" +
+					"Illegal modifier for the constructor in type X; only public, protected & private are permitted\n" +
+					"----------\n";
 	this.runNegativeTest(
 		new String[] {
 			"X.java",
@@ -2474,12 +2493,7 @@
 			"	private strictfp X() {}\n" +
 			"}\n"
 		},
-		"----------\n" +
-		"1. ERROR in X.java (at line 3)\n" +
-		"	private strictfp X() {}\n" +
-		"	                 ^^^\n" +
-		"Illegal modifier for the constructor in type X; only public, protected & private are permitted\n" +
-		"----------\n"
+		op
 	);
 	this.runConformTest(
 		new String[] {
@@ -2492,10 +2506,17 @@
 		""
 	);
 
-	String[] expectedOutputs = new String[] {
-		"  private strictfp X(java.lang.String arg0, int arg1);\n",
-		"  public static strictfp X[] values();\n",
-		"  public static strictfp X valueOf(java.lang.String arg0);\n"
+	String[] expectedOutputs =
+			this.complianceLevel < ClassFileConstants.JDK17 ?
+					new String[] {
+							"  private strictfp X(java.lang.String arg0, int arg1);\n",
+							"  public static strictfp X[] values();\n",
+							"  public static strictfp X valueOf(java.lang.String arg0);\n"
+						} :
+			new String[] {
+		"  private X(java.lang.String arg0, int arg1);\n",
+		"  public static X[] values();\n",
+		"  public static X valueOf(java.lang.String arg0);\n"
 	};
 
 	ClassFileBytesDisassembler disassembler = ToolFactory.createDefaultClassFileBytesDisassembler();
diff --git a/org.eclipse.jdt.core.tests.compiler/src/org/eclipse/jdt/core/tests/compiler/regression/GenericTypeTest.java b/org.eclipse.jdt.core.tests.compiler/src/org/eclipse/jdt/core/tests/compiler/regression/GenericTypeTest.java
index f5ed58e..ba14e71 100644
--- a/org.eclipse.jdt.core.tests.compiler/src/org/eclipse/jdt/core/tests/compiler/regression/GenericTypeTest.java
+++ b/org.eclipse.jdt.core.tests.compiler/src/org/eclipse/jdt/core/tests/compiler/regression/GenericTypeTest.java
@@ -8,6 +8,10 @@
  *
  * SPDX-License-Identifier: EPL-2.0
  *
+ * This is an implementation of an early-draft specification developed under the Java
+ * Community Process (JCP) and is made available for testing and evaluation purposes
+ * only. The code is not compatible with any specification of the JCP.
+ *
  * Contributors:
  *     IBM Corporation - initial API and implementation
  *     Stephan Herrmann - Contribution for
@@ -5403,7 +5407,7 @@
 			customOptions);
 	}
 	public void test0178a() {
-		if (this.complianceLevel < ClassFileConstants.JDK16)
+		if (this.complianceLevel < ClassFileConstants.JDK17)
 			return;
 		Map customOptions = getCompilerOptions();
 		customOptions.put(CompilerOptions.OPTION_EnablePreviews, CompilerOptions.ENABLED);
diff --git a/org.eclipse.jdt.core.tests.compiler/src/org/eclipse/jdt/core/tests/compiler/regression/InstanceofPrimaryPatternTest.java b/org.eclipse.jdt.core.tests.compiler/src/org/eclipse/jdt/core/tests/compiler/regression/InstanceofPrimaryPatternTest.java
new file mode 100644
index 0000000..a7e78ff
--- /dev/null
+++ b/org.eclipse.jdt.core.tests.compiler/src/org/eclipse/jdt/core/tests/compiler/regression/InstanceofPrimaryPatternTest.java
@@ -0,0 +1,253 @@
+/*******************************************************************************
+ * Copyright (c) 2021 IBM Corporation and others.
+ * All rights reserved. This program and the accompanying materials
+ * are made available under the terms of the Eclipse Public License v1.0
+ * which accompanies this distribution, and is available at
+ * https://www.eclipse.org/legal/epl-2.0/
+ *
+ * SPDX-License-Identifier: EPL-2.0
+ *
+ * This is an implementation of an early-draft specification developed under the Java
+ * Community Process (JCP) and is made available for testing and evaluation purposes
+ * only. The code is not compatible with any specification of the JCP.
+ *
+ * Contributors:
+ *     IBM Corporation - initial API and implementation
+ *******************************************************************************/
+package org.eclipse.jdt.core.tests.compiler.regression;
+
+import java.util.Map;
+
+import org.eclipse.jdt.internal.compiler.classfmt.ClassFileConstants;
+import org.eclipse.jdt.internal.compiler.impl.CompilerOptions;
+
+import junit.framework.Test;
+
+public class InstanceofPrimaryPatternTest extends AbstractRegressionTest {
+
+	private static final JavacTestOptions JAVAC_OPTIONS = new JavacTestOptions("-source 17 --enable-preview -Xlint:-preview");
+	static {
+//		TESTS_NUMBERS = new int [] { 40 };
+//		TESTS_RANGE = new int[] { 1, -1 };
+//		TESTS_NAMES = new String[] { "test005" };
+	}
+
+	public static Class<?> testClass() {
+		return InstanceofPrimaryPatternTest.class;
+	}
+	public static Test suite() {
+		return buildMinimalComplianceTestSuite(testClass(), F_17);
+	}
+	public InstanceofPrimaryPatternTest(String testName){
+		super(testName);
+	}
+	// Enables the tests to run individually
+	protected Map<String, String> getCompilerOptions(boolean preview) {
+		Map<String, String> defaultOptions = super.getCompilerOptions();
+		if (this.complianceLevel >= ClassFileConstants.getLatestJDKLevel()
+				&& preview) {
+			defaultOptions.put(CompilerOptions.OPTION_EnablePreviews, CompilerOptions.ENABLED);
+		}
+		return defaultOptions;
+	}
+
+	protected Map<String, String> getCompilerOptions() {
+		return getCompilerOptions(true);
+	}
+
+	@Override
+	protected void runConformTest(String[] testFiles, String expectedOutput, Map<String, String> customOptions) {
+		if(!isJRE17Plus)
+			return;
+		runConformTest(testFiles, expectedOutput, customOptions, new String[] {"--enable-preview"}, JAVAC_OPTIONS);
+	}
+	protected void runNegativeTest(
+			String[] testFiles,
+			String expectedCompilerLog,
+			String javacLog,
+			String[] classLibraries,
+			boolean shouldFlushOutputDirectory,
+			Map<String, String> customOptions) {
+		Runner runner = new Runner();
+		runner.testFiles = testFiles;
+		runner.expectedCompilerLog = expectedCompilerLog;
+		runner.javacTestOptions = JAVAC_OPTIONS;
+		runner.customOptions = customOptions;
+		runner.expectedJavacOutputString = javacLog;
+		runner.runNegativeTest();
+	}
+	public void test001() {
+		Map<String, String> options = getCompilerOptions(true);
+		runConformTest(
+			new String[] {
+				"X.java",
+				"public class X {\n" +
+				"  public static void foo(Object obj) {\n" +
+				"		if (obj instanceof String s) {\n" +
+				"			System.out.println(s);\n" +
+				"		}\n " +
+				"	}\n" +
+				"  public static void main(String[] obj) {\n" +
+				"		foo(\"Hello World!\");\n" +
+				"	}\n" +
+				"}\n",
+			},
+			"Hello World!",
+			options);
+	}
+	public void test002() {
+		Map<String, String> options = getCompilerOptions(true);
+		runConformTest(
+			new String[] {
+				"X.java",
+				"public class X {\n" +
+				"  public static void foo(Object obj) {\n" +
+				"		if (obj instanceof (String s)) {\n" +
+				"			System.out.println(s);\n" +
+				"		}\n " +
+				"	}\n" +
+				"  public static void main(String[] obj) {\n" +
+				"		foo(\"Hello World!\");\n" +
+				"	}\n" +
+				"}\n",
+			},
+			"Hello World!",
+			options);
+	}
+	public void test003() {
+		Map<String, String> options = getCompilerOptions(true);
+		runConformTest(
+			new String[] {
+				"X.java",
+				"public class X {\n" +
+				"  public static void foo(Object obj) {\n" +
+				"		if (obj instanceof ((String s))) {\n" +
+				"			System.out.println(s);\n" +
+				"		}\n " +
+				"	}\n" +
+				"  public static void main(String[] obj) {\n" +
+				"		foo(\"Hello World!\");\n" +
+				"	}\n" +
+				"}\n",
+			},
+			"Hello World!",
+			options);
+	}
+	public void test004() {
+		Map<String, String> options = getCompilerOptions(true);
+		runConformTest(
+			new String[] {
+				"X.java",
+				"public class X {\n" +
+				"  public static void foo(Object obj) {\n" +
+				"		if (obj instanceof ((((String s))))) {\n" +
+				"			System.out.println(s);\n" +
+				"		}\n " +
+				"	}\n" +
+				"  public static void main(String[] obj) {\n" +
+				"		foo(\"Hello World!\");\n" +
+				"	}\n" +
+				"}\n",
+			},
+			"Hello World!",
+			options);
+	}
+	public void test005() {
+		Map<String, String> options = getCompilerOptions(true);
+		runConformTest(
+			new String[] {
+				"X.java",
+				"public class X {\n" +
+				"  public static void foo(Object obj) {\n" +
+				"		if (obj instanceof (String s) && (s.length() > 0)) {\n" +
+				"			System.out.println(s);\n" +
+				"		}\n " +
+				"	}\n" +
+				"  public static void main(String[] obj) {\n" +
+				"		foo(\"Hello World!\");\n" +
+				"	}\n" +
+				"}\n",
+			},
+			"Hello World!",
+			options);
+	}
+	public void test006() {
+		runNegativeTest(
+			new String[] {
+				"X.java",
+				"public class X {\n" +
+				"  public static void foo(Object obj) {\n" +
+				"		if (obj instanceof (String s && s.length() > 0)) {\n" +
+				"			System.out.println(s);\n" +
+				"		}\n " +
+				"	}\n" +
+				"  public static void main(String[] obj) {\n" +
+				"		foo(\"Hello World!\");\n" +
+				"		Zork();\n" +
+				"	}\n" +
+				"}\n",
+			},
+			"----------\n" +
+			"1. ERROR in X.java (at line 9)\n" +
+			"	Zork();\n" +
+			"	^^^^\n" +
+			"The method Zork() is undefined for the type X\n" +
+			"----------\n");
+	}
+	public void test007() {
+		runNegativeTest(
+			new String[] {
+				"X.java",
+				"public class X {\n" +
+				"  public static void foo(Object obj) {\n" +
+				"		if (obj instanceof var s) {\n" +
+				"			System.out.println(s);\n" +
+				"		}\n " +
+				"	}\n" +
+				"  public static void main(String[] obj) {\n" +
+				"		foo(\"Hello World!\");\n" +
+				"		Zork();\n" +
+				"	}\n" +
+				"}\n",
+			},
+			"----------\n" +
+			"1. ERROR in X.java (at line 3)\n" +
+			"	if (obj instanceof var s) {\n" +
+			"	                   ^^^\n" +
+			"\'var\' is not allowed here\n" +
+			"----------\n" +
+			"2. ERROR in X.java (at line 9)\n" +
+			"	Zork();\n" +
+			"	^^^^\n" +
+			"The method Zork() is undefined for the type X\n" +
+			"----------\n");
+	}
+	public void test008() {
+		runNegativeTest(
+			new String[] {
+				"X.java",
+				"public class X {\n" +
+				"  public static void foo(Object obj) {\n" +
+				"		if (obj instanceof (((var s)))) {\n" +
+				"			System.out.println(s);\n" +
+				"		}\n " +
+				"	}\n" +
+				"  public static void main(String[] obj) {\n" +
+				"		foo(\"Hello World!\");\n" +
+				"		Zork();\n" +
+				"	}\n" +
+				"}\n",
+			},
+			"----------\n" +
+			"1. ERROR in X.java (at line 3)\n" +
+			"	if (obj instanceof (((var s)))) {\n" +
+			"	                      ^^^\n" +
+			"\'var\' is not allowed here\n" +
+			"----------\n" +
+			"2. ERROR in X.java (at line 9)\n" +
+			"	Zork();\n" +
+			"	^^^^\n" +
+			"The method Zork() is undefined for the type X\n" +
+			"----------\n");
+	}
+}
\ No newline at end of file
diff --git a/org.eclipse.jdt.core.tests.compiler/src/org/eclipse/jdt/core/tests/compiler/regression/InterfaceMethodsTest.java b/org.eclipse.jdt.core.tests.compiler/src/org/eclipse/jdt/core/tests/compiler/regression/InterfaceMethodsTest.java
index 6bdbe1f..b2a4d29 100644
--- a/org.eclipse.jdt.core.tests.compiler/src/org/eclipse/jdt/core/tests/compiler/regression/InterfaceMethodsTest.java
+++ b/org.eclipse.jdt.core.tests.compiler/src/org/eclipse/jdt/core/tests/compiler/regression/InterfaceMethodsTest.java
@@ -1,5 +1,5 @@
 /*******************************************************************************
- * Copyright (c) 2013, 2019 GK Software AG, IBM Corporation and others.
+ * Copyright (c) 2013, 2021 GK Software AG, IBM Corporation and others.
  *
  * This program and the accompanying materials
  * are made available under the terms of the Eclipse Public License 2.0
@@ -81,6 +81,54 @@
 	// default methods with various modifiers, negative cases
 	public void testModifiers1a() {
 		String infMod = this.complianceLevel >= ClassFileConstants.JDK9 ? " private," : "";
+		String op = this.complianceLevel < ClassFileConstants.JDK17 ?
+		"----------\n" +
+		"1. ERROR in I.java (at line 5)\n" +
+		"	public default synchronized void foo2() { System.exit(0); }\n" +
+		"	                                 ^^^^^^\n" +
+		"Illegal modifier for the interface method foo2; only public,"+ infMod +" abstract, default, static and strictfp are permitted\n" +
+		"----------\n" +
+		"2. ERROR in I.java (at line 7)\n" +
+		"	public default strictfp synchronized void foo4() {}\n" +
+		"	                                          ^^^^^^\n" +
+		"Illegal modifier for the interface method foo4; only public,"+ infMod +" abstract, default, static and strictfp are permitted\n" +
+		"----------\n" +
+		"3. ERROR in I.java (at line 8)\n" +
+		"	public default strictfp synchronized @Annot void foo5() {}\n" +
+		"	                                                 ^^^^^^\n" +
+		"Illegal modifier for the interface method foo5; only public,"+ infMod +" abstract, default, static and strictfp are permitted\n" +
+		"----------\n" :
+			"----------\n" +
+			"1. ERROR in I.java (at line 5)\n" +
+			"	public default synchronized void foo2() { System.exit(0); }\n" +
+			"	                                 ^^^^^^\n" +
+			"Illegal modifier for the interface method foo2; only public, private, abstract, default, static and strictfp are permitted\n" +
+			"----------\n" +
+			"2. WARNING in I.java (at line 6)\n" +
+			"	strictfp default void foo3() {}\n" +
+			"	^^^^^^^^\n" +
+			"Floating-point expressions are always strictly evaluated from source level 17. Keyword \'strictfp\' is not required.\n" +
+			"----------\n" +
+			"3. WARNING in I.java (at line 7)\n" +
+			"	public default strictfp synchronized void foo4() {}\n" +
+			"	               ^^^^^^^^\n" +
+			"Floating-point expressions are always strictly evaluated from source level 17. Keyword \'strictfp\' is not required.\n" +
+			"----------\n" +
+			"4. ERROR in I.java (at line 7)\n" +
+			"	public default strictfp synchronized void foo4() {}\n" +
+			"	                                          ^^^^^^\n" +
+			"Illegal modifier for the interface method foo4; only public, private, abstract, default, static and strictfp are permitted\n" +
+			"----------\n" +
+			"5. WARNING in I.java (at line 8)\n" +
+			"	public default strictfp synchronized @Annot void foo5() {}\n" +
+			"	               ^^^^^^^^\n" +
+			"Floating-point expressions are always strictly evaluated from source level 17. Keyword \'strictfp\' is not required.\n" +
+			"----------\n" +
+			"6. ERROR in I.java (at line 8)\n" +
+			"	public default strictfp synchronized @Annot void foo5() {}\n" +
+			"	                                                 ^^^^^^\n" +
+			"Illegal modifier for the interface method foo5; only public, private, abstract, default, static and strictfp are permitted\n" +
+			"----------\n";
 		runNegativeTest(
 		new String[] {
 			"I.java",
@@ -93,22 +141,7 @@
 			"    public default strictfp synchronized void foo4() {}\n" +
 			"    public default strictfp synchronized @Annot void foo5() {}\n" +
 			"}\n"},
-			"----------\n" +
-			"1. ERROR in I.java (at line 5)\n" +
-			"	public default synchronized void foo2() { System.exit(0); }\n" +
-			"	                                 ^^^^^^\n" +
-			"Illegal modifier for the interface method foo2; only public,"+ infMod +" abstract, default, static and strictfp are permitted\n" +
-			"----------\n" +
-			"2. ERROR in I.java (at line 7)\n" +
-			"	public default strictfp synchronized void foo4() {}\n" +
-			"	                                          ^^^^^^\n" +
-			"Illegal modifier for the interface method foo4; only public,"+ infMod +" abstract, default, static and strictfp are permitted\n" +
-			"----------\n" +
-			"3. ERROR in I.java (at line 8)\n" +
-			"	public default strictfp synchronized @Annot void foo5() {}\n" +
-			"	                                                 ^^^^^^\n" +
-			"Illegal modifier for the interface method foo5; only public,"+ infMod +" abstract, default, static and strictfp are permitted\n" +
-			"----------\n");
+			op);
 	}
 
 	// default methods with various modifiers, simple syntax error blows the parser
@@ -141,12 +174,102 @@
 			"	stritfp default void foo3() {}\n" +
 			"	^^^^^^^\n" +
 			"Syntax error, insert \";\" to complete MethodDeclaration\n" +
-			"----------\n");
+			"----------\n" +
+			(this.complianceLevel >= ClassFileConstants.JDK17 ?
+					"4. WARNING in I.java (at line 7)\n" +
+					"	default public strictfp void foo4() {}\n" +
+					"	               ^^^^^^^^\n" +
+					"Floating-point expressions are always strictly evaluated from source level 17. Keyword \'strictfp\' is not required.\n" +
+					"----------\n" +
+					"5. WARNING in I.java (at line 8)\n" +
+					"	public strictfp  default @Annot void foo5() {}\n" +
+					"	       ^^^^^^^^\n" +
+					"Floating-point expressions are always strictly evaluated from source level 17. Keyword \'strictfp\' is not required.\n" +
+					"----------\n" : "")
+			);
 	}
 
 	// regular interface with illegal modifiers
 	public void testModifiers2() {
 		String infMod = this.complianceLevel >= ClassFileConstants.JDK9 ? " private," : "";
+		String op = this.complianceLevel < ClassFileConstants.JDK17 ?
+		"----------\n" +
+		"1. ERROR in I.java (at line 5)\n" +
+		"	public synchronized void foo2();\n" +
+		"	                         ^^^^^^\n" +
+		"Illegal modifier for the interface method foo2; only public,"+ infMod +" abstract, default, static and strictfp are permitted\n" +
+		"----------\n" +
+		"2. ERROR in I.java (at line 6)\n" +
+		"	strictfp void foo3();\n" +
+		"	              ^^^^^^\n" +
+		"strictfp is not permitted for abstract interface method foo3\n" +
+		"----------\n" +
+		"3. ERROR in I.java (at line 7)\n" +
+		"	public strictfp synchronized void foo4();\n" +
+		"	                                  ^^^^^^\n" +
+		"strictfp is not permitted for abstract interface method foo4\n" +
+		"----------\n" +
+		"4. ERROR in I.java (at line 7)\n" +
+		"	public strictfp synchronized void foo4();\n" +
+		"	                                  ^^^^^^\n" +
+		"Illegal modifier for the interface method foo4; only public,"+ infMod +" abstract, default, static and strictfp are permitted\n" +
+		"----------\n" +
+		"5. ERROR in I.java (at line 8)\n" +
+		"	public strictfp synchronized @Annot void foo5();\n" +
+		"	                                         ^^^^^^\n" +
+		"strictfp is not permitted for abstract interface method foo5\n" +
+		"----------\n" +
+		"6. ERROR in I.java (at line 8)\n" +
+		"	public strictfp synchronized @Annot void foo5();\n" +
+		"	                                         ^^^^^^\n" +
+		"Illegal modifier for the interface method foo5; only public,"+ infMod +" abstract, default, static and strictfp are permitted\n" +
+		"----------\n" :
+			"----------\n" +
+			"1. ERROR in I.java (at line 5)\n" +
+			"	public synchronized void foo2();\n" +
+			"	                         ^^^^^^\n" +
+			"Illegal modifier for the interface method foo2; only public, private, abstract, default, static and strictfp are permitted\n" +
+			"----------\n" +
+			"2. WARNING in I.java (at line 6)\n" +
+			"	strictfp void foo3();\n" +
+			"	^^^^^^^^\n" +
+			"Floating-point expressions are always strictly evaluated from source level 17. Keyword \'strictfp\' is not required.\n" +
+			"----------\n" +
+			"3. ERROR in I.java (at line 6)\n" +
+			"	strictfp void foo3();\n" +
+			"	              ^^^^^^\n" +
+			"strictfp is not permitted for abstract interface method foo3\n" +
+			"----------\n" +
+			"4. WARNING in I.java (at line 7)\n" +
+			"	public strictfp synchronized void foo4();\n" +
+			"	       ^^^^^^^^\n" +
+			"Floating-point expressions are always strictly evaluated from source level 17. Keyword \'strictfp\' is not required.\n" +
+			"----------\n" +
+			"5. ERROR in I.java (at line 7)\n" +
+			"	public strictfp synchronized void foo4();\n" +
+			"	                                  ^^^^^^\n" +
+			"strictfp is not permitted for abstract interface method foo4\n" +
+			"----------\n" +
+			"6. ERROR in I.java (at line 7)\n" +
+			"	public strictfp synchronized void foo4();\n" +
+			"	                                  ^^^^^^\n" +
+			"Illegal modifier for the interface method foo4; only public, private, abstract, default, static and strictfp are permitted\n" +
+			"----------\n" +
+			"7. WARNING in I.java (at line 8)\n" +
+			"	public strictfp synchronized @Annot void foo5();\n" +
+			"	       ^^^^^^^^\n" +
+			"Floating-point expressions are always strictly evaluated from source level 17. Keyword \'strictfp\' is not required.\n" +
+			"----------\n" +
+			"8. ERROR in I.java (at line 8)\n" +
+			"	public strictfp synchronized @Annot void foo5();\n" +
+			"	                                         ^^^^^^\n" +
+			"strictfp is not permitted for abstract interface method foo5\n" +
+			"----------\n" +
+			"9. ERROR in I.java (at line 8)\n" +
+			"	public strictfp synchronized @Annot void foo5();\n" +
+			"	                                         ^^^^^^\n" +
+			"Illegal modifier for the interface method foo5; only public, private, abstract, default, static and strictfp are permitted\n" +
+			"----------\n";
 		runNegativeTest(
 		new String[] {
 			"I.java",
@@ -159,37 +282,7 @@
 			"    public strictfp synchronized void foo4();\n" +
 			"    public strictfp synchronized @Annot void foo5();\n" +
 			"}\n"},
-			"----------\n" +
-			"1. ERROR in I.java (at line 5)\n" +
-			"	public synchronized void foo2();\n" +
-			"	                         ^^^^^^\n" +
-			"Illegal modifier for the interface method foo2; only public,"+ infMod +" abstract, default, static and strictfp are permitted\n" +
-			"----------\n" +
-			"2. ERROR in I.java (at line 6)\n" +
-			"	strictfp void foo3();\n" +
-			"	              ^^^^^^\n" +
-			"strictfp is not permitted for abstract interface method foo3\n" +
-			"----------\n" +
-			"3. ERROR in I.java (at line 7)\n" +
-			"	public strictfp synchronized void foo4();\n" +
-			"	                                  ^^^^^^\n" +
-			"strictfp is not permitted for abstract interface method foo4\n" +
-			"----------\n" +
-			"4. ERROR in I.java (at line 7)\n" +
-			"	public strictfp synchronized void foo4();\n" +
-			"	                                  ^^^^^^\n" +
-			"Illegal modifier for the interface method foo4; only public,"+ infMod +" abstract, default, static and strictfp are permitted\n" +
-			"----------\n" +
-			"5. ERROR in I.java (at line 8)\n" +
-			"	public strictfp synchronized @Annot void foo5();\n" +
-			"	                                         ^^^^^^\n" +
-			"strictfp is not permitted for abstract interface method foo5\n" +
-			"----------\n" +
-			"6. ERROR in I.java (at line 8)\n" +
-			"	public strictfp synchronized @Annot void foo5();\n" +
-			"	                                         ^^^^^^\n" +
-			"Illegal modifier for the interface method foo5; only public,"+ infMod +" abstract, default, static and strictfp are permitted\n" +
-			"----------\n");
+			op);
 	}
 
 	// default & regular methods with modifiers that are illegal even for default methods
@@ -2140,6 +2233,13 @@
     // test for different error messages in modifiers.
 	public void test400977() {
 		String infMod = this.complianceLevel >= ClassFileConstants.JDK9 ? " private," : "";
+		String extra = this.complianceLevel >= ClassFileConstants.JDK17 ?
+				"----------\n" +
+				"2. WARNING in I.java (at line 3)\n" +
+				"	public abstract default strictfp final void bar();}\n" +
+				"	                        ^^^^^^^^\n" +
+				"Floating-point expressions are always strictly evaluated from source level 17. Keyword \'strictfp\' is not required.\n" : "";
+		int offset = this.complianceLevel >= ClassFileConstants.JDK17 ? 1 : 0;
 		runNegativeTest(
 		new String[] {
 			"I.java",
@@ -2152,18 +2252,19 @@
 			"	default abstract void foo();\n" +
 			"	                      ^^^^^\n" +
 			"Illegal combination of modifiers for the interface method foo; only one of abstract, default, or static permitted\n" +
+			extra +
 			"----------\n" +
-			"2. ERROR in I.java (at line 3)\n" +
+			(2 + offset) + ". ERROR in I.java (at line 3)\n" +
 			"	public abstract default strictfp final void bar();}\n" +
 			"	                                            ^^^^^\n" +
 			"strictfp is not permitted for abstract interface method bar\n" +
 			"----------\n" +
-			"3. ERROR in I.java (at line 3)\n" +
+			(3 + offset) + ". ERROR in I.java (at line 3)\n" +
 			"	public abstract default strictfp final void bar();}\n" +
 			"	                                            ^^^^^\n" +
 			"Illegal combination of modifiers for the interface method bar; only one of abstract, default, or static permitted\n" +
 			"----------\n" +
-			"4. ERROR in I.java (at line 3)\n" +
+			(3 + offset) + ". ERROR in I.java (at line 3)\n" +
 			"	public abstract default strictfp final void bar();}\n" +
 			"	                                            ^^^^^\n" +
 			"Illegal modifier for the interface method bar; only public,"+ infMod +" abstract, default, static and strictfp are permitted\n" +
diff --git a/org.eclipse.jdt.core.tests.compiler/src/org/eclipse/jdt/core/tests/compiler/regression/JavadocTest_1_5.java b/org.eclipse.jdt.core.tests.compiler/src/org/eclipse/jdt/core/tests/compiler/regression/JavadocTest_1_5.java
index 2bae0e3..4044835 100644
--- a/org.eclipse.jdt.core.tests.compiler/src/org/eclipse/jdt/core/tests/compiler/regression/JavadocTest_1_5.java
+++ b/org.eclipse.jdt.core.tests.compiler/src/org/eclipse/jdt/core/tests/compiler/regression/JavadocTest_1_5.java
@@ -1,5 +1,5 @@
 /*******************************************************************************
- * Copyright (c) 2000, 2014 IBM Corporation and others.
+ * Copyright (c) 2000, 2021 IBM Corporation and others.
  *
  * This program and the accompanying materials
  * are made available under the terms of the Eclipse Public License 2.0
@@ -1735,7 +1735,7 @@
 	 * Bug 86769: [javadoc] Warn/Error for 'Missing javadoc comments' doesn't recognize private inner classes
 	 * @see "http://bugs.eclipse.org/bugs/show_bug.cgi?id=86769"
 	 */
-	public void testBug86769() {
+	public void _testBug86769() {
 		this.reportMissingJavadocComments = CompilerOptions.ERROR;
 		runNegativeTest(
 			new String[] {
diff --git a/org.eclipse.jdt.core.tests.compiler/src/org/eclipse/jdt/core/tests/compiler/regression/LocalStaticsTest.java b/org.eclipse.jdt.core.tests.compiler/src/org/eclipse/jdt/core/tests/compiler/regression/LocalStaticsTest.java
index 24dcdf6..05582b9 100644
--- a/org.eclipse.jdt.core.tests.compiler/src/org/eclipse/jdt/core/tests/compiler/regression/LocalStaticsTest.java
+++ b/org.eclipse.jdt.core.tests.compiler/src/org/eclipse/jdt/core/tests/compiler/regression/LocalStaticsTest.java
@@ -7,6 +7,10 @@
  *
  * SPDX-License-Identifier: EPL-2.0
  *
+ * This is an implementation of an early-draft specification developed under the Java
+ * Community Process (JCP) and is made available for testing and evaluation purposes
+ * only. The code is not compatible with any specification of the JCP.
+ *
  * Contributors:
  *     IBM Corporation - initial API and implementation
  *******************************************************************************/
@@ -36,7 +40,7 @@
 		return LocalStaticsTest.class;
 	}
 	public static Test suite() {
-		return buildMinimalComplianceTestSuite(testClass(), F_16);
+		return buildMinimalComplianceTestSuite(testClass(), F_17);
 	}
 	public LocalStaticsTest(String testName){
 		super(testName);
@@ -45,9 +49,10 @@
 	// Enables the tests to run individually
 	protected Map<String, String> getCompilerOptions() {
 		Map<String, String> defaultOptions = super.getCompilerOptions();
-		defaultOptions.put(CompilerOptions.OPTION_Compliance, CompilerOptions.VERSION_16); // FIXME
-		defaultOptions.put(CompilerOptions.OPTION_Source, CompilerOptions.VERSION_16);
-		defaultOptions.put(CompilerOptions.OPTION_TargetPlatform, CompilerOptions.VERSION_16);
+		defaultOptions.put(CompilerOptions.OPTION_Compliance, CompilerOptions.VERSION_17); // FIXME
+		defaultOptions.put(CompilerOptions.OPTION_Source, CompilerOptions.VERSION_17);
+		defaultOptions.put(CompilerOptions.OPTION_TargetPlatform, CompilerOptions.VERSION_17);
+		defaultOptions.put(CompilerOptions.OPTION_EnablePreviews, CompilerOptions.ENABLED);
 		defaultOptions.put(CompilerOptions.OPTION_ReportPreviewFeatures, CompilerOptions.IGNORE);
 		defaultOptions.put(CompilerOptions.OPTION_Store_Annotations, CompilerOptions.ENABLED);
 		return defaultOptions;
@@ -65,12 +70,12 @@
 		runner.expectedOutputString = expectedOutput;
 		runner.vmArguments = new String[] {"--enable-preview"};
 		runner.customOptions = customOptions;
-		runner.javacTestOptions = JavacTestOptions.forReleaseWithPreview("16");
+		runner.javacTestOptions = JavacTestOptions.forReleaseWithPreview("17");
 		runner.runConformTest();
 	}
 	@Override
 	protected void runNegativeTest(String[] testFiles, String expectedCompilerLog) {
-		runNegativeTest(testFiles, expectedCompilerLog, JavacTestOptions.forReleaseWithPreview("15"));
+		runNegativeTest(testFiles, expectedCompilerLog, JavacTestOptions.forReleaseWithPreview("17"));
 	}
 	protected void runWarningTest(String[] testFiles, String expectedCompilerLog) {
 		runWarningTest(testFiles, expectedCompilerLog, null);
@@ -86,8 +91,8 @@
 		runner.expectedCompilerLog = expectedCompilerLog;
 		runner.customOptions = customOptions;
 		runner.vmArguments = new String[] {"--enable-preview"};
-		runner.javacTestOptions = javacAdditionalTestOptions == null ? JavacTestOptions.forReleaseWithPreview("15") :
-			JavacTestOptions.forReleaseWithPreview("16", javacAdditionalTestOptions);
+		runner.javacTestOptions = javacAdditionalTestOptions == null ? JavacTestOptions.forReleaseWithPreview("17") :
+			JavacTestOptions.forReleaseWithPreview("17", javacAdditionalTestOptions);
 		runner.runWarningTest();
 	}
 
@@ -1000,7 +1005,12 @@
 				"}\n",
 			},
 			"----------\n" +
-			"1. ERROR in X.java (at line 4)\n" +
+			"1. WARNING in X.java (at line 3)\n" +
+			"	public strictfp enum I {}\n" +
+			"	       ^^^^^^^^\n" +
+			"Floating-point expressions are always strictly evaluated from source level 17. Keyword \'strictfp\' is not required.\n" +
+			"----------\n" +
+			"2. ERROR in X.java (at line 4)\n" +
 			"	Zork;\n" +
 			"	^^^^\n" +
 			"Syntax error, insert \"VariableDeclarators\" to complete LocalVariableDeclaration\n" +
diff --git a/org.eclipse.jdt.core.tests.compiler/src/org/eclipse/jdt/core/tests/compiler/regression/ModuleCompilationTests.java b/org.eclipse.jdt.core.tests.compiler/src/org/eclipse/jdt/core/tests/compiler/regression/ModuleCompilationTests.java
index 4ac3593..3f52c45 100644
--- a/org.eclipse.jdt.core.tests.compiler/src/org/eclipse/jdt/core/tests/compiler/regression/ModuleCompilationTests.java
+++ b/org.eclipse.jdt.core.tests.compiler/src/org/eclipse/jdt/core/tests/compiler/regression/ModuleCompilationTests.java
@@ -8,6 +8,10 @@
  *
  * SPDX-License-Identifier: EPL-2.0
  *
+ * This is an implementation of an early-draft specification developed under the Java
+ * Community Process (JCP) and is made available for testing and evaluation purposes
+ * only. The code is not compatible with any specification of the JCP.
+ *
  * Contributors:
  *     IBM Corporation - initial API and implementation
  *******************************************************************************/
@@ -846,7 +850,7 @@
 				"p/X.java",
 				"package p;\n" +
 				"public class X {\n" +
-				"   java.lang.SecurityManager man = null;\n" +
+				"   java.lang.SecurityException ex = null;\n" +
 				"}",
 				"module-info.java",
 				"module mod.one { \n" +
diff --git a/org.eclipse.jdt.core.tests.compiler/src/org/eclipse/jdt/core/tests/compiler/regression/NegativeLambdaExpressionsTest.java b/org.eclipse.jdt.core.tests.compiler/src/org/eclipse/jdt/core/tests/compiler/regression/NegativeLambdaExpressionsTest.java
index ed6c2c7..8dc580b 100644
--- a/org.eclipse.jdt.core.tests.compiler/src/org/eclipse/jdt/core/tests/compiler/regression/NegativeLambdaExpressionsTest.java
+++ b/org.eclipse.jdt.core.tests.compiler/src/org/eclipse/jdt/core/tests/compiler/regression/NegativeLambdaExpressionsTest.java
@@ -1,5 +1,5 @@
 /*******************************************************************************
- * Copyright (c) 2011, 2019 IBM Corporation and others.
+ * Copyright (c) 2011, 2021 IBM Corporation and others.
  *
  * This program and the accompanying materials
  * are made available under the terms of the Eclipse Public License 2.0
@@ -473,6 +473,13 @@
 }
 // https://bugs.eclipse.org/bugs/show_bug.cgi?id=384595, Reject illegal modifiers on lambda arguments.
 public void test014() {
+	String extra = this.complianceLevel < ClassFileConstants.JDK17 ? "" :
+		"----------\n" +
+		"2. WARNING in X.java (at line 5)\n" +
+		"	I i = (final @Marker int x, @Undefined static strictfp public Object o, static volatile int p) -> x;\n" +
+		"	                                              ^^^^^^^^\n" +
+		"Floating-point expressions are always strictly evaluated from source level 17. Keyword \'strictfp\' is not required.\n";
+	int offset = this.complianceLevel < ClassFileConstants.JDK17 ? 0 : 1;
 	this.runNegativeTest(
 			new String[] {
 					"X.java",
@@ -490,23 +497,24 @@
 				"	I i = (final @Marker int x, @Undefined static strictfp public Object o, static volatile int p) -> x;\n" +
 				"	                             ^^^^^^^^^\n" +
 				"Undefined cannot be resolved to a type\n" +
+				extra +
 				"----------\n" +
-				"2. ERROR in X.java (at line 5)\n" +
+				(2 + offset) + ". ERROR in X.java (at line 5)\n" +
 				"	I i = (final @Marker int x, @Undefined static strictfp public Object o, static volatile int p) -> x;\n" +
 				"	                                                              ^^^^^^\n" +
 				"Lambda expression\'s parameter o is expected to be of type int\n" +
 				"----------\n" +
-				"3. ERROR in X.java (at line 5)\n" +
+				(3 + offset) + ". ERROR in X.java (at line 5)\n" +
 				"	I i = (final @Marker int x, @Undefined static strictfp public Object o, static volatile int p) -> x;\n" +
 				"	                                                                     ^\n" +
 				"Illegal modifier for parameter o; only final is permitted\n" +
 				"----------\n" +
-				"4. ERROR in X.java (at line 5)\n" +
+				(4 + offset) + ". ERROR in X.java (at line 5)\n" +
 				"	I i = (final @Marker int x, @Undefined static strictfp public Object o, static volatile int p) -> x;\n" +
 				"	                                                                                            ^\n" +
 				"Illegal modifier for parameter p; only final is permitted\n" +
 				"----------\n" +
-				"5. ERROR in X.java (at line 5)\n" +
+				(5 + offset) + ". ERROR in X.java (at line 5)\n" +
 				"	I i = (final @Marker int x, @Undefined static strictfp public Object o, static volatile int p) -> x;\n" +
 				"	                                                                                                  ^\n" +
 				"Void methods cannot return a value\n" +
diff --git a/org.eclipse.jdt.core.tests.compiler/src/org/eclipse/jdt/core/tests/compiler/regression/PatternMatching16Test.java b/org.eclipse.jdt.core.tests.compiler/src/org/eclipse/jdt/core/tests/compiler/regression/PatternMatching16Test.java
index f853c26..2f13e97 100644
--- a/org.eclipse.jdt.core.tests.compiler/src/org/eclipse/jdt/core/tests/compiler/regression/PatternMatching16Test.java
+++ b/org.eclipse.jdt.core.tests.compiler/src/org/eclipse/jdt/core/tests/compiler/regression/PatternMatching16Test.java
@@ -7,6 +7,10 @@
  *
  * SPDX-License-Identifier: EPL-2.0
  *
+ * This is an implementation of an early-draft specification developed under the Java
+ * Community Process (JCP) and is made available for testing and evaluation purposes
+ * only. The code is not compatible with any specification of the JCP.
+ *
  * Contributors:
  *     IBM Corporation - initial API and implementation
  *******************************************************************************/
@@ -15,6 +19,7 @@
 import java.io.IOException;
 import java.util.Map;
 
+import org.eclipse.jdt.internal.compiler.classfmt.ClassFileConstants;
 import org.eclipse.jdt.core.util.ClassFileBytesDisassembler;
 import org.eclipse.jdt.core.util.ClassFormatException;
 import org.eclipse.jdt.internal.compiler.impl.CompilerOptions;
@@ -27,7 +32,7 @@
 	static {
 //		TESTS_NUMBERS = new int [] { 40 };
 //		TESTS_RANGE = new int[] { 1, -1 };
-//		TESTS_NAMES = new String[] { "test063b" };
+//		TESTS_NAMES = new String[] { "testBug575035" };
 	}
 
 	public static Class<?> testClass() {
@@ -42,18 +47,16 @@
 	// Enables the tests to run individually
 	protected Map<String, String> getCompilerOptions(boolean preview) {
 		Map<String, String> defaultOptions = super.getCompilerOptions();
-		defaultOptions.put(CompilerOptions.OPTION_Compliance, CompilerOptions.VERSION_16);
-		defaultOptions.put(CompilerOptions.OPTION_Source, CompilerOptions.VERSION_16);
-		defaultOptions.put(CompilerOptions.OPTION_TargetPlatform, CompilerOptions.VERSION_16);
-		defaultOptions.put(CompilerOptions.OPTION_EnablePreviews,
-				preview ? CompilerOptions.ENABLED : CompilerOptions.DISABLED);
-		defaultOptions.put(CompilerOptions.OPTION_ReportPreviewFeatures, CompilerOptions.WARNING);
+		if (this.complianceLevel >= ClassFileConstants.getLatestJDKLevel()
+				&& preview) {
+			defaultOptions.put(CompilerOptions.OPTION_EnablePreviews, CompilerOptions.ENABLED);
+		}
 		return defaultOptions;
 	}
 
 	@Override
 	protected void runConformTest(String[] testFiles, String expectedOutput, Map<String, String> customOptions) {
-		if(!isJRE15Plus)
+		if(!isJRE16Plus)
 			return;
 		runConformTest(testFiles, expectedOutput, customOptions, new String[] {"--enable-preview"}, JAVAC_OPTIONS);
 	}
@@ -91,7 +94,7 @@
 				"1. ERROR in X1.java (at line 3)\n" +
 				"	if (obj instanceof String s) {\n" +
 				"	                   ^^^^^^^^\n" +
-				"The Java feature 'Pattern Matching in instanceof Expressions' is only available with source level "+ AbstractRegressionTest.PREVIEW_ALLOWED_LEVEL +" and above\n" +
+				"The Java feature 'Pattern Matching in instanceof Expressions' is only available with source level 16 and above\n" +
 				"----------\n",
 				null,
 				true,
@@ -101,6 +104,8 @@
 		options.put(CompilerOptions.OPTION_TargetPlatform, CompilerOptions.VERSION_16);
 	}
 	public void test000b() {
+		if (this.complianceLevel < ClassFileConstants.getLatestJDKLevel())
+			return;
 		Map<String, String> options = getCompilerOptions(true);
 		options.put(CompilerOptions.OPTION_Compliance, CompilerOptions.VERSION_14);
 		options.put(CompilerOptions.OPTION_Source, CompilerOptions.VERSION_14);
@@ -119,7 +124,7 @@
 				"1. ERROR in X1.java (at line 0)\n" +
 				"	public class X1 {\n" +
 				"	^\n" +
-				"Preview features enabled at an invalid source release level 14, preview can be enabled only at source level "+AbstractRegressionTest.PREVIEW_ALLOWED_LEVEL+"\n" +
+				"Preview features enabled at an invalid source release level 14, preview can be enabled only at source level 17\n" +
 				"----------\n",
 				null,
 				true,
@@ -3861,6 +3866,31 @@
 				options);
 
 	}
+	public void testBug573880() {
+		if (this.complianceLevel < ClassFileConstants.JDK17)
+			return;
+		Map<String, String> compilerOptions = getCompilerOptions(true);
+		runNegativeTest(
+				new String[] {
+						"X.java",
+							"public class X {\n"
+							+ "	public void foo(Object o) {\n"
+							+ "		if (o instanceof var s) {\n"
+							+ "			System.out.println(s);\n"
+							+ "		}\n"
+							+ "	}\n"
+							+ "}",
+				},
+				"----------\n" +
+				"1. ERROR in X.java (at line 3)\n" +
+				"	if (o instanceof var s) {\n" +
+				"	                 ^^^\n" +
+				"\'var\' is not allowed here\n" +
+				"----------\n",
+				null,
+				true,
+				compilerOptions);
+	}
     public void testBug574906() {
         Map<String, String> options = getCompilerOptions(false);
         runConformTest(
diff --git a/org.eclipse.jdt.core.tests.compiler/src/org/eclipse/jdt/core/tests/compiler/regression/PreviewFeatureTest.java b/org.eclipse.jdt.core.tests.compiler/src/org/eclipse/jdt/core/tests/compiler/regression/PreviewFeatureTest.java
index 546ce0f..bfe4de9 100644
--- a/org.eclipse.jdt.core.tests.compiler/src/org/eclipse/jdt/core/tests/compiler/regression/PreviewFeatureTest.java
+++ b/org.eclipse.jdt.core.tests.compiler/src/org/eclipse/jdt/core/tests/compiler/regression/PreviewFeatureTest.java
@@ -7,6 +7,10 @@
  *
  * SPDX-License-Identifier: EPL-2.0
  *
+ * This is an implementation of an early-draft specification developed under the Java
+ * Community Process (JCP) and is made available for testing and evaluation purposes
+ * only. The code is not compatible with any specification of the JCP.
+ *
  * Contributors:
  *     IBM Corporation - initial API and implementation
  *******************************************************************************/
@@ -14,7 +18,9 @@
 
 import java.util.Map;
 
+import org.eclipse.jdt.internal.compiler.classfmt.ClassFileConstants;
 import org.eclipse.jdt.internal.compiler.impl.CompilerOptions;
+import org.eclipse.jdt.internal.compiler.impl.JavaFeature;
 
 import junit.framework.Test;
 
@@ -36,22 +42,10 @@
 		super(testName);
 	}
 
-	// Enables the tests to run individually
-	protected Map<String, String> getCompilerOptions() {
-		Map<String, String> defaultOptions = super.getCompilerOptions();
-		defaultOptions.put(CompilerOptions.OPTION_Compliance, CompilerOptions.VERSION_16);
-		defaultOptions.put(CompilerOptions.OPTION_Source, CompilerOptions.VERSION_16);
-		defaultOptions.put(CompilerOptions.OPTION_TargetPlatform, CompilerOptions.VERSION_16);
-		defaultOptions.put(CompilerOptions.OPTION_EnablePreviews, CompilerOptions.ENABLED);
-		defaultOptions.put(CompilerOptions.OPTION_ReportPreviewFeatures, CompilerOptions.IGNORE);
-		defaultOptions.put(CompilerOptions.OPTION_Store_Annotations, CompilerOptions.ENABLED);
-		return defaultOptions;
-	}
-
 	/*
 	 * Preview API, --enable-preview=false, SuppressWarning=No
 	 */
-	public void test001() {
+	public void _test001() {
 		Map<String, String> options = getCompilerOptions();
 		String old = options.get(CompilerOptions.OPTION_EnablePreviews);
 		options.put(CompilerOptions.OPTION_EnablePreviews, CompilerOptions.DISABLED);
@@ -96,7 +90,7 @@
 	/*
 	 * Preview API, --enable-preview=false, SuppressWarning=yes
 	 */
-	public void test002() {
+	public void _test002() {
 		Map<String, String> options = getCompilerOptions();
 		String old = options.get(CompilerOptions.OPTION_EnablePreviews);
 		options.put(CompilerOptions.OPTION_EnablePreviews, CompilerOptions.DISABLED);
@@ -134,6 +128,8 @@
 	 */
 	public void test003() {
 		Map<String, String> options = getCompilerOptions();
+		if (this.complianceLevel < ClassFileConstants.getLatestJDKLevel())
+			return;
 		String old = options.get(CompilerOptions.OPTION_EnablePreviews);
 		options.put(CompilerOptions.OPTION_EnablePreviews, CompilerOptions.ENABLED);
 		try {
@@ -168,6 +164,8 @@
 	 * Preview API, --enable-preview=true, SuppressWarning=Yes
 	 */
 	public void test004() {
+		if (this.complianceLevel < ClassFileConstants.getLatestJDKLevel())
+			return;
 		Map<String, String> options = getCompilerOptions();
 		String old = options.get(CompilerOptions.OPTION_EnablePreviews);
 		options.put(CompilerOptions.OPTION_EnablePreviews, CompilerOptions.ENABLED);
@@ -200,4 +198,20 @@
 			options.put(CompilerOptions.OPTION_EnablePreviews, old);
 		}
 	}
+	public void test005() {
+		if (this.complianceLevel < ClassFileConstants.JDK16)
+			return;
+		Map<String, String> options = getCompilerOptions();
+		String old = options.get(CompilerOptions.OPTION_EnablePreviews);
+		if (this.complianceLevel == ClassFileConstants.getLatestJDKLevel())
+			options.put(CompilerOptions.OPTION_EnablePreviews, CompilerOptions.ENABLED);
+		try {
+			if (this.complianceLevel < ClassFileConstants.getLatestJDKLevel())
+				assertFalse(JavaFeature.PATTERN_MATCHING_IN_SWITCH.isSupported(new CompilerOptions(options)));
+			else
+				assertTrue(JavaFeature.PATTERN_MATCHING_IN_SWITCH.isSupported(new CompilerOptions(options)));
+		} finally {
+			options.put(CompilerOptions.OPTION_EnablePreviews, old);
+		}
+	}
 }
diff --git a/org.eclipse.jdt.core.tests.compiler/src/org/eclipse/jdt/core/tests/compiler/regression/RecordsRestrictedClassTest.java b/org.eclipse.jdt.core.tests.compiler/src/org/eclipse/jdt/core/tests/compiler/regression/RecordsRestrictedClassTest.java
index ba6a2bd..d9fd2d9 100644
--- a/org.eclipse.jdt.core.tests.compiler/src/org/eclipse/jdt/core/tests/compiler/regression/RecordsRestrictedClassTest.java
+++ b/org.eclipse.jdt.core.tests.compiler/src/org/eclipse/jdt/core/tests/compiler/regression/RecordsRestrictedClassTest.java
@@ -7,6 +7,10 @@
  *
  * SPDX-License-Identifier: EPL-2.0
  *
+ * This is an implementation of an early-draft specification developed under the Java
+ * Community Process (JCP) and is made available for testing and evaluation purposes
+ * only. The code is not compatible with any specification of the JCP.
+ *
  * Contributors:
  *     IBM Corporation - initial API and implementation
  *******************************************************************************/
@@ -20,6 +24,7 @@
 import org.eclipse.jdt.core.tests.util.Util;
 import org.eclipse.jdt.core.util.ClassFileBytesDisassembler;
 import org.eclipse.jdt.core.util.ClassFormatException;
+import org.eclipse.jdt.internal.compiler.classfmt.ClassFileConstants;
 import org.eclipse.jdt.internal.compiler.impl.CompilerOptions;
 
 import junit.framework.Test;
@@ -48,11 +53,21 @@
 		defaultOptions.put(CompilerOptions.OPTION_Compliance, CompilerOptions.VERSION_16);
 		defaultOptions.put(CompilerOptions.OPTION_Source, CompilerOptions.VERSION_16);
 		defaultOptions.put(CompilerOptions.OPTION_TargetPlatform, CompilerOptions.VERSION_16);
-		defaultOptions.put(CompilerOptions.OPTION_EnablePreviews, CompilerOptions.ENABLED);
 		defaultOptions.put(CompilerOptions.OPTION_ReportPreviewFeatures, CompilerOptions.IGNORE);
 		defaultOptions.put(CompilerOptions.OPTION_Store_Annotations, CompilerOptions.ENABLED);
 		return defaultOptions;
 	}
+	// Enables the tests to run individually
+	protected Map<String, String> getCompilerOptionsWithPreview() {
+		Map<String, String> defaultOptions = super.getCompilerOptions();
+		defaultOptions.put(CompilerOptions.OPTION_Compliance, CompilerOptions.VERSION_17);
+		defaultOptions.put(CompilerOptions.OPTION_Source, CompilerOptions.VERSION_17);
+		defaultOptions.put(CompilerOptions.OPTION_TargetPlatform, CompilerOptions.VERSION_17);
+		defaultOptions.put(CompilerOptions.OPTION_ReportPreviewFeatures, CompilerOptions.IGNORE);
+		defaultOptions.put(CompilerOptions.OPTION_Store_Annotations, CompilerOptions.ENABLED);
+		defaultOptions.put(CompilerOptions.OPTION_EnablePreviews, CompilerOptions.ENABLED);
+		return defaultOptions;
+	}
 
 	@Override
 	protected void runConformTest(String[] testFiles, String expectedOutput) {
@@ -68,7 +83,7 @@
 		runner.expectedOutputString = expectedOutput;
 		runner.vmArguments = new String[] {"--enable-preview"};
 		runner.customOptions = customOptions;
-		runner.javacTestOptions = JavacTestOptions.forReleaseWithPreview("16");
+		runner.javacTestOptions = JavacTestOptions.forRelease("16");
 		runner.runConformTest();
 	}
 	@Override
@@ -91,9 +106,9 @@
 		runner.testFiles = testFiles;
 		runner.expectedCompilerLog = expectedCompilerLog;
 		runner.customOptions = customOptions;
-		runner.vmArguments = new String[] {"--enable-preview"};
-		runner.javacTestOptions = javacAdditionalTestOptions == null ? JavacTestOptions.forReleaseWithPreview("16") :
-			JavacTestOptions.forReleaseWithPreview("16", javacAdditionalTestOptions);
+		runner.vmArguments = new String[] {};
+		runner.javacTestOptions = javacAdditionalTestOptions == null ? JavacTestOptions.forRelease("16") :
+			JavacTestOptions.forRelease("16", javacAdditionalTestOptions);
 		runner.runWarningTest();
 	}
 
@@ -179,7 +194,7 @@
 		runConformTest(
 				new String[] {
 						"X.java",
-						"class X {\n"+
+						"public class X {\n"+
 						"  public static void main(String[] args){\n"+
 						"     System.out.println(0);\n" +
 						"  }\n"+
@@ -769,7 +784,7 @@
 			"1. ERROR in X.java (at line 1)\n" +
 			"	class record {\n" +
 			"	      ^^^^^^\n" +
-			"\'record\' is not a valid type name; it is a restricted identifier and not allowed as a type identifier in Java "+ AbstractRegressionTest.PREVIEW_ALLOWED_LEVEL +"\n" +
+			"\'record\' is not a valid type name; it is a restricted identifier and not allowed as a type identifier in Java 16\n" +
 			"----------\n");
 	}
 	public void testBug550750_033() {
@@ -786,7 +801,7 @@
 			"1. ERROR in X.java (at line 1)\n" +
 			"	class X<record> {\n" +
 			"	        ^^^^^^\n" +
-			"\'record\' is not a valid type name; it is a restricted identifier and not allowed as a type identifier in Java "+ AbstractRegressionTest.PREVIEW_ALLOWED_LEVEL +"\n" +
+			"\'record\' is not a valid type name; it is a restricted identifier and not allowed as a type identifier in Java 16\n" +
 			"----------\n");
 	}
 	public void testBug550750_034() {
@@ -804,12 +819,12 @@
 			"1. ERROR in X.java (at line 5)\n" +
 			"	public <record> void foo(record args){}\n" +
 			"	        ^^^^^^\n" +
-			"\'record\' is not a valid type name; it is a restricted identifier and not allowed as a type identifier in Java "+ AbstractRegressionTest.PREVIEW_ALLOWED_LEVEL +"\n" +
+			"\'record\' is not a valid type name; it is a restricted identifier and not allowed as a type identifier in Java 16\n" +
 			"----------\n" +
 			"2. ERROR in X.java (at line 5)\n" +
 			"	public <record> void foo(record args){}\n" +
 			"	                         ^^^^^^\n" +
-			"\'record\' is not a valid type name; it is a restricted identifier and not allowed as a type identifier in Java "+ AbstractRegressionTest.PREVIEW_ALLOWED_LEVEL +"\n" +
+			"\'record\' is not a valid type name; it is a restricted identifier and not allowed as a type identifier in Java 16\n" +
 			"----------\n");
 	}
 	public void testBug550750_035() {
@@ -827,7 +842,7 @@
 			"1. ERROR in X.java (at line 5)\n" +
 			"	public void foo(record args){}\n" +
 			"	                ^^^^^^\n" +
-			"\'record\' is not a valid type name; it is a restricted identifier and not allowed as a type identifier in Java "+ AbstractRegressionTest.PREVIEW_ALLOWED_LEVEL +"\n" +
+			"\'record\' is not a valid type name; it is a restricted identifier and not allowed as a type identifier in Java 16\n" +
 			"----------\n");
 	}
 	public void testBug550750_036() {
@@ -853,7 +868,7 @@
 			"2. ERROR in X.java (at line 4)\n" +
 			"	I lambda = (record r) -> {};\n" +
 			"	            ^^^^^^\n" +
-			"\'record\' is not a valid type name; it is a restricted identifier and not allowed as a type identifier in Java "+ AbstractRegressionTest.PREVIEW_ALLOWED_LEVEL +"\n" +
+			"\'record\' is not a valid type name; it is a restricted identifier and not allowed as a type identifier in Java 16\n" +
 			"----------\n");
 	}
 	public void testBug550750_037() {
@@ -4720,12 +4735,12 @@
 		"1. ERROR in X.java (at line 1)\n" +
 		"	class X extends record {\n" +
 		"	                ^^^^^^\n" +
-		"\'record\' is not a valid type name; it is a restricted identifier and not allowed as a type identifier in Java "+ AbstractRegressionTest.PREVIEW_ALLOWED_LEVEL +"\n" +
+		"\'record\' is not a valid type name; it is a restricted identifier and not allowed as a type identifier in Java 16\n" +
 		"----------\n" +
 		"2. ERROR in X.java (at line 6)\n" +
 		"	class record {}\n" +
 		"	      ^^^^^^\n" +
-		"\'record\' is not a valid type name; it is a restricted identifier and not allowed as a type identifier in Java "+ AbstractRegressionTest.PREVIEW_ALLOWED_LEVEL +"\n" +
+		"\'record\' is not a valid type name; it is a restricted identifier and not allowed as a type identifier in Java 16\n" +
 		"----------\n");
 }
 public void testBug564672_002() {
@@ -4742,7 +4757,7 @@
 		"1. ERROR in X.java (at line 1)\n" +
 		"	class X extends record {\n" +
 		"	                ^^^^^^\n" +
-		"\'record\' is not a valid type name; it is a restricted identifier and not allowed as a type identifier in Java "+ AbstractRegressionTest.PREVIEW_ALLOWED_LEVEL +"\n" +
+		"\'record\' is not a valid type name; it is a restricted identifier and not allowed as a type identifier in Java 16\n" +
 		"----------\n");
 }
 public void testBug564672_003() {
@@ -4760,12 +4775,12 @@
 		"1. ERROR in X.java (at line 1)\n" +
 		"	class X implements record {\n" +
 		"	                   ^^^^^^\n" +
-		"\'record\' is not a valid type name; it is a restricted identifier and not allowed as a type identifier in Java "+ AbstractRegressionTest.PREVIEW_ALLOWED_LEVEL +"\n" +
+		"\'record\' is not a valid type name; it is a restricted identifier and not allowed as a type identifier in Java 16\n" +
 		"----------\n" +
 		"2. ERROR in X.java (at line 5)\n" +
 		"	interface record {}\n" +
 		"	          ^^^^^^\n" +
-		"\'record\' is not a valid type name; it is a restricted identifier and not allowed as a type identifier in Java "+ AbstractRegressionTest.PREVIEW_ALLOWED_LEVEL +"\n" +
+		"\'record\' is not a valid type name; it is a restricted identifier and not allowed as a type identifier in Java 16\n" +
 		"----------\n");
 }
 public void testBug564672_004() {
@@ -4782,7 +4797,7 @@
 		"1. ERROR in X.java (at line 1)\n" +
 		"	class X implements record {\n" +
 		"	                   ^^^^^^\n" +
-		"\'record\' is not a valid type name; it is a restricted identifier and not allowed as a type identifier in Java "+ AbstractRegressionTest.PREVIEW_ALLOWED_LEVEL +"\n" +
+		"\'record\' is not a valid type name; it is a restricted identifier and not allowed as a type identifier in Java 16\n" +
 		"----------\n");
 }
 public void testBug564672_005() {
@@ -4802,12 +4817,12 @@
 		"1. ERROR in X.java (at line 2)\n" +
 		"	class Y extends record {\n" +
 		"	                ^^^^^^\n" +
-		"\'record\' is not a valid type name; it is a restricted identifier and not allowed as a type identifier in Java "+ AbstractRegressionTest.PREVIEW_ALLOWED_LEVEL +"\n" +
+		"\'record\' is not a valid type name; it is a restricted identifier and not allowed as a type identifier in Java 16\n" +
 		"----------\n" +
 		"2. ERROR in X.java (at line 4)\n" +
 		"	class record {}\n" +
 		"	      ^^^^^^\n" +
-		"\'record\' is not a valid type name; it is a restricted identifier and not allowed as a type identifier in Java "+ AbstractRegressionTest.PREVIEW_ALLOWED_LEVEL +"\n" +
+		"\'record\' is not a valid type name; it is a restricted identifier and not allowed as a type identifier in Java 16\n" +
 		"----------\n");
 }
 public void testBug564672_006() {
@@ -4826,7 +4841,7 @@
 		"1. ERROR in X.java (at line 2)\n" +
 		"	class Y extends record {\n" +
 		"	                ^^^^^^\n" +
-		"\'record\' is not a valid type name; it is a restricted identifier and not allowed as a type identifier in Java "+ AbstractRegressionTest.PREVIEW_ALLOWED_LEVEL +"\n" +
+		"\'record\' is not a valid type name; it is a restricted identifier and not allowed as a type identifier in Java 16\n" +
 		"----------\n");
 }
 public void testBug564672_007() {
@@ -4846,12 +4861,12 @@
 		"1. ERROR in X.java (at line 2)\n" +
 		"	class Y implements record {\n" +
 		"	                   ^^^^^^\n" +
-		"\'record\' is not a valid type name; it is a restricted identifier and not allowed as a type identifier in Java "+ AbstractRegressionTest.PREVIEW_ALLOWED_LEVEL +"\n" +
+		"\'record\' is not a valid type name; it is a restricted identifier and not allowed as a type identifier in Java 16\n" +
 		"----------\n" +
 		"2. ERROR in X.java (at line 4)\n" +
 		"	interface record {}\n" +
 		"	          ^^^^^^\n" +
-		"\'record\' is not a valid type name; it is a restricted identifier and not allowed as a type identifier in Java "+ AbstractRegressionTest.PREVIEW_ALLOWED_LEVEL +"\n" +
+		"\'record\' is not a valid type name; it is a restricted identifier and not allowed as a type identifier in Java 16\n" +
 		"----------\n");
 }
 public void testBug564672_008() {
@@ -4870,7 +4885,7 @@
 		"1. ERROR in X.java (at line 2)\n" +
 		"	class Y implements record {\n" +
 		"	                   ^^^^^^\n" +
-		"\'record\' is not a valid type name; it is a restricted identifier and not allowed as a type identifier in Java "+ AbstractRegressionTest.PREVIEW_ALLOWED_LEVEL +"\n" +
+		"\'record\' is not a valid type name; it is a restricted identifier and not allowed as a type identifier in Java 16\n" +
 		"----------\n");
 }
 public void testBug564672_009() {
@@ -4890,12 +4905,12 @@
 		"1. ERROR in X.java (at line 1)\n" +
 		"	interface Y extends record {\n" +
 		"	                    ^^^^^^\n" +
-		"\'record\' is not a valid type name; it is a restricted identifier and not allowed as a type identifier in Java "+ AbstractRegressionTest.PREVIEW_ALLOWED_LEVEL +"\n" +
+		"\'record\' is not a valid type name; it is a restricted identifier and not allowed as a type identifier in Java 16\n" +
 		"----------\n" +
 		"2. ERROR in X.java (at line 3)\n" +
 		"	interface record {}\n" +
 		"	          ^^^^^^\n" +
-		"\'record\' is not a valid type name; it is a restricted identifier and not allowed as a type identifier in Java "+ AbstractRegressionTest.PREVIEW_ALLOWED_LEVEL +"\n" +
+		"\'record\' is not a valid type name; it is a restricted identifier and not allowed as a type identifier in Java 16\n" +
 		"----------\n");
 }
 public void testBug564672_010() {
@@ -4914,7 +4929,7 @@
 		"1. ERROR in X.java (at line 1)\n" +
 		"	interface Y extends record {\n" +
 		"	                    ^^^^^^\n" +
-		"\'record\' is not a valid type name; it is a restricted identifier and not allowed as a type identifier in Java "+ AbstractRegressionTest.PREVIEW_ALLOWED_LEVEL +"\n" +
+		"\'record\' is not a valid type name; it is a restricted identifier and not allowed as a type identifier in Java 16\n" +
 		"----------\n");
 }
 public void testBug564672_011() {
@@ -4934,12 +4949,12 @@
 		"1. ERROR in X.java (at line 2)\n" +
 		"	interface Y extends record {\n" +
 		"	                    ^^^^^^\n" +
-		"\'record\' is not a valid type name; it is a restricted identifier and not allowed as a type identifier in Java "+ AbstractRegressionTest.PREVIEW_ALLOWED_LEVEL +"\n" +
+		"\'record\' is not a valid type name; it is a restricted identifier and not allowed as a type identifier in Java 16\n" +
 		"----------\n" +
 		"2. ERROR in X.java (at line 4)\n" +
 		"	interface record {}\n" +
 		"	          ^^^^^^\n" +
-		"\'record\' is not a valid type name; it is a restricted identifier and not allowed as a type identifier in Java "+ AbstractRegressionTest.PREVIEW_ALLOWED_LEVEL +"\n" +
+		"\'record\' is not a valid type name; it is a restricted identifier and not allowed as a type identifier in Java 16\n" +
 		"----------\n");
 }
 public void testBug564672_012() {
@@ -4958,7 +4973,7 @@
 		"1. ERROR in X.java (at line 2)\n" +
 		"	interface Y extends record {\n" +
 		"	                    ^^^^^^\n" +
-		"\'record\' is not a valid type name; it is a restricted identifier and not allowed as a type identifier in Java "+ AbstractRegressionTest.PREVIEW_ALLOWED_LEVEL +"\n" +
+		"\'record\' is not a valid type name; it is a restricted identifier and not allowed as a type identifier in Java 16\n" +
 		"----------\n");
 }
 public void testBug564672_013() {
@@ -4975,12 +4990,12 @@
 		"1. ERROR in X.java (at line 2)\n" +
 		"	class Y extends record {\n" +
 		"	                ^^^^^^\n" +
-		"\'record\' is not a valid type name; it is a restricted identifier and not allowed as a type identifier in Java "+ AbstractRegressionTest.PREVIEW_ALLOWED_LEVEL +"\n" +
+		"\'record\' is not a valid type name; it is a restricted identifier and not allowed as a type identifier in Java 16\n" +
 		"----------\n" +
 		"2. ERROR in X.java (at line 4)\n" +
 		"	class record {}\n" +
 		"	      ^^^^^^\n" +
-		"\'record\' is not a valid type name; it is a restricted identifier and not allowed as a type identifier in Java "+ AbstractRegressionTest.PREVIEW_ALLOWED_LEVEL +"\n" +
+		"\'record\' is not a valid type name; it is a restricted identifier and not allowed as a type identifier in Java 16\n" +
 		"----------\n");
 }
 public void testBug564672_014() {
@@ -4996,7 +5011,7 @@
 		"1. ERROR in X.java (at line 2)\n" +
 		"	class Y extends record {\n" +
 		"	                ^^^^^^\n" +
-		"\'record\' is not a valid type name; it is a restricted identifier and not allowed as a type identifier in Java "+ AbstractRegressionTest.PREVIEW_ALLOWED_LEVEL +"\n" +
+		"\'record\' is not a valid type name; it is a restricted identifier and not allowed as a type identifier in Java 16\n" +
 		"----------\n");
 }
 public void testBug564672_015() {
@@ -5013,12 +5028,12 @@
 		"1. ERROR in X.java (at line 2)\n" +
 		"	class Y implements record {\n" +
 		"	                   ^^^^^^\n" +
-		"\'record\' is not a valid type name; it is a restricted identifier and not allowed as a type identifier in Java "+ AbstractRegressionTest.PREVIEW_ALLOWED_LEVEL +"\n" +
+		"\'record\' is not a valid type name; it is a restricted identifier and not allowed as a type identifier in Java 16\n" +
 		"----------\n" +
 		"2. ERROR in X.java (at line 4)\n" +
 		"	interface record {}\n" +
 		"	          ^^^^^^\n" +
-		"\'record\' is not a valid type name; it is a restricted identifier and not allowed as a type identifier in Java "+ AbstractRegressionTest.PREVIEW_ALLOWED_LEVEL +"\n" +
+		"\'record\' is not a valid type name; it is a restricted identifier and not allowed as a type identifier in Java 16\n" +
 		"----------\n");
 }
 public void testBug564672_016() {
@@ -5034,7 +5049,7 @@
 		"1. ERROR in X.java (at line 2)\n" +
 		"	class Y implements record {\n" +
 		"	                   ^^^^^^\n" +
-		"\'record\' is not a valid type name; it is a restricted identifier and not allowed as a type identifier in Java "+ AbstractRegressionTest.PREVIEW_ALLOWED_LEVEL +"\n" +
+		"\'record\' is not a valid type name; it is a restricted identifier and not allowed as a type identifier in Java 16\n" +
 		"----------\n");
 }
 public void testBug564672_017() {
@@ -5051,12 +5066,12 @@
 		"1. ERROR in X.java (at line 2)\n" +
 		"	interface Y extends record {\n" +
 		"	                    ^^^^^^\n" +
-		"\'record\' is not a valid type name; it is a restricted identifier and not allowed as a type identifier in Java "+ AbstractRegressionTest.PREVIEW_ALLOWED_LEVEL +"\n" +
+		"\'record\' is not a valid type name; it is a restricted identifier and not allowed as a type identifier in Java 16\n" +
 		"----------\n" +
 		"2. ERROR in X.java (at line 4)\n" +
 		"	interface record {}\n" +
 		"	          ^^^^^^\n" +
-		"\'record\' is not a valid type name; it is a restricted identifier and not allowed as a type identifier in Java "+ AbstractRegressionTest.PREVIEW_ALLOWED_LEVEL +"\n" +
+		"\'record\' is not a valid type name; it is a restricted identifier and not allowed as a type identifier in Java 16\n" +
 		"----------\n");
 }
 public void testBug564672_018() {
@@ -5072,7 +5087,7 @@
 		"1. ERROR in X.java (at line 2)\n" +
 		"	interface Y extends record {\n" +
 		"	                    ^^^^^^\n" +
-		"\'record\' is not a valid type name; it is a restricted identifier and not allowed as a type identifier in Java "+ AbstractRegressionTest.PREVIEW_ALLOWED_LEVEL +"\n" +
+		"\'record\' is not a valid type name; it is a restricted identifier and not allowed as a type identifier in Java 16\n" +
 		"----------\n");
 }
 public void testBug564672_019() {
@@ -5093,12 +5108,12 @@
 		"1. ERROR in X.java (at line 3)\n" +
 		"	record r=new record(i,j);\n" +
 		"	^^^^^^\n" +
-		"\'record\' is not a valid type name; it is a restricted identifier and not allowed as a type identifier in Java "+ AbstractRegressionTest.PREVIEW_ALLOWED_LEVEL +"\n" +
+		"\'record\' is not a valid type name; it is a restricted identifier and not allowed as a type identifier in Java 16\n" +
 		"----------\n" +
 		"2. ERROR in X.java (at line 3)\n" +
 		"	record r=new record(i,j);\n" +
 		"	             ^^^^^^\n" +
-		"\'record\' is not a valid type name; it is a restricted identifier and not allowed as a type identifier in Java "+ AbstractRegressionTest.PREVIEW_ALLOWED_LEVEL +"\n" +
+		"\'record\' is not a valid type name; it is a restricted identifier and not allowed as a type identifier in Java 16\n" +
 		"----------\n" +
 		"3. ERROR in X.java (at line 4)\n" +
 		"	return r;\n" +
@@ -5125,17 +5140,17 @@
 		"1. ERROR in X.java (at line 2)\n" +
 		"	class record {};\n" +
 		"	      ^^^^^^\n" +
-		"\'record\' is not a valid type name; it is a restricted identifier and not allowed as a type identifier in Java "+ AbstractRegressionTest.PREVIEW_ALLOWED_LEVEL +"\n" +
+		"\'record\' is not a valid type name; it is a restricted identifier and not allowed as a type identifier in Java 16\n" +
 		"----------\n" +
 		"2. ERROR in X.java (at line 4)\n" +
 		"	record r=new record();\n" +
 		"	^^^^^^\n" +
-		"\'record\' is not a valid type name; it is a restricted identifier and not allowed as a type identifier in Java "+ AbstractRegressionTest.PREVIEW_ALLOWED_LEVEL +"\n" +
+		"\'record\' is not a valid type name; it is a restricted identifier and not allowed as a type identifier in Java 16\n" +
 		"----------\n" +
 		"3. ERROR in X.java (at line 4)\n" +
 		"	record r=new record();\n" +
 		"	             ^^^^^^\n" +
-		"\'record\' is not a valid type name; it is a restricted identifier and not allowed as a type identifier in Java "+ AbstractRegressionTest.PREVIEW_ALLOWED_LEVEL +"\n" +
+		"\'record\' is not a valid type name; it is a restricted identifier and not allowed as a type identifier in Java 16\n" +
 		"----------\n" +
 		"4. ERROR in X.java (at line 5)\n" +
 		"	return r;\n" +
@@ -5244,7 +5259,7 @@
 		"1. ERROR in X.java (at line 5)\n" +
 		"	static IPoint a(int i, int j) throws record{\n" +
 		"	                                     ^^^^^^\n" +
-		"\'record\' is not a valid type name; it is a restricted identifier and not allowed as a type identifier in Java "+ AbstractRegressionTest.PREVIEW_ALLOWED_LEVEL +"\n" +
+		"\'record\' is not a valid type name; it is a restricted identifier and not allowed as a type identifier in Java 16\n" +
 		"----------\n");
 }
 public void testBug564672_024() {
@@ -5262,7 +5277,7 @@
 		"1. ERROR in X.java (at line 2)\n" +
 		"	X() throws record {} \n" +
 		"	           ^^^^^^\n" +
-		"\'record\' is not a valid type name; it is a restricted identifier and not allowed as a type identifier in Java "+ AbstractRegressionTest.PREVIEW_ALLOWED_LEVEL +"\n" +
+		"\'record\' is not a valid type name; it is a restricted identifier and not allowed as a type identifier in Java 16\n" +
 		"----------\n");
 }
 public void testBug564672_025() {
@@ -5277,7 +5292,7 @@
 		"1. ERROR in X.java (at line 2)\n" +
 		"	int a() throws record; \n" +
 		"	               ^^^^^^\n" +
-		"\'record\' is not a valid type name; it is a restricted identifier and not allowed as a type identifier in Java "+ AbstractRegressionTest.PREVIEW_ALLOWED_LEVEL +"\n" +
+		"\'record\' is not a valid type name; it is a restricted identifier and not allowed as a type identifier in Java 16\n" +
 		"----------\n");
 }
 public void testBug564672_026() {
@@ -5296,7 +5311,7 @@
 		"1. ERROR in X.java (at line 2)\n" +
 		"	List<record> R = new List<record>();\n" +
 		"	     ^^^^^^\n" +
-		"\'record\' is not a valid type name; it is a restricted identifier and not allowed as a type identifier in Java "+ AbstractRegressionTest.PREVIEW_ALLOWED_LEVEL +"\n" +
+		"\'record\' is not a valid type name; it is a restricted identifier and not allowed as a type identifier in Java 16\n" +
 		"----------\n" +
 		"2. ERROR in X.java (at line 2)\n" +
 		"	List<record> R = new List<record>();\n" +
@@ -5306,7 +5321,7 @@
 		"3. ERROR in X.java (at line 2)\n" +
 		"	List<record> R = new List<record>();\n" +
 		"	                          ^^^^^^\n" +
-		"\'record\' is not a valid type name; it is a restricted identifier and not allowed as a type identifier in Java "+ AbstractRegressionTest.PREVIEW_ALLOWED_LEVEL +"\n" +
+		"\'record\' is not a valid type name; it is a restricted identifier and not allowed as a type identifier in Java 16\n" +
 		"----------\n");
 }
 public void testBug564672_027() {
@@ -5334,12 +5349,12 @@
 		"2. ERROR in X.java (at line 4)\n" +
 		"	public class X implements I<record>{\n" +
 		"	                            ^^^^^^\n" +
-		"\'record\' is not a valid type name; it is a restricted identifier and not allowed as a type identifier in Java "+ AbstractRegressionTest.PREVIEW_ALLOWED_LEVEL +"\n" +
+		"\'record\' is not a valid type name; it is a restricted identifier and not allowed as a type identifier in Java 16\n" +
 		"----------\n" +
 		"3. ERROR in X.java (at line 5)\n" +
 		"	void print(record arg){\n" +
 		"	           ^^^^^^\n" +
-		"\'record\' is not a valid type name; it is a restricted identifier and not allowed as a type identifier in Java "+ AbstractRegressionTest.PREVIEW_ALLOWED_LEVEL +"\n" +
+		"\'record\' is not a valid type name; it is a restricted identifier and not allowed as a type identifier in Java 16\n" +
 		"----------\n");
 }
 public void testBug564672_028() {
@@ -5359,12 +5374,12 @@
 		"1. ERROR in X.java (at line 1)\n" +
 		"	class Y<record> {\n" +
 		"	        ^^^^^^\n" +
-		"\'record\' is not a valid type name; it is a restricted identifier and not allowed as a type identifier in Java "+ AbstractRegressionTest.PREVIEW_ALLOWED_LEVEL +"\n" +
+		"\'record\' is not a valid type name; it is a restricted identifier and not allowed as a type identifier in Java 16\n" +
 		"----------\n" +
 		"2. ERROR in X.java (at line 2)\n" +
 		"	void equal(record R) {}\n" +
 		"	           ^^^^^^\n" +
-		"\'record\' is not a valid type name; it is a restricted identifier and not allowed as a type identifier in Java "+ AbstractRegressionTest.PREVIEW_ALLOWED_LEVEL +"\n" +
+		"\'record\' is not a valid type name; it is a restricted identifier and not allowed as a type identifier in Java 16\n" +
 		"----------\n");
 }
 public void testBug564672_029() {
@@ -5384,12 +5399,12 @@
 		"1. ERROR in X.java (at line 1)\n" +
 		"	class Y<record> {\n" +
 		"	        ^^^^^^\n" +
-		"\'record\' is not a valid type name; it is a restricted identifier and not allowed as a type identifier in Java "+ AbstractRegressionTest.PREVIEW_ALLOWED_LEVEL +"\n" +
+		"\'record\' is not a valid type name; it is a restricted identifier and not allowed as a type identifier in Java 16\n" +
 		"----------\n" +
 		"2. ERROR in X.java (at line 2)\n" +
 		"	Y(record R) {}\n" +
 		"	  ^^^^^^\n" +
-		"\'record\' is not a valid type name; it is a restricted identifier and not allowed as a type identifier in Java "+ AbstractRegressionTest.PREVIEW_ALLOWED_LEVEL +"\n" +
+		"\'record\' is not a valid type name; it is a restricted identifier and not allowed as a type identifier in Java 16\n" +
 		"----------\n");
 }
 public void testBug564672_030() {
@@ -5407,7 +5422,7 @@
 		"1. ERROR in X.java (at line 2)\n" +
 		"	static record i= 0;\n" +
 		"	       ^^^^^^\n" +
-		"\'record\' is not a valid type name; it is a restricted identifier and not allowed as a type identifier in Java "+ AbstractRegressionTest.PREVIEW_ALLOWED_LEVEL +"\n" +
+		"\'record\' is not a valid type name; it is a restricted identifier and not allowed as a type identifier in Java 16\n" +
 		"----------\n");
 }
 public void testBug564672_031() {
@@ -5427,7 +5442,7 @@
 		"1. ERROR in X.java (at line 2)\n" +
 		"	record i=0;\n" +
 		"	^^^^^^\n" +
-		"\'record\' is not a valid type name; it is a restricted identifier and not allowed as a type identifier in Java "+ AbstractRegressionTest.PREVIEW_ALLOWED_LEVEL +"\n" +
+		"\'record\' is not a valid type name; it is a restricted identifier and not allowed as a type identifier in Java 16\n" +
 		"----------\n");
 }
 public void testBug564672_032() {
@@ -5447,7 +5462,7 @@
 		"1. ERROR in X.java (at line 2)\n" +
 		"	static int sum(record i, int param){\n" +
 		"	               ^^^^^^\n" +
-		"\'record\' is not a valid type name; it is a restricted identifier and not allowed as a type identifier in Java "+ AbstractRegressionTest.PREVIEW_ALLOWED_LEVEL +"\n" +
+		"\'record\' is not a valid type name; it is a restricted identifier and not allowed as a type identifier in Java 16\n" +
 		"----------\n");
 }
 public void testBug564672_033() {
@@ -5466,7 +5481,7 @@
 		"1. ERROR in X.java (at line 2)\n" +
 		"	X(record i, int param){\n" +
 		"	  ^^^^^^\n" +
-		"\'record\' is not a valid type name; it is a restricted identifier and not allowed as a type identifier in Java "+ AbstractRegressionTest.PREVIEW_ALLOWED_LEVEL +"\n" +
+		"\'record\' is not a valid type name; it is a restricted identifier and not allowed as a type identifier in Java 16\n" +
 		"----------\n");
 }
 public void testBug564672_034() {
@@ -5486,7 +5501,7 @@
 		"1. ERROR in X.java (at line 2)\n" +
 		"	int sum(record i, int num);\n" +
 		"	        ^^^^^^\n" +
-		"\'record\' is not a valid type name; it is a restricted identifier and not allowed as a type identifier in Java "+ AbstractRegressionTest.PREVIEW_ALLOWED_LEVEL +"\n" +
+		"\'record\' is not a valid type name; it is a restricted identifier and not allowed as a type identifier in Java 16\n" +
 		"----------\n");
 }
 public void testBug564672_035() {
@@ -5525,7 +5540,7 @@
 		"1. ERROR in X.java (at line 2)\n" +
 		"	int sum(record this, int i, int num) {}\n" +
 		"	        ^^^^^^\n" +
-		"\'record\' is not a valid type name; it is a restricted identifier and not allowed as a type identifier in Java "+ AbstractRegressionTest.PREVIEW_ALLOWED_LEVEL +"\n" +
+		"\'record\' is not a valid type name; it is a restricted identifier and not allowed as a type identifier in Java 16\n" +
 		"----------\n");
 }
 public void testBug564672_037() {
@@ -5543,7 +5558,7 @@
 		"1. ERROR in X.java (at line 2)\n" +
 		"	static record i;\n" +
 		"	       ^^^^^^\n" +
-		"\'record\' is not a valid type name; it is a restricted identifier and not allowed as a type identifier in Java "+ AbstractRegressionTest.PREVIEW_ALLOWED_LEVEL +"\n" +
+		"\'record\' is not a valid type name; it is a restricted identifier and not allowed as a type identifier in Java 16\n" +
 		"----------\n");
 }
 public void testBug564672_038() {
@@ -5562,7 +5577,7 @@
 		"1. ERROR in X.java (at line 3)\n" +
 		"	for (record i = 0; i<10; i++) {\n" +
 		"	     ^^^^^^\n" +
-		"\'record\' is not a valid type name; it is a restricted identifier and not allowed as a type identifier in Java "+ AbstractRegressionTest.PREVIEW_ALLOWED_LEVEL +"\n" +
+		"\'record\' is not a valid type name; it is a restricted identifier and not allowed as a type identifier in Java 16\n" +
 		"----------\n");
 }
 public void testBug564672_039() {
@@ -5582,7 +5597,7 @@
 		"1. ERROR in X.java (at line 4)\n" +
 		"	for (record i: rec) {\n" +
 		"	     ^^^^^^\n" +
-		"\'record\' is not a valid type name; it is a restricted identifier and not allowed as a type identifier in Java "+ AbstractRegressionTest.PREVIEW_ALLOWED_LEVEL +"\n" +
+		"\'record\' is not a valid type name; it is a restricted identifier and not allowed as a type identifier in Java 16\n" +
 		"----------\n" +
 		"2. ERROR in X.java (at line 4)\n" +
 		"	for (record i: rec) {\n" +
@@ -5606,7 +5621,7 @@
 		"1. ERROR in X.java (at line 3)\n" +
 		"	try (record i = 0){\n" +
 		"	     ^^^^^^\n" +
-		"\'record\' is not a valid type name; it is a restricted identifier and not allowed as a type identifier in Java "+ AbstractRegressionTest.PREVIEW_ALLOWED_LEVEL +"\n" +
+		"\'record\' is not a valid type name; it is a restricted identifier and not allowed as a type identifier in Java 16\n" +
 		"----------\n");
 }
 public void testBug564672_041() {
@@ -5626,7 +5641,7 @@
 		"1. ERROR in X.java (at line 5)\n" +
 		"	catch (record e) {}\n" +
 		"	       ^^^^^^\n" +
-		"\'record\' is not a valid type name; it is a restricted identifier and not allowed as a type identifier in Java "+ AbstractRegressionTest.PREVIEW_ALLOWED_LEVEL +"\n" +
+		"\'record\' is not a valid type name; it is a restricted identifier and not allowed as a type identifier in Java 16\n" +
 		"----------\n");
 }
 public void testBug564672_042() {
@@ -5649,7 +5664,7 @@
 		"2. ERROR in X.java (at line 1)\n" +
 		"	record Point(record x, int i) { }\n" +
 		"	             ^^^^^^\n" +
-		"\'record\' is not a valid type name; it is a restricted identifier and not allowed as a type identifier in Java "+ AbstractRegressionTest.PREVIEW_ALLOWED_LEVEL +"\n" +
+		"\'record\' is not a valid type name; it is a restricted identifier and not allowed as a type identifier in Java 16\n" +
 		"----------\n");
 }
 public void testBug564672_043() {
@@ -5673,7 +5688,7 @@
 		"1. ERROR in X.java (at line 5)\n" +
 		"	<record> this(null);\n" +
 		"	 ^^^^^^\n" +
-		"\'record\' is not a valid type name; it is a restricted identifier and not allowed as a type identifier in Java "+ AbstractRegressionTest.PREVIEW_ALLOWED_LEVEL +"\n" +
+		"\'record\' is not a valid type name; it is a restricted identifier and not allowed as a type identifier in Java 16\n" +
 		"----------\n" +
 		"2. ERROR in X.java (at line 5)\n" +
 		"	<record> this(null);\n" +
@@ -5704,7 +5719,7 @@
 		"1. ERROR in X.java (at line 7)\n" +
 		"	<record> super(null);\n" +
 		"	 ^^^^^^\n" +
-		"\'record\' is not a valid type name; it is a restricted identifier and not allowed as a type identifier in Java "+ AbstractRegressionTest.PREVIEW_ALLOWED_LEVEL +"\n" +
+		"\'record\' is not a valid type name; it is a restricted identifier and not allowed as a type identifier in Java 16\n" +
 		"----------\n" +
 		"2. ERROR in X.java (at line 7)\n" +
 		"	<record> super(null);\n" +
@@ -5732,7 +5747,7 @@
 		"1. ERROR in X.java (at line 4)\n" +
 		"	this.<record>m1();	}\n" +
 		"	      ^^^^^^\n" +
-		"\'record\' is not a valid type name; it is a restricted identifier and not allowed as a type identifier in Java "+ AbstractRegressionTest.PREVIEW_ALLOWED_LEVEL +"\n" +
+		"\'record\' is not a valid type name; it is a restricted identifier and not allowed as a type identifier in Java 16\n" +
 		"----------\n" +
 		"2. WARNING in X.java (at line 4)\n" +
 		"	this.<record>m1();	}\n" +
@@ -5760,7 +5775,7 @@
 		"1. ERROR in X.java (at line 8)\n" +
 		"	new <record>Y().a();\n" +
 		"	     ^^^^^^\n" +
-		"\'record\' is not a valid type name; it is a restricted identifier and not allowed as a type identifier in Java "+ AbstractRegressionTest.PREVIEW_ALLOWED_LEVEL +"\n" +
+		"\'record\' is not a valid type name; it is a restricted identifier and not allowed as a type identifier in Java 16\n" +
 		"----------\n" +
 		"2. WARNING in X.java (at line 8)\n" +
 		"	new <record>Y().a();\n" +
@@ -5789,7 +5804,7 @@
 		"1. ERROR in X.java (at line 5)\n" +
 		"	new <record>Y() {\n" +
 		"	     ^^^^^^\n" +
-		"\'record\' is not a valid type name; it is a restricted identifier and not allowed as a type identifier in Java "+ AbstractRegressionTest.PREVIEW_ALLOWED_LEVEL +"\n" +
+		"\'record\' is not a valid type name; it is a restricted identifier and not allowed as a type identifier in Java 16\n" +
 		"----------\n" +
 		"2. WARNING in X.java (at line 5)\n" +
 		"	new <record>Y() {\n" +
@@ -5818,7 +5833,7 @@
 		"1. ERROR in X.java (at line 5)\n" +
 		"	new <record>Y() {\n" +
 		"	     ^^^^^^\n" +
-		"\'record\' is not a valid type name; it is a restricted identifier and not allowed as a type identifier in Java "+ AbstractRegressionTest.PREVIEW_ALLOWED_LEVEL +"\n" +
+		"\'record\' is not a valid type name; it is a restricted identifier and not allowed as a type identifier in Java 16\n" +
 		"----------\n" +
 		"2. WARNING in X.java (at line 5)\n" +
 		"	new <record>Y() {\n" +
@@ -5841,12 +5856,12 @@
 		"1. ERROR in X.java (at line 3)\n" +
 		"	record[] y= new record[3]; \n" +
 		"	^^^^^^^^\n" +
-		"\'record\' is not a valid type name; it is a restricted identifier and not allowed as a type identifier in Java "+ AbstractRegressionTest.PREVIEW_ALLOWED_LEVEL +"\n" +
+		"\'record\' is not a valid type name; it is a restricted identifier and not allowed as a type identifier in Java 16\n" +
 		"----------\n" +
 		"2. ERROR in X.java (at line 3)\n" +
 		"	record[] y= new record[3]; \n" +
 		"	                ^^^^^^\n" +
-		"\'record\' is not a valid type name; it is a restricted identifier and not allowed as a type identifier in Java "+ AbstractRegressionTest.PREVIEW_ALLOWED_LEVEL +"\n" +
+		"\'record\' is not a valid type name; it is a restricted identifier and not allowed as a type identifier in Java 16\n" +
 		"----------\n");
 }
 public void testBug564672_050() {
@@ -5865,12 +5880,12 @@
 		"1. ERROR in X.java (at line 4)\n" +
 		"	record y= (record)s; \n" +
 		"	^^^^^^\n" +
-		"\'record\' is not a valid type name; it is a restricted identifier and not allowed as a type identifier in Java "+ AbstractRegressionTest.PREVIEW_ALLOWED_LEVEL +"\n" +
+		"\'record\' is not a valid type name; it is a restricted identifier and not allowed as a type identifier in Java 16\n" +
 		"----------\n" +
 		"2. ERROR in X.java (at line 4)\n" +
 		"	record y= (record)s; \n" +
 		"	           ^^^^^^\n" +
-		"\'record\' is not a valid type name; it is a restricted identifier and not allowed as a type identifier in Java "+ AbstractRegressionTest.PREVIEW_ALLOWED_LEVEL +"\n" +
+		"\'record\' is not a valid type name; it is a restricted identifier and not allowed as a type identifier in Java 16\n" +
 		"----------\n");
 }
 public void testBug564672_051() {
@@ -5891,7 +5906,7 @@
 		"1. ERROR in X.java (at line 4)\n" +
 		"	if (s instanceof record) { \n" +
 		"	                 ^^^^^^\n" +
-		"\'record\' is not a valid type name; it is a restricted identifier and not allowed as a type identifier in Java "+ AbstractRegressionTest.PREVIEW_ALLOWED_LEVEL +"\n" +
+		"\'record\' is not a valid type name; it is a restricted identifier and not allowed as a type identifier in Java 16\n" +
 		"----------\n");
 }
 public void testBug564672_052() {
@@ -5940,7 +5955,7 @@
 		"2. ERROR in X.java (at line 7)\n" +
 		"	messages.stream().map(record::new).toArray(record[]::new);\n" +
 		"	                                           ^^^^^^^^\n" +
-		"\'record\' is not a valid type name; it is a restricted identifier and not allowed as a type identifier in Java "+ AbstractRegressionTest.PREVIEW_ALLOWED_LEVEL +"\n" +
+		"\'record\' is not a valid type name; it is a restricted identifier and not allowed as a type identifier in Java 16\n" +
 		"----------\n");
 }
 @SuppressWarnings({ "rawtypes", "unchecked" })
@@ -5981,7 +5996,7 @@
 		"1. ERROR in X.java (at line 1)\n" +
 		"	class X extends record {\n" +
 		"	                ^^^^^^\n" +
-		"\'record\' is not a valid type name; it is a restricted identifier and not allowed as a type identifier in Java "+ AbstractRegressionTest.PREVIEW_ALLOWED_LEVEL +"\n" +
+		"\'record\' is not a valid type name; it is a restricted identifier and not allowed as a type identifier in Java 16\n" +
 		"----------\n",
 		null,
 		true,
@@ -6026,7 +6041,7 @@
 		"1. ERROR in X.java (at line 1)\n" +
 		"	class X implements record {\n" +
 		"	                   ^^^^^^\n" +
-		"\'record\' is not a valid type name; it is a restricted identifier and not allowed as a type identifier in Java "+ AbstractRegressionTest.PREVIEW_ALLOWED_LEVEL +"\n" +
+		"\'record\' is not a valid type name; it is a restricted identifier and not allowed as a type identifier in Java 16\n" +
 		"----------\n",
 		null,
 		true,
@@ -6075,7 +6090,7 @@
 		"1. ERROR in X.java (at line 2)\n" +
 		"	class Y extends record {\n" +
 		"	                ^^^^^^\n" +
-		"\'record\' is not a valid type name; it is a restricted identifier and not allowed as a type identifier in Java "+ AbstractRegressionTest.PREVIEW_ALLOWED_LEVEL +"\n" +
+		"\'record\' is not a valid type name; it is a restricted identifier and not allowed as a type identifier in Java 16\n" +
 		"----------\n",
 		null,
 		true,
@@ -6124,7 +6139,7 @@
 		"1. ERROR in X.java (at line 2)\n" +
 		"	class Y implements record {\n" +
 		"	                   ^^^^^^\n" +
-		"\'record\' is not a valid type name; it is a restricted identifier and not allowed as a type identifier in Java "+ AbstractRegressionTest.PREVIEW_ALLOWED_LEVEL +"\n" +
+		"\'record\' is not a valid type name; it is a restricted identifier and not allowed as a type identifier in Java 16\n" +
 		"----------\n",
 		null,
 		true,
@@ -6173,7 +6188,7 @@
 		"1. ERROR in X.java (at line 1)\n" +
 		"	interface Y extends record {\n" +
 		"	                    ^^^^^^\n" +
-		"\'record\' is not a valid type name; it is a restricted identifier and not allowed as a type identifier in Java "+ AbstractRegressionTest.PREVIEW_ALLOWED_LEVEL +"\n" +
+		"\'record\' is not a valid type name; it is a restricted identifier and not allowed as a type identifier in Java 16\n" +
 		"----------\n",
 		null,
 		true,
@@ -6222,7 +6237,7 @@
 		"1. ERROR in X.java (at line 2)\n" +
 		"	interface Y extends record {\n" +
 		"	                    ^^^^^^\n" +
-		"\'record\' is not a valid type name; it is a restricted identifier and not allowed as a type identifier in Java "+ AbstractRegressionTest.PREVIEW_ALLOWED_LEVEL +"\n" +
+		"\'record\' is not a valid type name; it is a restricted identifier and not allowed as a type identifier in Java 16\n" +
 		"----------\n",
 		null,
 		true,
@@ -6270,7 +6285,7 @@
 		"1. ERROR in X.java (at line 2)\n" +
 		"	class Y extends record {\n" +
 		"	                ^^^^^^\n" +
-		"\'record\' is not a valid type name; it is a restricted identifier and not allowed as a type identifier in Java "+ AbstractRegressionTest.PREVIEW_ALLOWED_LEVEL +"\n" +
+		"\'record\' is not a valid type name; it is a restricted identifier and not allowed as a type identifier in Java 16\n" +
 		"----------\n",
 		null,
 		true,
@@ -6318,7 +6333,7 @@
 		"1. ERROR in X.java (at line 2)\n" +
 		"	class Y implements record {\n" +
 		"	                   ^^^^^^\n" +
-		"\'record\' is not a valid type name; it is a restricted identifier and not allowed as a type identifier in Java "+ AbstractRegressionTest.PREVIEW_ALLOWED_LEVEL +"\n" +
+		"\'record\' is not a valid type name; it is a restricted identifier and not allowed as a type identifier in Java 16\n" +
 		"----------\n",
 		null,
 		true,
@@ -6366,7 +6381,7 @@
 		"1. ERROR in X.java (at line 2)\n" +
 		"	interface Y extends record {\n" +
 		"	                    ^^^^^^\n" +
-		"\'record\' is not a valid type name; it is a restricted identifier and not allowed as a type identifier in Java "+ AbstractRegressionTest.PREVIEW_ALLOWED_LEVEL +"\n" +
+		"\'record\' is not a valid type name; it is a restricted identifier and not allowed as a type identifier in Java 16\n" +
 		"----------\n",
 		null,
 		true,
@@ -6951,7 +6966,7 @@
 		"2. ERROR in X.java (at line 7)\n" +
 		"	class record {}\n" +
 		"	      ^^^^^^\n" +
-		"\'record\' is not a valid type name; it is a restricted identifier and not allowed as a type identifier in Java "+ AbstractRegressionTest.PREVIEW_ALLOWED_LEVEL +"\n" +
+		"\'record\' is not a valid type name; it is a restricted identifier and not allowed as a type identifier in Java 16\n" +
 		"----------\n",
 		null,
 		true,
@@ -7254,8 +7269,8 @@
 	);
 }
 public void testBug565388_001() {
-	Map<String, String> options = getCompilerOptions();
-	options.put(CompilerOptions.OPTION_EnablePreviews, CompilerOptions.ENABLED);
+	if (this.complianceLevel < ClassFileConstants.JDK17) return;
+	Map<String, String> options = getCompilerOptionsWithPreview();
 	this.runNegativeTest(
 		new String[] {
 			"X.java",
@@ -7274,8 +7289,8 @@
 	options.put(CompilerOptions.OPTION_EnablePreviews, CompilerOptions.DISABLED);
 }
 public void testBug565388_002() {
-	Map<String, String> options = getCompilerOptions();
-	options.put(CompilerOptions.OPTION_EnablePreviews, CompilerOptions.ENABLED);
+	if (this.complianceLevel < ClassFileConstants.JDK17) return;
+	Map<String, String> options = getCompilerOptionsWithPreview();
 	this.runNegativeTest(
 		new String[] {
 			"X.java",
@@ -7736,8 +7751,8 @@
 		"private final int X$1Bar.x");
 	}
 public void testBug566063_001() {
-	Map<String, String> options = getCompilerOptions();
-	options.put(CompilerOptions.OPTION_EnablePreviews, CompilerOptions.ENABLED);
+	if (this.complianceLevel < ClassFileConstants.JDK17) return;
+	Map<String, String> options = getCompilerOptionsWithPreview();
 	runConformTest(
 			new String[] {
 				"X.java",
@@ -7763,8 +7778,8 @@
 		options.put(CompilerOptions.OPTION_EnablePreviews, CompilerOptions.DISABLED);
 }
 public void testBug566063_002() {
-	Map<String, String> options = getCompilerOptions();
-	options.put(CompilerOptions.OPTION_EnablePreviews, CompilerOptions.ENABLED);
+	if (this.complianceLevel < ClassFileConstants.JDK17) return;
+	Map<String, String> options = getCompilerOptionsWithPreview();
 	runNegativeTest(
 			new String[] {
 				"X.java",
@@ -7797,8 +7812,8 @@
 		options.put(CompilerOptions.OPTION_EnablePreviews, CompilerOptions.DISABLED);
 }
 public void testBug566063_003() {
-	Map<String, String> options = getCompilerOptions();
-	options.put(CompilerOptions.OPTION_EnablePreviews, CompilerOptions.ENABLED);
+	if (this.complianceLevel < ClassFileConstants.JDK17) return;
+	Map<String, String> options = getCompilerOptionsWithPreview();
 	runNegativeTest(
 			new String[] {
 				"X.java",
@@ -8019,8 +8034,8 @@
 		"----------\n");
 }
 public void testBug567731_001() {
-	Map<String, String> options = getCompilerOptions();
-	options.put(CompilerOptions.OPTION_EnablePreviews, CompilerOptions.ENABLED);
+	if (this.complianceLevel < ClassFileConstants.JDK17) return;
+	Map<String, String> options = getCompilerOptionsWithPreview();
 	this.runNegativeTest(
 		new String[] {
 			"X.java",
@@ -8049,8 +8064,8 @@
 	options.put(CompilerOptions.OPTION_EnablePreviews, CompilerOptions.DISABLED);
 }
 public void testBug567731_002() {
-	Map<String, String> options = getCompilerOptions();
-	options.put(CompilerOptions.OPTION_EnablePreviews, CompilerOptions.ENABLED);
+	if (this.complianceLevel < ClassFileConstants.JDK17) return;
+	Map<String, String> options = getCompilerOptionsWithPreview();
 	this.runNegativeTest(
 		new String[] {
 			"X.java",
diff --git a/org.eclipse.jdt.core.tests.compiler/src/org/eclipse/jdt/core/tests/compiler/regression/SealedTypesTests.java b/org.eclipse.jdt.core.tests.compiler/src/org/eclipse/jdt/core/tests/compiler/regression/SealedTypesTests.java
index 31d8dea..d6ce494 100644
--- a/org.eclipse.jdt.core.tests.compiler/src/org/eclipse/jdt/core/tests/compiler/regression/SealedTypesTests.java
+++ b/org.eclipse.jdt.core.tests.compiler/src/org/eclipse/jdt/core/tests/compiler/regression/SealedTypesTests.java
@@ -7,6 +7,10 @@
  *
  * SPDX-License-Identifier: EPL-2.0
  *
+ * This is an implementation of an early-draft specification developed under the Java
+ * Community Process (JCP) and is made available for testing and evaluation purposes
+ * only. The code is not compatible with any specification of the JCP.
+ *
  * Contributors:
  *     IBM Corporation - initial API and implementation
  *******************************************************************************/
@@ -38,7 +42,7 @@
 		return SealedTypesTests.class;
 	}
 	public static Test suite() {
-		return buildMinimalComplianceTestSuite(testClass(), F_16);
+		return buildMinimalComplianceTestSuite(testClass(), F_17);
 	}
 	public SealedTypesTests(String testName){
 		super(testName);
@@ -47,10 +51,9 @@
 	// Enables the tests to run individually
 	protected Map<String, String> getCompilerOptions() {
 		Map<String, String> defaultOptions = super.getCompilerOptions();
-		defaultOptions.put(CompilerOptions.OPTION_Compliance, CompilerOptions.VERSION_16); // FIXME
-		defaultOptions.put(CompilerOptions.OPTION_Source, CompilerOptions.VERSION_16);
-		defaultOptions.put(CompilerOptions.OPTION_TargetPlatform, CompilerOptions.VERSION_16);
-		defaultOptions.put(CompilerOptions.OPTION_EnablePreviews, CompilerOptions.ENABLED);
+		defaultOptions.put(CompilerOptions.OPTION_Compliance, CompilerOptions.VERSION_17);
+		defaultOptions.put(CompilerOptions.OPTION_Source, CompilerOptions.VERSION_17);
+		defaultOptions.put(CompilerOptions.OPTION_TargetPlatform, CompilerOptions.VERSION_17);
 		defaultOptions.put(CompilerOptions.OPTION_ReportPreviewFeatures, CompilerOptions.IGNORE);
 		defaultOptions.put(CompilerOptions.OPTION_Store_Annotations, CompilerOptions.ENABLED);
 		return defaultOptions;
@@ -68,12 +71,12 @@
 		runner.expectedOutputString = expectedOutput;
 		runner.vmArguments = new String[] {"--enable-preview"};
 		runner.customOptions = customOptions;
-		runner.javacTestOptions = JavacTestOptions.forReleaseWithPreview("16");
+		runner.javacTestOptions = JavacTestOptions.forReleaseWithPreview("17");
 		runner.runConformTest();
 	}
 	@Override
 	protected void runNegativeTest(String[] testFiles, String expectedCompilerLog) {
-		runNegativeTest(testFiles, expectedCompilerLog, JavacTestOptions.forReleaseWithPreview("16"));
+		runNegativeTest(testFiles, expectedCompilerLog, JavacTestOptions.forReleaseWithPreview("17"));
 	}
 	protected void runWarningTest(String[] testFiles, String expectedCompilerLog) {
 		runWarningTest(testFiles, expectedCompilerLog, null);
@@ -1378,7 +1381,7 @@
 					"public final class Z extends Y{}",
 				},
 				lib1Path,
-				JavaCore.VERSION_16,
+				JavaCore.VERSION_17,
 				true);
 		String[] libs = getDefaultClassPaths();
 		int len = libs.length;
@@ -1686,7 +1689,7 @@
 				"}",
 			},
 			"----------\n" +
-			"1. WARNING in X.java (at line 1)\n" +
+			"1. ERROR in X.java (at line 1)\n" +
 			"	class permits {\n" +
 			"	      ^^^^^^^\n" +
 			"\'permits\' is not a valid type name; it is a restricted identifier and not allowed as a type identifier in Java "+ AbstractRegressionTest.PREVIEW_ALLOWED_LEVEL +"\n" +
@@ -1742,7 +1745,7 @@
 			},
 			"----------\n" +
 			"----------\n" +
-			"1. WARNING in X.java (at line 2)\n" +
+			"1. ERROR in X.java (at line 2)\n" +
 			"	permits p;\n" +
 			"	^^^^^^^\n" +
 			"\'permits\' is not a valid type name; it is a restricted identifier and not allowed as a type identifier in Java "+ AbstractRegressionTest.PREVIEW_ALLOWED_LEVEL +"\n" +
@@ -1753,7 +1756,7 @@
 			"The method Zork() is undefined for the type X\n" +
 			"----------\n" +
 			"----------\n" +
-			"1. WARNING in permits.java (at line 1)\n" +
+			"1. ERROR in permits.java (at line 1)\n" +
 			"	public class permits {\n" +
 			"	             ^^^^^^^\n" +
 			"\'permits\' is not a valid type name; it is a restricted identifier and not allowed as a type identifier in Java "+ AbstractRegressionTest.PREVIEW_ALLOWED_LEVEL +"\n" +
@@ -1809,7 +1812,7 @@
 				"}",
 			},
 			"----------\n" +
-			"1. WARNING in X.java (at line 1)\n" +
+			"1. ERROR in X.java (at line 1)\n" +
 			"	class X<permits> {\n" +
 			"	        ^^^^^^^\n" +
 			"\'permits\' is not a valid type name; it is a restricted identifier and not allowed as a type identifier in Java "+ AbstractRegressionTest.PREVIEW_ALLOWED_LEVEL +"\n" +
@@ -1891,7 +1894,7 @@
 				"}",
 			},
 			"----------\n" +
-			"1. WARNING in X.java (at line 1)\n" +
+			"1. ERROR in X.java (at line 1)\n" +
 			"	class X extends permits {\n" +
 			"	                ^^^^^^^\n" +
 			"\'permits\' is not a valid type name; it is a restricted identifier and not allowed as a type identifier in Java "+ AbstractRegressionTest.PREVIEW_ALLOWED_LEVEL +"\n" +
@@ -1901,7 +1904,7 @@
 			"	^^^^\n" +
 			"The method Zork() is undefined for the type X\n" +
 			"----------\n" +
-			"3. WARNING in X.java (at line 6)\n" +
+			"3. ERROR in X.java (at line 6)\n" +
 			"	class permits {\n" +
 			"	      ^^^^^^^\n" +
 			"\'permits\' is not a valid type name; it is a restricted identifier and not allowed as a type identifier in Java "+ AbstractRegressionTest.PREVIEW_ALLOWED_LEVEL +"\n" +
@@ -1956,7 +1959,7 @@
 				"}",
 			},
 			"----------\n" +
-			"1. WARNING in X.java (at line 1)\n" +
+			"1. ERROR in X.java (at line 1)\n" +
 			"	class X implements permits {\n" +
 			"	                   ^^^^^^^\n" +
 			"\'permits\' is not a valid type name; it is a restricted identifier and not allowed as a type identifier in Java "+ AbstractRegressionTest.PREVIEW_ALLOWED_LEVEL +"\n" +
@@ -1966,7 +1969,7 @@
 			"	^^^^\n" +
 			"The method Zork() is undefined for the type X\n" +
 			"----------\n" +
-			"3. WARNING in X.java (at line 6)\n" +
+			"3. ERROR in X.java (at line 6)\n" +
 			"	interface permits {\n" +
 			"	          ^^^^^^^\n" +
 			"\'permits\' is not a valid type name; it is a restricted identifier and not allowed as a type identifier in Java "+ AbstractRegressionTest.PREVIEW_ALLOWED_LEVEL +"\n" +
@@ -2021,7 +2024,7 @@
 				"}",
 			},
 			"----------\n" +
-			"1. WARNING in X.java (at line 1)\n" +
+			"1. ERROR in X.java (at line 1)\n" +
 			"	interface X extends permits {\n" +
 			"	                    ^^^^^^^\n" +
 			"\'permits\' is not a valid type name; it is a restricted identifier and not allowed as a type identifier in Java "+ AbstractRegressionTest.PREVIEW_ALLOWED_LEVEL +"\n" +
@@ -2031,7 +2034,7 @@
 			"	^^^^\n" +
 			"The method Zork() is undefined for the type X\n" +
 			"----------\n" +
-			"3. WARNING in X.java (at line 6)\n" +
+			"3. ERROR in X.java (at line 6)\n" +
 			"	interface permits {\n" +
 			"	          ^^^^^^^\n" +
 			"\'permits\' is not a valid type name; it is a restricted identifier and not allowed as a type identifier in Java "+ AbstractRegressionTest.PREVIEW_ALLOWED_LEVEL +"\n" +
@@ -2084,16 +2087,11 @@
 				"}",
 			},
 			"----------\n" +
-			"1. WARNING in X.java (at line 2)\n" +
+			"1. ERROR in X.java (at line 2)\n" +
 			"	permits foo() {\n" +
 			"	^^^^^^^\n" +
 			"\'permits\' is not a valid type name; it is a restricted identifier and not allowed as a type identifier in Java "+ AbstractRegressionTest.PREVIEW_ALLOWED_LEVEL +"\n" +
 			"----------\n" +
-			"2. ERROR in X.java (at line 2)\n" +
-			"	permits foo() {\n" +
-			"	^^^^^^^\n" +
-			"permits cannot be resolved to a type\n" +
-			"----------\n" +
 			"3. ERROR in X.java (at line 3)\n" +
 			"	Zork();\n" +
 			"	^^^^\n" +
@@ -2140,16 +2138,11 @@
 				"}",
 			},
 			"----------\n" +
-			"1. WARNING in X.java (at line 2)\n" +
+			"1. ERROR in X.java (at line 2)\n" +
 			"	void foo() throws permits{\n" +
 			"	                  ^^^^^^^\n" +
 			"\'permits\' is not a valid type name; it is a restricted identifier and not allowed as a type identifier in Java "+ AbstractRegressionTest.PREVIEW_ALLOWED_LEVEL +"\n" +
 			"----------\n" +
-			"2. ERROR in X.java (at line 2)\n" +
-			"	void foo() throws permits{\n" +
-			"	                  ^^^^^^^\n" +
-			"permits cannot be resolved to a type\n" +
-			"----------\n" +
 			"3. ERROR in X.java (at line 3)\n" +
 			"	Zork();\n" +
 			"	^^^^\n" +
@@ -2211,16 +2204,11 @@
 				"}",
 			},
 			"----------\n" +
-			"1. WARNING in X.java (at line 1)\n" +
+			"1. ERROR in X.java (at line 1)\n" +
 			"	class X <T extends permits>{\n" +
 			"	                   ^^^^^^^\n" +
 			"\'permits\' is not a valid type name; it is a restricted identifier and not allowed as a type identifier in Java "+ AbstractRegressionTest.PREVIEW_ALLOWED_LEVEL +"\n" +
 			"----------\n" +
-			"2. ERROR in X.java (at line 1)\n" +
-			"	class X <T extends permits>{\n" +
-			"	                   ^^^^^^^\n" +
-			"permits cannot be resolved to a type\n" +
-			"----------\n" +
 			"3. ERROR in X.java (at line 1)\n" +
 			"	class X <T extends permits>{\n" +
 			"	                           ^\n" +
@@ -2286,16 +2274,11 @@
 				"}",
 			},
 			"----------\n" +
-			"1. WARNING in X.java (at line 3)\n" +
+			"1. ERROR in X.java (at line 3)\n" +
 			"	private final permits p;\n" +
 			"	              ^^^^^^^\n" +
 			"\'permits\' is not a valid type name; it is a restricted identifier and not allowed as a type identifier in Java "+ AbstractRegressionTest.PREVIEW_ALLOWED_LEVEL +"\n" +
 			"----------\n" +
-			"2. ERROR in X.java (at line 3)\n" +
-			"	private final permits p;\n" +
-			"	              ^^^^^^^\n" +
-			"permits cannot be resolved to a type\n" +
-			"----------\n" +
 			"3. ERROR in X.java (at line 5)\n" +
 			"	Zork();\n" +
 			"	^^^^\n" +
@@ -2355,16 +2338,11 @@
 			"	      ^^^^^^^^^^^^^\n" +
 			"This lambda expression refers to the missing type permits\n" +
 			"----------\n" +
-			"2. WARNING in X.java (at line 3)\n" +
+			"2. ERROR in X.java (at line 3)\n" +
 			"	I i = (permits p)-> {};\n" +
 			"	       ^^^^^^^\n" +
 			"\'permits\' is not a valid type name; it is a restricted identifier and not allowed as a type identifier in Java "+ AbstractRegressionTest.PREVIEW_ALLOWED_LEVEL +"\n" +
 			"----------\n" +
-			"3. ERROR in X.java (at line 3)\n" +
-			"	I i = (permits p)-> {};\n" +
-			"	       ^^^^^^^\n" +
-			"permits cannot be resolved to a type\n" +
-			"----------\n" +
 			"4. ERROR in X.java (at line 4)\n" +
 			"	Zork();\n" +
 			"	^^^^\n" +
@@ -2402,15 +2380,10 @@
 				"}",
 			},
 			"----------\n" +
-			"1. WARNING in X.java (at line 2)\n" +
+			"1. ERROR in X.java (at line 2)\n" +
 			"	public void foo(permits this) {}\n" +
 			"	                ^^^^^^^\n" +
 			"\'permits\' is not a valid type name; it is a restricted identifier and not allowed as a type identifier in Java "+ AbstractRegressionTest.PREVIEW_ALLOWED_LEVEL +"\n" +
-			"----------\n" +
-			"2. ERROR in X.java (at line 2)\n" +
-			"	public void foo(permits this) {}\n" +
-			"	                ^^^^^^^\n" +
-			"permits cannot be resolved to a type\n" +
 			"----------\n",
 			null,
 			true,
@@ -2444,15 +2417,10 @@
 				"}",
 			},
 			"----------\n" +
-			"1. WARNING in X.java (at line 2)\n" +
+			"1. ERROR in X.java (at line 2)\n" +
 			"	public void foo(permits this) {}\n" +
 			"	                ^^^^^^^\n" +
 			"\'permits\' is not a valid type name; it is a restricted identifier and not allowed as a type identifier in Java "+ AbstractRegressionTest.PREVIEW_ALLOWED_LEVEL +"\n" +
-			"----------\n" +
-			"2. ERROR in X.java (at line 2)\n" +
-			"	public void foo(permits this) {}\n" +
-			"	                ^^^^^^^\n" +
-			"permits cannot be resolved to a type\n" +
 			"----------\n",
 			null,
 			true,
@@ -2495,12 +2463,12 @@
 				"}",
 			},
 			"----------\n" +
-			"1. WARNING in X.java (at line 2)\n" +
+			"1. ERROR in X.java (at line 2)\n" +
 			"	class permits {\n" +
 			"	      ^^^^^^^\n" +
 			"\'permits\' is not a valid type name; it is a restricted identifier and not allowed as a type identifier in Java "+ AbstractRegressionTest.PREVIEW_ALLOWED_LEVEL +"\n" +
 			"----------\n" +
-			"2. WARNING in X.java (at line 3)\n" +
+			"2. ERROR in X.java (at line 3)\n" +
 			"	public void foo(permits this) {}\n" +
 			"	                ^^^^^^^\n" +
 			"\'permits\' is not a valid type name; it is a restricted identifier and not allowed as a type identifier in Java "+ AbstractRegressionTest.PREVIEW_ALLOWED_LEVEL +"\n" +
@@ -2548,16 +2516,11 @@
 				"}",
 			},
 			"----------\n" +
-			"1. WARNING in X.java (at line 3)\n" +
+			"1. ERROR in X.java (at line 3)\n" +
 			"	permits p;\n" +
 			"	^^^^^^^\n" +
 			"\'permits\' is not a valid type name; it is a restricted identifier and not allowed as a type identifier in Java "+ AbstractRegressionTest.PREVIEW_ALLOWED_LEVEL +"\n" +
 			"----------\n" +
-			"2. ERROR in X.java (at line 3)\n" +
-			"	permits p;\n" +
-			"	^^^^^^^\n" +
-			"permits cannot be resolved to a type\n" +
-			"----------\n" +
 			"3. ERROR in X.java (at line 4)\n" +
 			"	Zork();\n" +
 			"	^^^^\n" +
@@ -2610,16 +2573,11 @@
 				"}",
 			},
 			"----------\n" +
-			"1. WARNING in X.java (at line 3)\n" +
+			"1. ERROR in X.java (at line 3)\n" +
 			"	for (permits i = 0; i < 10; ++i) {} \n" +
 			"	     ^^^^^^^\n" +
 			"\'permits\' is not a valid type name; it is a restricted identifier and not allowed as a type identifier in Java "+ AbstractRegressionTest.PREVIEW_ALLOWED_LEVEL +"\n" +
 			"----------\n" +
-			"2. ERROR in X.java (at line 3)\n" +
-			"	for (permits i = 0; i < 10; ++i) {} \n" +
-			"	     ^^^^^^^\n" +
-			"permits cannot be resolved to a type\n" +
-			"----------\n" +
 			"3. ERROR in X.java (at line 6)\n" +
 			"	Zork();\n" +
 			"	^^^^\n" +
@@ -2666,25 +2624,15 @@
 				"}",
 			},
 			"----------\n" +
-			"1. WARNING in X.java (at line 2)\n" +
+			"1. ERROR in X.java (at line 2)\n" +
 			"	public static void main(permits[] args) {\n" +
 			"	                        ^^^^^^^^^\n" +
 			"\'permits\' is not a valid type name; it is a restricted identifier and not allowed as a type identifier in Java "+ AbstractRegressionTest.PREVIEW_ALLOWED_LEVEL +"\n" +
 			"----------\n" +
-			"2. ERROR in X.java (at line 2)\n" +
-			"	public static void main(permits[] args) {\n" +
-			"	                        ^^^^^^^\n" +
-			"permits cannot be resolved to a type\n" +
-			"----------\n" +
-			"3. WARNING in X.java (at line 3)\n" +
+			"3. ERROR in X.java (at line 3)\n" +
 			"	for (permits p : args) {} \n" +
 			"	     ^^^^^^^\n" +
 			"\'permits\' is not a valid type name; it is a restricted identifier and not allowed as a type identifier in Java "+ AbstractRegressionTest.PREVIEW_ALLOWED_LEVEL +"\n" +
-			"----------\n" +
-			"4. ERROR in X.java (at line 3)\n" +
-			"	for (permits p : args) {} \n" +
-			"	     ^^^^^^^\n" +
-			"permits cannot be resolved to a type\n" +
 			"----------\n",
 			null,
 			true,
@@ -2742,15 +2690,10 @@
 				"}\n",
 			},
 			"----------\n" +
-			"1. WARNING in X.java (at line 3)\n" +
+			"1. ERROR in X.java (at line 3)\n" +
 			"	try (permits y = new Y()) {\n" +
 			"	     ^^^^^^^\n" +
 			"\'permits\' is not a valid type name; it is a restricted identifier and not allowed as a type identifier in Java "+ AbstractRegressionTest.PREVIEW_ALLOWED_LEVEL +"\n" +
-			"----------\n" +
-			"2. ERROR in X.java (at line 3)\n" +
-			"	try (permits y = new Y()) {\n" +
-			"	     ^^^^^^^\n" +
-			"permits cannot be resolved to a type\n" +
 			"----------\n",
 			null,
 			true,
@@ -2808,15 +2751,10 @@
 				"}\n",
 			},
 			"----------\n" +
-			"1. WARNING in X.java (at line 5)\n" +
+			"1. ERROR in X.java (at line 5)\n" +
 			"	} catch (permits e) {\n" +
 			"	         ^^^^^^^\n" +
 			"\'permits\' is not a valid type name; it is a restricted identifier and not allowed as a type identifier in Java "+ AbstractRegressionTest.PREVIEW_ALLOWED_LEVEL +"\n" +
-			"----------\n" +
-			"2. ERROR in X.java (at line 5)\n" +
-			"	} catch (permits e) {\n" +
-			"	         ^^^^^^^\n" +
-			"permits cannot be resolved to a type\n" +
 			"----------\n",
 			null,
 			true,
@@ -2858,15 +2796,10 @@
 			"	^\n" +
 			"permits cannot be resolved to a type\n" +
 			"----------\n" +
-			"2. WARNING in X.java (at line 1)\n" +
+			"2. ERROR in X.java (at line 1)\n" +
 			"	record X(permits p) {\n" +
 			"	         ^^^^^^^\n" +
-			"\'permits\' is not a valid type name; it is a restricted identifier and not allowed as a type identifier in Java 16\n" +
-			"----------\n" +
-			"3. ERROR in X.java (at line 1)\n" +
-			"	record X(permits p) {\n" +
-			"	         ^^^^^^^\n" +
-			"permits cannot be resolved to a type\n" +
+			"\'permits\' is not a valid type name; it is a restricted identifier and not allowed as a type identifier in Java 17\n" +
 			"----------\n",
 			null,
 			true,
@@ -2913,16 +2846,11 @@
 				"}\n",
 			},
 			"----------\n" +
-			"1. WARNING in X.java (at line 5)\n" +
+			"1. ERROR in X.java (at line 5)\n" +
 			"	<permits>this(t);\n" +
 			"	 ^^^^^^^\n" +
 			"\'permits\' is not a valid type name; it is a restricted identifier and not allowed as a type identifier in Java "+ AbstractRegressionTest.PREVIEW_ALLOWED_LEVEL +"\n" +
 			"----------\n" +
-			"2. ERROR in X.java (at line 5)\n" +
-			"	<permits>this(t);\n" +
-			"	 ^^^^^^^\n" +
-			"permits cannot be resolved to a type\n" +
-			"----------\n" +
 			"3. ERROR in X.java (at line 5)\n" +
 			"	<permits>this(t);\n" +
 			"	         ^^^^^^^^\n" +
@@ -2980,15 +2908,10 @@
 			"	^^^^^^^^^^^^^^^^^\n" +
 			"The parameterized constructor <permits>X(permits) of type X is not applicable for the arguments (Integer)\n" +
 			"----------\n" +
-			"2. WARNING in X.java (at line 5)\n" +
+			"2. ERROR in X.java (at line 5)\n" +
 			"	new <permits>X(t).foo();\n" +
 			"	     ^^^^^^^\n" +
 			"\'permits\' is not a valid type name; it is a restricted identifier and not allowed as a type identifier in Java "+ AbstractRegressionTest.PREVIEW_ALLOWED_LEVEL +"\n" +
-			"----------\n" +
-			"3. ERROR in X.java (at line 5)\n" +
-			"	new <permits>X(t).foo();\n" +
-			"	     ^^^^^^^\n" +
-			"permits cannot be resolved to a type\n" +
 			"----------\n",
 			null,
 			true,
@@ -3037,16 +2960,11 @@
 				"}\n",
 			},
 			"----------\n" +
-			"1. WARNING in X.java (at line 6)\n" +
+			"1. ERROR in X.java (at line 6)\n" +
 			"	x.<permits>foo(0);\n" +
 			"	   ^^^^^^^\n" +
 			"\'permits\' is not a valid type name; it is a restricted identifier and not allowed as a type identifier in Java "+ AbstractRegressionTest.PREVIEW_ALLOWED_LEVEL +"\n" +
 			"----------\n" +
-			"2. ERROR in X.java (at line 6)\n" +
-			"	x.<permits>foo(0);\n" +
-			"	   ^^^^^^^\n" +
-			"permits cannot be resolved to a type\n" +
-			"----------\n" +
 			"3. ERROR in X.java (at line 6)\n" +
 			"	x.<permits>foo(0);\n" +
 			"	           ^^^\n" +
@@ -3092,15 +3010,10 @@
 				"}\n",
 			},
 			"----------\n" +
-			"1. WARNING in X.java (at line 5)\n" +
+			"1. ERROR in X.java (at line 5)\n" +
 			"	X x = new permits();\n" +
 			"	          ^^^^^^^\n" +
 			"\'permits\' is not a valid type name; it is a restricted identifier and not allowed as a type identifier in Java "+ AbstractRegressionTest.PREVIEW_ALLOWED_LEVEL +"\n" +
-			"----------\n" +
-			"2. ERROR in X.java (at line 5)\n" +
-			"	X x = new permits();\n" +
-			"	          ^^^^^^^\n" +
-			"permits cannot be resolved to a type\n" +
 			"----------\n",
 			null,
 			true,
@@ -3157,7 +3070,7 @@
 				"}\n",
 			},
 			"----------\n" +
-			"1. WARNING in X.java (at line 3)\n" +
+			"1. ERROR in X.java (at line 3)\n" +
 			"	new permits() {\n" +
 			"	    ^^^^^^^\n" +
 			"\'permits\' is not a valid type name; it is a restricted identifier and not allowed as a type identifier in Java "+ AbstractRegressionTest.PREVIEW_ALLOWED_LEVEL +"\n" +
@@ -3167,7 +3080,7 @@
 			"	^^^^\n" +
 			"The method Zork() is undefined for the type new permits(){}\n" +
 			"----------\n" +
-			"3. WARNING in X.java (at line 11)\n" +
+			"3. ERROR in X.java (at line 11)\n" +
 			"	abstract class permits {\n" +
 			"	               ^^^^^^^\n" +
 			"\'permits\' is not a valid type name; it is a restricted identifier and not allowed as a type identifier in Java "+ AbstractRegressionTest.PREVIEW_ALLOWED_LEVEL +"\n" +
@@ -3208,15 +3121,10 @@
 				"}",
 			},
 			"----------\n" +
-			"1. WARNING in X.java (at line 3)\n" +
+			"1. ERROR in X.java (at line 3)\n" +
 			"	Object[] p = new permits[10];\n" +
 			"	                 ^^^^^^^\n" +
 			"\'permits\' is not a valid type name; it is a restricted identifier and not allowed as a type identifier in Java "+ AbstractRegressionTest.PREVIEW_ALLOWED_LEVEL +"\n" +
-			"----------\n" +
-			"2. ERROR in X.java (at line 3)\n" +
-			"	Object[] p = new permits[10];\n" +
-			"	                 ^^^^^^^\n" +
-			"permits cannot be resolved to a type\n" +
 			"----------\n",
 			null,
 			true,
@@ -3271,25 +3179,15 @@
 			"	        ^^^\n" +
 			"The method foo(permits) from the type X refers to the missing type permits\n" +
 			"----------\n" +
-			"2. WARNING in X.java (at line 3)\n" +
+			"2. ERROR in X.java (at line 3)\n" +
 			"	new X().foo((permits) null);\n" +
 			"	             ^^^^^^^\n" +
 			"\'permits\' is not a valid type name; it is a restricted identifier and not allowed as a type identifier in Java "+ AbstractRegressionTest.PREVIEW_ALLOWED_LEVEL +"\n" +
 			"----------\n" +
-			"3. ERROR in X.java (at line 3)\n" +
-			"	new X().foo((permits) null);\n" +
-			"	             ^^^^^^^\n" +
-			"permits cannot be resolved to a type\n" +
-			"----------\n" +
-			"4. WARNING in X.java (at line 5)\n" +
+			"4. ERROR in X.java (at line 5)\n" +
 			"	private void foo(permits o) {}\n" +
 			"	                 ^^^^^^^\n" +
 			"\'permits\' is not a valid type name; it is a restricted identifier and not allowed as a type identifier in Java "+ AbstractRegressionTest.PREVIEW_ALLOWED_LEVEL +"\n" +
-			"----------\n" +
-			"5. ERROR in X.java (at line 5)\n" +
-			"	private void foo(permits o) {}\n" +
-			"	                 ^^^^^^^\n" +
-			"permits cannot be resolved to a type\n" +
 			"----------\n",
 			null,
 			true,
@@ -3327,15 +3225,10 @@
 				"}",
 			},
 			"----------\n" +
-			"1. WARNING in X.java (at line 3)\n" +
+			"1. ERROR in X.java (at line 3)\n" +
 			"	if (o instanceof permits) {}\n" +
 			"	                 ^^^^^^^\n" +
 			"\'permits\' is not a valid type name; it is a restricted identifier and not allowed as a type identifier in Java "+ AbstractRegressionTest.PREVIEW_ALLOWED_LEVEL +"\n" +
-			"----------\n" +
-			"2. ERROR in X.java (at line 3)\n" +
-			"	if (o instanceof permits) {}\n" +
-			"	                 ^^^^^^^\n" +
-			"permits cannot be resolved to a type\n" +
 			"----------\n",
 			null,
 			true,
@@ -3395,7 +3288,7 @@
 			"	^^^^\n" +
 			"The method Zork() is undefined for the type X\n" +
 			"----------\n" +
-			"2. WARNING in X.java (at line 8)\n" +
+			"2. ERROR in X.java (at line 8)\n" +
 			"	class permits{}\n" +
 			"	      ^^^^^^^\n" +
 			"\'permits\' is not a valid type name; it is a restricted identifier and not allowed as a type identifier in Java "+ AbstractRegressionTest.PREVIEW_ALLOWED_LEVEL +"\n" +
@@ -3419,7 +3312,7 @@
 				"}",
 			},
 			"----------\n" +
-			"1. WARNING in X.java (at line 1)\n" +
+			"1. ERROR in X.java (at line 1)\n" +
 			"	class sealed {\n" +
 			"	      ^^^^^^\n" +
 			"\'sealed\' is not a valid type name; it is a restricted identifier and not allowed as a type identifier in Java "+ AbstractRegressionTest.PREVIEW_ALLOWED_LEVEL +"\n" +
@@ -3475,7 +3368,7 @@
 			},
 			"----------\n" +
 			"----------\n" +
-			"1. WARNING in X.java (at line 2)\n" +
+			"1. ERROR in X.java (at line 2)\n" +
 			"	sealed p;\n" +
 			"	^^^^^^\n" +
 			"\'sealed\' is not a valid type name; it is a restricted identifier and not allowed as a type identifier in Java "+ AbstractRegressionTest.PREVIEW_ALLOWED_LEVEL +"\n" +
@@ -3486,7 +3379,7 @@
 			"The method Zork() is undefined for the type X\n" +
 			"----------\n" +
 			"----------\n" +
-			"1. WARNING in sealed.java (at line 1)\n" +
+			"1. ERROR in sealed.java (at line 1)\n" +
 			"	public class sealed {\n" +
 			"	             ^^^^^^\n" +
 			"\'sealed\' is not a valid type name; it is a restricted identifier and not allowed as a type identifier in Java "+ AbstractRegressionTest.PREVIEW_ALLOWED_LEVEL +"\n" +
@@ -3542,7 +3435,7 @@
 				"}",
 			},
 			"----------\n" +
-			"1. WARNING in X.java (at line 1)\n" +
+			"1. ERROR in X.java (at line 1)\n" +
 			"	class X<sealed> {\n" +
 			"	        ^^^^^^\n" +
 			"\'sealed\' is not a valid type name; it is a restricted identifier and not allowed as a type identifier in Java "+ AbstractRegressionTest.PREVIEW_ALLOWED_LEVEL +"\n" +
@@ -3624,7 +3517,7 @@
 				"}",
 			},
 			"----------\n" +
-			"1. WARNING in X.java (at line 1)\n" +
+			"1. ERROR in X.java (at line 1)\n" +
 			"	class X extends sealed {\n" +
 			"	                ^^^^^^\n" +
 			"\'sealed\' is not a valid type name; it is a restricted identifier and not allowed as a type identifier in Java "+ AbstractRegressionTest.PREVIEW_ALLOWED_LEVEL +"\n" +
@@ -3634,7 +3527,7 @@
 			"	^^^^\n" +
 			"The method Zork() is undefined for the type X\n" +
 			"----------\n" +
-			"3. WARNING in X.java (at line 6)\n" +
+			"3. ERROR in X.java (at line 6)\n" +
 			"	class sealed {\n" +
 			"	      ^^^^^^\n" +
 			"\'sealed\' is not a valid type name; it is a restricted identifier and not allowed as a type identifier in Java "+ AbstractRegressionTest.PREVIEW_ALLOWED_LEVEL +"\n" +
@@ -3689,7 +3582,7 @@
 				"}",
 			},
 			"----------\n" +
-			"1. WARNING in X.java (at line 1)\n" +
+			"1. ERROR in X.java (at line 1)\n" +
 			"	class X implements sealed {\n" +
 			"	                   ^^^^^^\n" +
 			"\'sealed\' is not a valid type name; it is a restricted identifier and not allowed as a type identifier in Java "+ AbstractRegressionTest.PREVIEW_ALLOWED_LEVEL +"\n" +
@@ -3699,7 +3592,7 @@
 			"	^^^^\n" +
 			"The method Zork() is undefined for the type X\n" +
 			"----------\n" +
-			"3. WARNING in X.java (at line 6)\n" +
+			"3. ERROR in X.java (at line 6)\n" +
 			"	interface sealed {\n" +
 			"	          ^^^^^^\n" +
 			"\'sealed\' is not a valid type name; it is a restricted identifier and not allowed as a type identifier in Java "+ AbstractRegressionTest.PREVIEW_ALLOWED_LEVEL +"\n" +
@@ -3754,7 +3647,7 @@
 				"}",
 			},
 			"----------\n" +
-			"1. WARNING in X.java (at line 1)\n" +
+			"1. ERROR in X.java (at line 1)\n" +
 			"	interface X extends sealed {\n" +
 			"	                    ^^^^^^\n" +
 			"\'sealed\' is not a valid type name; it is a restricted identifier and not allowed as a type identifier in Java "+ AbstractRegressionTest.PREVIEW_ALLOWED_LEVEL +"\n" +
@@ -3764,7 +3657,7 @@
 			"	^^^^\n" +
 			"The method Zork() is undefined for the type X\n" +
 			"----------\n" +
-			"3. WARNING in X.java (at line 6)\n" +
+			"3. ERROR in X.java (at line 6)\n" +
 			"	interface sealed {\n" +
 			"	          ^^^^^^\n" +
 			"\'sealed\' is not a valid type name; it is a restricted identifier and not allowed as a type identifier in Java "+ AbstractRegressionTest.PREVIEW_ALLOWED_LEVEL +"\n" +
@@ -3817,16 +3710,11 @@
 				"}",
 			},
 			"----------\n" +
-			"1. WARNING in X.java (at line 2)\n" +
+			"1. ERROR in X.java (at line 2)\n" +
 			"	sealed foo() {\n" +
 			"	^^^^^^\n" +
 			"\'sealed\' is not a valid type name; it is a restricted identifier and not allowed as a type identifier in Java "+ AbstractRegressionTest.PREVIEW_ALLOWED_LEVEL +"\n" +
 			"----------\n" +
-			"2. ERROR in X.java (at line 2)\n" +
-			"	sealed foo() {\n" +
-			"	^^^^^^\n" +
-			"sealed cannot be resolved to a type\n" +
-			"----------\n" +
 			"3. ERROR in X.java (at line 3)\n" +
 			"	Zork();\n" +
 			"	^^^^\n" +
@@ -3873,16 +3761,11 @@
 				"}",
 			},
 			"----------\n" +
-			"1. WARNING in X.java (at line 2)\n" +
+			"1. ERROR in X.java (at line 2)\n" +
 			"	void foo() throws sealed{\n" +
 			"	                  ^^^^^^\n" +
 			"\'sealed\' is not a valid type name; it is a restricted identifier and not allowed as a type identifier in Java "+ AbstractRegressionTest.PREVIEW_ALLOWED_LEVEL +"\n" +
 			"----------\n" +
-			"2. ERROR in X.java (at line 2)\n" +
-			"	void foo() throws sealed{\n" +
-			"	                  ^^^^^^\n" +
-			"sealed cannot be resolved to a type\n" +
-			"----------\n" +
 			"3. ERROR in X.java (at line 3)\n" +
 			"	Zork();\n" +
 			"	^^^^\n" +
@@ -3944,16 +3827,11 @@
 				"}",
 			},
 			"----------\n" +
-			"1. WARNING in X.java (at line 1)\n" +
+			"1. ERROR in X.java (at line 1)\n" +
 			"	class X <T extends sealed>{\n" +
 			"	                   ^^^^^^\n" +
 			"\'sealed\' is not a valid type name; it is a restricted identifier and not allowed as a type identifier in Java "+ AbstractRegressionTest.PREVIEW_ALLOWED_LEVEL +"\n" +
 			"----------\n" +
-			"2. ERROR in X.java (at line 1)\n" +
-			"	class X <T extends sealed>{\n" +
-			"	                   ^^^^^^\n" +
-			"sealed cannot be resolved to a type\n" +
-			"----------\n" +
 			"3. ERROR in X.java (at line 1)\n" +
 			"	class X <T extends sealed>{\n" +
 			"	                          ^\n" +
@@ -4019,16 +3897,11 @@
 				"}",
 			},
 			"----------\n" +
-			"1. WARNING in X.java (at line 3)\n" +
+			"1. ERROR in X.java (at line 3)\n" +
 			"	private final sealed p;\n" +
 			"	              ^^^^^^\n" +
 			"\'sealed\' is not a valid type name; it is a restricted identifier and not allowed as a type identifier in Java "+ AbstractRegressionTest.PREVIEW_ALLOWED_LEVEL +"\n" +
 			"----------\n" +
-			"2. ERROR in X.java (at line 3)\n" +
-			"	private final sealed p;\n" +
-			"	              ^^^^^^\n" +
-			"sealed cannot be resolved to a type\n" +
-			"----------\n" +
 			"3. ERROR in X.java (at line 5)\n" +
 			"	Zork();\n" +
 			"	^^^^\n" +
@@ -4088,16 +3961,11 @@
 			"	      ^^^^^^^^^^^^\n" +
 			"This lambda expression refers to the missing type sealed\n" +
 			"----------\n" +
-			"2. WARNING in X.java (at line 3)\n" +
+			"2. ERROR in X.java (at line 3)\n" +
 			"	I i = (sealed p)-> {};\n" +
 			"	       ^^^^^^\n" +
 			"\'sealed\' is not a valid type name; it is a restricted identifier and not allowed as a type identifier in Java "+ AbstractRegressionTest.PREVIEW_ALLOWED_LEVEL +"\n" +
 			"----------\n" +
-			"3. ERROR in X.java (at line 3)\n" +
-			"	I i = (sealed p)-> {};\n" +
-			"	       ^^^^^^\n" +
-			"sealed cannot be resolved to a type\n" +
-			"----------\n" +
 			"4. ERROR in X.java (at line 4)\n" +
 			"	Zork();\n" +
 			"	^^^^\n" +
@@ -4135,15 +4003,10 @@
 				"}",
 			},
 			"----------\n" +
-			"1. WARNING in X.java (at line 2)\n" +
+			"1. ERROR in X.java (at line 2)\n" +
 			"	public void foo(sealed this) {}\n" +
 			"	                ^^^^^^\n" +
 			"\'sealed\' is not a valid type name; it is a restricted identifier and not allowed as a type identifier in Java "+ AbstractRegressionTest.PREVIEW_ALLOWED_LEVEL +"\n" +
-			"----------\n" +
-			"2. ERROR in X.java (at line 2)\n" +
-			"	public void foo(sealed this) {}\n" +
-			"	                ^^^^^^\n" +
-			"sealed cannot be resolved to a type\n" +
 			"----------\n",
 			null,
 			true,
@@ -4177,15 +4040,10 @@
 				"}",
 			},
 			"----------\n" +
-			"1. WARNING in X.java (at line 2)\n" +
+			"1. ERROR in X.java (at line 2)\n" +
 			"	public void foo(sealed this) {}\n" +
 			"	                ^^^^^^\n" +
 			"\'sealed\' is not a valid type name; it is a restricted identifier and not allowed as a type identifier in Java "+ AbstractRegressionTest.PREVIEW_ALLOWED_LEVEL +"\n" +
-			"----------\n" +
-			"2. ERROR in X.java (at line 2)\n" +
-			"	public void foo(sealed this) {}\n" +
-			"	                ^^^^^^\n" +
-			"sealed cannot be resolved to a type\n" +
 			"----------\n",
 			null,
 			true,
@@ -4228,12 +4086,12 @@
 				"}",
 			},
 			"----------\n" +
-			"1. WARNING in X.java (at line 2)\n" +
+			"1. ERROR in X.java (at line 2)\n" +
 			"	class sealed {\n" +
 			"	      ^^^^^^\n" +
 			"\'sealed\' is not a valid type name; it is a restricted identifier and not allowed as a type identifier in Java "+ AbstractRegressionTest.PREVIEW_ALLOWED_LEVEL +"\n" +
 			"----------\n" +
-			"2. WARNING in X.java (at line 3)\n" +
+			"2. ERROR in X.java (at line 3)\n" +
 			"	public void foo(sealed this) {}\n" +
 			"	                ^^^^^^\n" +
 			"\'sealed\' is not a valid type name; it is a restricted identifier and not allowed as a type identifier in Java "+ AbstractRegressionTest.PREVIEW_ALLOWED_LEVEL +"\n" +
@@ -4281,16 +4139,11 @@
 				"}",
 			},
 			"----------\n" +
-			"1. WARNING in X.java (at line 3)\n" +
+			"1. ERROR in X.java (at line 3)\n" +
 			"	sealed p;\n" +
 			"	^^^^^^\n" +
 			"\'sealed\' is not a valid type name; it is a restricted identifier and not allowed as a type identifier in Java "+ AbstractRegressionTest.PREVIEW_ALLOWED_LEVEL +"\n" +
 			"----------\n" +
-			"2. ERROR in X.java (at line 3)\n" +
-			"	sealed p;\n" +
-			"	^^^^^^\n" +
-			"sealed cannot be resolved to a type\n" +
-			"----------\n" +
 			"3. ERROR in X.java (at line 4)\n" +
 			"	Zork();\n" +
 			"	^^^^\n" +
@@ -4343,16 +4196,11 @@
 				"}",
 			},
 			"----------\n" +
-			"1. WARNING in X.java (at line 3)\n" +
+			"1. ERROR in X.java (at line 3)\n" +
 			"	for (sealed i = 0; i < 10; ++i) {} \n" +
 			"	     ^^^^^^\n" +
 			"\'sealed\' is not a valid type name; it is a restricted identifier and not allowed as a type identifier in Java "+ AbstractRegressionTest.PREVIEW_ALLOWED_LEVEL +"\n" +
 			"----------\n" +
-			"2. ERROR in X.java (at line 3)\n" +
-			"	for (sealed i = 0; i < 10; ++i) {} \n" +
-			"	     ^^^^^^\n" +
-			"sealed cannot be resolved to a type\n" +
-			"----------\n" +
 			"3. ERROR in X.java (at line 6)\n" +
 			"	Zork();\n" +
 			"	^^^^\n" +
@@ -4399,25 +4247,15 @@
 				"}",
 			},
 			"----------\n" +
-			"1. WARNING in X.java (at line 2)\n" +
+			"1. ERROR in X.java (at line 2)\n" +
 			"	public static void main(sealed[] args) {\n" +
 			"	                        ^^^^^^^^\n" +
 			"\'sealed\' is not a valid type name; it is a restricted identifier and not allowed as a type identifier in Java "+ AbstractRegressionTest.PREVIEW_ALLOWED_LEVEL +"\n" +
 			"----------\n" +
-			"2. ERROR in X.java (at line 2)\n" +
-			"	public static void main(sealed[] args) {\n" +
-			"	                        ^^^^^^\n" +
-			"sealed cannot be resolved to a type\n" +
-			"----------\n" +
-			"3. WARNING in X.java (at line 3)\n" +
+			"3. ERROR in X.java (at line 3)\n" +
 			"	for (sealed p : args) {} \n" +
 			"	     ^^^^^^\n" +
 			"\'sealed\' is not a valid type name; it is a restricted identifier and not allowed as a type identifier in Java "+ AbstractRegressionTest.PREVIEW_ALLOWED_LEVEL +"\n" +
-			"----------\n" +
-			"4. ERROR in X.java (at line 3)\n" +
-			"	for (sealed p : args) {} \n" +
-			"	     ^^^^^^\n" +
-			"sealed cannot be resolved to a type\n" +
 			"----------\n",
 			null,
 			true,
@@ -4475,15 +4313,10 @@
 				"}\n",
 			},
 			"----------\n" +
-			"1. WARNING in X.java (at line 3)\n" +
+			"1. ERROR in X.java (at line 3)\n" +
 			"	try (sealed y = new Y()) {\n" +
 			"	     ^^^^^^\n" +
 			"\'sealed\' is not a valid type name; it is a restricted identifier and not allowed as a type identifier in Java "+ AbstractRegressionTest.PREVIEW_ALLOWED_LEVEL +"\n" +
-			"----------\n" +
-			"2. ERROR in X.java (at line 3)\n" +
-			"	try (sealed y = new Y()) {\n" +
-			"	     ^^^^^^\n" +
-			"sealed cannot be resolved to a type\n" +
 			"----------\n",
 			null,
 			true,
@@ -4541,15 +4374,10 @@
 				"}\n",
 			},
 			"----------\n" +
-			"1. WARNING in X.java (at line 5)\n" +
+			"1. ERROR in X.java (at line 5)\n" +
 			"	} catch (sealed e) {\n" +
 			"	         ^^^^^^\n" +
 			"\'sealed\' is not a valid type name; it is a restricted identifier and not allowed as a type identifier in Java "+ AbstractRegressionTest.PREVIEW_ALLOWED_LEVEL +"\n" +
-			"----------\n" +
-			"2. ERROR in X.java (at line 5)\n" +
-			"	} catch (sealed e) {\n" +
-			"	         ^^^^^^\n" +
-			"sealed cannot be resolved to a type\n" +
 			"----------\n",
 			null,
 			true,
@@ -4591,15 +4419,10 @@
 			"	^\n" +
 			"sealed cannot be resolved to a type\n" +
 			"----------\n" +
-			"2. WARNING in X.java (at line 1)\n" +
+			"2. ERROR in X.java (at line 1)\n" +
 			"	record X(sealed p) {\n" +
 			"	         ^^^^^^\n" +
-			"\'sealed\' is not a valid type name; it is a restricted identifier and not allowed as a type identifier in Java 16\n" +
-			"----------\n" +
-			"3. ERROR in X.java (at line 1)\n" +
-			"	record X(sealed p) {\n" +
-			"	         ^^^^^^\n" +
-			"sealed cannot be resolved to a type\n" +
+			"\'sealed\' is not a valid type name; it is a restricted identifier and not allowed as a type identifier in Java 17\n" +
 			"----------\n",
 			null,
 			true,
@@ -4646,16 +4469,11 @@
 				"}\n",
 			},
 			"----------\n" +
-			"1. WARNING in X.java (at line 5)\n" +
+			"1. ERROR in X.java (at line 5)\n" +
 			"	<sealed>this(t);\n" +
 			"	 ^^^^^^\n" +
 			"\'sealed\' is not a valid type name; it is a restricted identifier and not allowed as a type identifier in Java "+ AbstractRegressionTest.PREVIEW_ALLOWED_LEVEL +"\n" +
 			"----------\n" +
-			"2. ERROR in X.java (at line 5)\n" +
-			"	<sealed>this(t);\n" +
-			"	 ^^^^^^\n" +
-			"sealed cannot be resolved to a type\n" +
-			"----------\n" +
 			"3. ERROR in X.java (at line 5)\n" +
 			"	<sealed>this(t);\n" +
 			"	        ^^^^^^^^\n" +
@@ -4713,15 +4531,10 @@
 			"	^^^^^^^^^^^^^^^^\n" +
 			"The parameterized constructor <sealed>X(sealed) of type X is not applicable for the arguments (Integer)\n" +
 			"----------\n" +
-			"2. WARNING in X.java (at line 5)\n" +
+			"2. ERROR in X.java (at line 5)\n" +
 			"	new <sealed>X(t).foo();\n" +
 			"	     ^^^^^^\n" +
 			"\'sealed\' is not a valid type name; it is a restricted identifier and not allowed as a type identifier in Java "+ AbstractRegressionTest.PREVIEW_ALLOWED_LEVEL +"\n" +
-			"----------\n" +
-			"3. ERROR in X.java (at line 5)\n" +
-			"	new <sealed>X(t).foo();\n" +
-			"	     ^^^^^^\n" +
-			"sealed cannot be resolved to a type\n" +
 			"----------\n",
 			null,
 			true,
@@ -4770,16 +4583,11 @@
 				"}\n",
 			},
 			"----------\n" +
-			"1. WARNING in X.java (at line 6)\n" +
+			"1. ERROR in X.java (at line 6)\n" +
 			"	x.<sealed>foo(0);\n" +
 			"	   ^^^^^^\n" +
 			"\'sealed\' is not a valid type name; it is a restricted identifier and not allowed as a type identifier in Java "+ AbstractRegressionTest.PREVIEW_ALLOWED_LEVEL +"\n" +
 			"----------\n" +
-			"2. ERROR in X.java (at line 6)\n" +
-			"	x.<sealed>foo(0);\n" +
-			"	   ^^^^^^\n" +
-			"sealed cannot be resolved to a type\n" +
-			"----------\n" +
 			"3. ERROR in X.java (at line 6)\n" +
 			"	x.<sealed>foo(0);\n" +
 			"	          ^^^\n" +
@@ -4825,15 +4633,10 @@
 				"}\n",
 			},
 			"----------\n" +
-			"1. WARNING in X.java (at line 5)\n" +
+			"1. ERROR in X.java (at line 5)\n" +
 			"	X x = new sealed();\n" +
 			"	          ^^^^^^\n" +
 			"\'sealed\' is not a valid type name; it is a restricted identifier and not allowed as a type identifier in Java "+ AbstractRegressionTest.PREVIEW_ALLOWED_LEVEL +"\n" +
-			"----------\n" +
-			"2. ERROR in X.java (at line 5)\n" +
-			"	X x = new sealed();\n" +
-			"	          ^^^^^^\n" +
-			"sealed cannot be resolved to a type\n" +
 			"----------\n",
 			null,
 			true,
@@ -4890,7 +4693,7 @@
 				"}\n",
 			},
 			"----------\n" +
-			"1. WARNING in X.java (at line 3)\n" +
+			"1. ERROR in X.java (at line 3)\n" +
 			"	new sealed() {\n" +
 			"	    ^^^^^^\n" +
 			"\'sealed\' is not a valid type name; it is a restricted identifier and not allowed as a type identifier in Java "+ AbstractRegressionTest.PREVIEW_ALLOWED_LEVEL +"\n" +
@@ -4900,7 +4703,7 @@
 			"	^^^^\n" +
 			"The method Zork() is undefined for the type new sealed(){}\n" +
 			"----------\n" +
-			"3. WARNING in X.java (at line 11)\n" +
+			"3. ERROR in X.java (at line 11)\n" +
 			"	abstract class sealed {\n" +
 			"	               ^^^^^^\n" +
 			"\'sealed\' is not a valid type name; it is a restricted identifier and not allowed as a type identifier in Java "+ AbstractRegressionTest.PREVIEW_ALLOWED_LEVEL +"\n" +
@@ -4941,15 +4744,10 @@
 				"}",
 			},
 			"----------\n" +
-			"1. WARNING in X.java (at line 3)\n" +
+			"1. ERROR in X.java (at line 3)\n" +
 			"	Object[] p = new sealed[10];\n" +
 			"	                 ^^^^^^\n" +
 			"\'sealed\' is not a valid type name; it is a restricted identifier and not allowed as a type identifier in Java "+ AbstractRegressionTest.PREVIEW_ALLOWED_LEVEL +"\n" +
-			"----------\n" +
-			"2. ERROR in X.java (at line 3)\n" +
-			"	Object[] p = new sealed[10];\n" +
-			"	                 ^^^^^^\n" +
-			"sealed cannot be resolved to a type\n" +
 			"----------\n",
 			null,
 			true,
@@ -5004,25 +4802,15 @@
 			"	        ^^^\n" +
 			"The method foo(sealed) from the type X refers to the missing type sealed\n" +
 			"----------\n" +
-			"2. WARNING in X.java (at line 3)\n" +
+			"2. ERROR in X.java (at line 3)\n" +
 			"	new X().foo((sealed) null);\n" +
 			"	             ^^^^^^\n" +
 			"\'sealed\' is not a valid type name; it is a restricted identifier and not allowed as a type identifier in Java "+ AbstractRegressionTest.PREVIEW_ALLOWED_LEVEL +"\n" +
 			"----------\n" +
-			"3. ERROR in X.java (at line 3)\n" +
-			"	new X().foo((sealed) null);\n" +
-			"	             ^^^^^^\n" +
-			"sealed cannot be resolved to a type\n" +
-			"----------\n" +
-			"4. WARNING in X.java (at line 5)\n" +
+			"4. ERROR in X.java (at line 5)\n" +
 			"	private void foo(sealed o) {}\n" +
 			"	                 ^^^^^^\n" +
 			"\'sealed\' is not a valid type name; it is a restricted identifier and not allowed as a type identifier in Java "+ AbstractRegressionTest.PREVIEW_ALLOWED_LEVEL +"\n" +
-			"----------\n" +
-			"5. ERROR in X.java (at line 5)\n" +
-			"	private void foo(sealed o) {}\n" +
-			"	                 ^^^^^^\n" +
-			"sealed cannot be resolved to a type\n" +
 			"----------\n",
 			null,
 			true,
@@ -5060,15 +4848,10 @@
 				"}",
 			},
 			"----------\n" +
-			"1. WARNING in X.java (at line 3)\n" +
+			"1. ERROR in X.java (at line 3)\n" +
 			"	if (o instanceof sealed) {}\n" +
 			"	                 ^^^^^^\n" +
 			"\'sealed\' is not a valid type name; it is a restricted identifier and not allowed as a type identifier in Java "+ AbstractRegressionTest.PREVIEW_ALLOWED_LEVEL +"\n" +
-			"----------\n" +
-			"2. ERROR in X.java (at line 3)\n" +
-			"	if (o instanceof sealed) {}\n" +
-			"	                 ^^^^^^\n" +
-			"sealed cannot be resolved to a type\n" +
 			"----------\n",
 			null,
 			true,
@@ -5128,7 +4911,7 @@
 			"	^^^^\n" +
 			"The method Zork() is undefined for the type X\n" +
 			"----------\n" +
-			"2. WARNING in X.java (at line 8)\n" +
+			"2. ERROR in X.java (at line 8)\n" +
 			"	class sealed{}\n" +
 			"	      ^^^^^^\n" +
 			"\'sealed\' is not a valid type name; it is a restricted identifier and not allowed as a type identifier in Java "+ AbstractRegressionTest.PREVIEW_ALLOWED_LEVEL +"\n" +
@@ -5304,31 +5087,16 @@
 				"final class Z implements I{}",
 			},
 			"----------\n" +
-					"1. WARNING in X.java (at line 1)\n" +
-					"	public sealed class X  permits Y {Zork();\n" +
-					"	       ^^^^^^\n" +
-					"You are using a preview language feature that may or may not be supported in a future release\n" +
-					"----------\n" +
-					"2. WARNING in X.java (at line 1)\n" +
-					"	public sealed class X  permits Y {Zork();\n" +
-					"	                       ^^^^^^^\n" +
-					"You are using a preview language feature that may or may not be supported in a future release\n" +
-					"----------\n" +
-					"3. ERROR in X.java (at line 1)\n" +
-					"	public sealed class X  permits Y {Zork();\n" +
-					"	                                  ^^^^^^\n" +
-					"Return type for the method is missing\n" +
-					"----------\n" +
-					"4. ERROR in X.java (at line 1)\n" +
-					"	public sealed class X  permits Y {Zork();\n" +
-					"	                                  ^^^^^^\n" +
-					"This method requires a body instead of a semicolon\n" +
-					"----------\n" +
-					"5. WARNING in X.java (at line 4)\n" +
-					"	sealed interface I{}\n" +
-					"	^^^^^^\n" +
-					"You are using a preview language feature that may or may not be supported in a future release\n" +
-					"----------\n",
+			"1. ERROR in X.java (at line 1)\n" +
+			"	public sealed class X  permits Y {Zork();\n" +
+			"	                                  ^^^^^^\n" +
+			"Return type for the method is missing\n" +
+			"----------\n" +
+			"2. ERROR in X.java (at line 1)\n" +
+			"	public sealed class X  permits Y {Zork();\n" +
+			"	                                  ^^^^^^\n" +
+			"This method requires a body instead of a semicolon\n" +
+			"----------\n",
 			null,
 			true,
 			options
@@ -5566,7 +5334,6 @@
 				"X.java",
 				"import java.lang.reflect.Modifier;\n"+
 				"\n"+
-				"@SuppressWarnings(\"preview\")\n"+
 				"sealed interface I {\n"+
 				" void foo();\n"+
 				"}\n"+
diff --git a/org.eclipse.jdt.core.tests.compiler/src/org/eclipse/jdt/core/tests/compiler/regression/SwitchPatternTest.java b/org.eclipse.jdt.core.tests.compiler/src/org/eclipse/jdt/core/tests/compiler/regression/SwitchPatternTest.java
new file mode 100644
index 0000000..fff3ce0
--- /dev/null
+++ b/org.eclipse.jdt.core.tests.compiler/src/org/eclipse/jdt/core/tests/compiler/regression/SwitchPatternTest.java
@@ -0,0 +1,2908 @@
+/*******************************************************************************
+ * Copyright (c) 2021 IBM Corporation and others.
+ * All rights reserved. This program and the accompanying materials
+ * are made available under the terms of the Eclipse Public License v1.0
+ * which accompanies this distribution, and is available at
+ * https://www.eclipse.org/legal/epl-2.0/
+ *
+ * SPDX-License-Identifier: EPL-2.0
+ *
+ * This is an implementation of an early-draft specification developed under the Java
+ * Community Process (JCP) and is made available for testing and evaluation purposes
+ * only. The code is not compatible with any specification of the JCP.
+ *
+ * Contributors:
+ *     IBM Corporation - initial API and implementation
+ *******************************************************************************/
+package org.eclipse.jdt.core.tests.compiler.regression;
+
+import java.util.Map;
+
+import org.eclipse.jdt.internal.compiler.impl.CompilerOptions;
+
+import junit.framework.Test;
+
+public class SwitchPatternTest extends AbstractRegressionTest9 {
+
+	static {
+//		TESTS_NUMBERS = new int [] { 40 };
+//		TESTS_RANGE = new int[] { 1, -1 };
+//		TESTS_NAMES = new String[] { "testBug575249_03"};
+	}
+
+	private static String previewLevel = "17";
+
+	public static Class<?> testClass() {
+		return SwitchPatternTest.class;
+	}
+	public static Test suite() {
+		return buildMinimalComplianceTestSuite(testClass(), F_17);
+	}
+	public SwitchPatternTest(String testName){
+		super(testName);
+	}
+
+	// Enables the tests to run individually
+	protected Map<String, String> getCompilerOptions() {
+		Map<String, String> defaultOptions = super.getCompilerOptions();
+		defaultOptions.put(CompilerOptions.OPTION_Compliance, CompilerOptions.VERSION_17); // FIXME
+		defaultOptions.put(CompilerOptions.OPTION_Source, CompilerOptions.VERSION_17);
+		defaultOptions.put(CompilerOptions.OPTION_TargetPlatform, CompilerOptions.VERSION_17);
+		defaultOptions.put(CompilerOptions.OPTION_EnablePreviews, CompilerOptions.ENABLED);
+		defaultOptions.put(CompilerOptions.OPTION_ReportPreviewFeatures, CompilerOptions.IGNORE);
+		defaultOptions.put(CompilerOptions.OPTION_Store_Annotations, CompilerOptions.ENABLED);
+		return defaultOptions;
+	}
+
+	@Override
+	protected void runConformTest(String[] testFiles, String expectedOutput) {
+		runConformTest(testFiles, expectedOutput, "", getCompilerOptions());
+	}
+	@Override
+	protected void runConformTest(String[] testFiles, String expectedOutput, Map<String, String> customOptions) {
+		runConformTest(testFiles, expectedOutput, "", customOptions);
+	}
+	protected void runConformTest(String[] testFiles, String expectedOutput, String errorOutput) {
+		runConformTest(testFiles, expectedOutput, errorOutput, getCompilerOptions());
+	}
+	protected void runConformTest(String[] testFiles, String expectedOutput, String expectedErrorOutput, Map<String, String> customOptions) {
+		Runner runner = new Runner();
+		runner.testFiles = testFiles;
+		runner.expectedOutputString = expectedOutput;
+		runner.expectedErrorString = expectedErrorOutput;
+		runner.vmArguments = new String[] {"--enable-preview"};
+		runner.customOptions = customOptions;
+		runner.javacTestOptions = JavacTestOptions.forReleaseWithPreview(SwitchPatternTest.previewLevel);
+		runner.runConformTest();
+	}
+	@Override
+	protected void runNegativeTest(String[] testFiles, String expectedCompilerLog) {
+		runNegativeTest(testFiles, expectedCompilerLog, JavacTestOptions.forReleaseWithPreview(SwitchPatternTest.previewLevel));
+	}
+	protected void runWarningTest(String[] testFiles, String expectedCompilerLog) {
+		runWarningTest(testFiles, expectedCompilerLog, null);
+	}
+	protected void runWarningTest(String[] testFiles, String expectedCompilerLog, Map<String, String> customOptions) {
+		runWarningTest(testFiles, expectedCompilerLog, customOptions, null);
+	}
+	protected void runWarningTest(String[] testFiles, String expectedCompilerLog,
+			Map<String, String> customOptions, String javacAdditionalTestOptions) {
+
+		Runner runner = new Runner();
+		runner.testFiles = testFiles;
+		runner.expectedCompilerLog = expectedCompilerLog;
+		runner.customOptions = customOptions;
+		runner.vmArguments = new String[] {"--enable-preview"};
+		runner.javacTestOptions = javacAdditionalTestOptions == null ? JavacTestOptions.forReleaseWithPreview(SwitchPatternTest.previewLevel) :
+			JavacTestOptions.forReleaseWithPreview(SwitchPatternTest.previewLevel, javacAdditionalTestOptions);
+		runner.runWarningTest();
+	}
+
+	public void testBug573516_001() {
+		runConformTest(
+			new String[] {
+				"X.java",
+				"public class X {\n"+
+				" private static void foo(Object o) {\n"+
+				"   switch (o) {\n"+
+				"     case Integer i     -> System.out.println(\"String:\");\n"+
+				"     case String s     -> System.out.println(\"String: Hello World!\");\n"+
+				"     default       -> System.out.println(\"Object\");\n"+
+				"   }\n"+
+				" }\n"+
+				" public static void main(String[] args) {\n"+
+				"   foo(\"Hello World\");\n"+
+				" }\n"+
+				"}",
+			},
+			"String: Hello World!");
+	}
+	public void testBug573516_002() {
+		runNegativeTest(
+			new String[] {
+				"X.java",
+				"public class X {\n"+
+				" private static void foo(Object o) {\n"+
+				"   switch (o) {\n"+
+				"     case String s     -> System.out.println(\"String:\");\n"+
+				"     default       -> System.out.println(\"Object\");\n"+
+				"   }\n"+
+				" }\n"+
+				" public static void main(String[] args) {\n"+
+				"   foo(\"Hello World\");\n"+
+				"   Zork();\n"+
+				" }\n"+
+				"}",
+			},
+			"----------\n" +
+			"1. ERROR in X.java (at line 10)\n" +
+			"	Zork();\n" +
+			"	^^^^\n" +
+			"The method Zork() is undefined for the type X\n" +
+			"----------\n");
+	}
+	public void testBug573516_003() {
+		runNegativeTest(
+			new String[] {
+				"X.java",
+				"public class X {\n"+
+				" private static void foo(Object o) {\n"+
+				"   switch (o) {\n"+
+				"     case String s  : System.out.println(\"String:\"); break;\n"+
+				"     case Integer i  : System.out.println(\"Integer:\");break;\n"+
+				"     default       : System.out.println(\"Object\");break;\n"+
+				"   }\n"+
+				" }\n"+
+				" public static void main(String[] args) {\n"+
+				"   foo(\"Hello World\");\n"+
+				"   Zork();\n"+
+				" }\n"+
+				"}",
+			},
+			"----------\n" +
+			"1. ERROR in X.java (at line 11)\n" +
+			"	Zork();\n" +
+			"	^^^^\n" +
+			"The method Zork() is undefined for the type X\n" +
+			"----------\n");
+	}
+	public void testBug573516_004() {
+		runNegativeTest(
+			new String[] {
+				"X.java",
+				"public class X {\n"+
+				" private static void foo(Object o) {\n"+
+				"   switch (o) {\n"+
+				"     case Integer t && t > 0 -> System.out.println(\"Integer && t > 0\");\n"+
+				"     default       -> System.out.println(\"Object\");\n"+
+				"   }\n"+
+				" }\n"+
+				" public static void main(String[] args) {\n"+
+				"   foo(\"Hello World\");\n"+
+				"   Zork();\n"+
+				" }\n"+
+				"}",
+			},
+			"----------\n" +
+			"1. ERROR in X.java (at line 10)\n" +
+			"	Zork();\n" +
+			"	^^^^\n" +
+			"The method Zork() is undefined for the type X\n" +
+			"----------\n");
+	}
+	public void testBug573516_005() {
+		runNegativeTest(
+			new String[] {
+				"X.java",
+				"public class X {\n"+
+				" private static void foo(Object o) {\n"+
+				"   switch (o) {\n"+
+				"     case Integer t, String s, X x : System.out.println(\"Integer, String or X\");\n"+
+				"     default : System.out.println(\"Object\");\n"+
+				"   }\n"+
+				" }\n"+
+				" public static void main(String[] args) {\n"+
+				"   foo(\"Hello World\");\n"+
+				"   Zork();\n"+
+				" }\n"+
+				"}\n"+
+				"class Y {}",
+			},
+			"----------\n" +
+			"1. ERROR in X.java (at line 4)\n" +
+			"	case Integer t, String s, X x : System.out.println(\"Integer, String or X\");\n" +
+			"	                ^^^^^^^^\n" +
+			"A switch label may not have more than one pattern case label element.\n" +
+			"----------\n" +
+			"2. ERROR in X.java (at line 4)\n" +
+			"	case Integer t, String s, X x : System.out.println(\"Integer, String or X\");\n" +
+			"	                          ^^^\n" +
+			"A switch label may not have more than one pattern case label element.\n" +
+			"----------\n" +
+			"3. ERROR in X.java (at line 10)\n" +
+			"	Zork();\n" +
+			"	^^^^\n" +
+			"The method Zork() is undefined for the type X\n" +
+			"----------\n");
+	}
+	public void testBug573516_006() {
+		runNegativeTest(
+			new String[] {
+				"X.java",
+				"public class X {\n"+
+				" private static void foo(Object o) {\n"+
+				"   switch (o) {\n"+
+				"     case Integer t, String s && s.length > 0, X x && x.hashCode() > 10 : System.out.println(\"Integer, String or X\");\n"+
+				"     default : System.out.println(\"Object\");\n"+
+				"   }\n"+
+				" }\n"+
+				" public static void main(String[] args) {\n"+
+				"   foo(\"Hello World\");\n"+
+				"   Zork();\n"+
+				" }\n"+
+				"}\n"+
+				"class Y {}",
+			},
+			"----------\n" +
+			"1. ERROR in X.java (at line 4)\n" +
+			"	case Integer t, String s && s.length > 0, X x && x.hashCode() > 10 : System.out.println(\"Integer, String or X\");\n" +
+			"	                ^^^^^^^^^^^^^^^^^^^^^^^^\n" +
+			"A switch label may not have more than one pattern case label element.\n" +
+			"----------\n" +
+			"2. ERROR in X.java (at line 4)\n" +
+			"	case Integer t, String s && s.length > 0, X x && x.hashCode() > 10 : System.out.println(\"Integer, String or X\");\n" +
+			"	                              ^^^^^^\n" +
+			"length cannot be resolved or is not a field\n" +
+			"----------\n" +
+			"3. ERROR in X.java (at line 4)\n" +
+			"	case Integer t, String s && s.length > 0, X x && x.hashCode() > 10 : System.out.println(\"Integer, String or X\");\n" +
+			"	                                          ^^^^^^^^^^^^^^^^^^^^^^^^\n" +
+			"A switch label may not have more than one pattern case label element.\n" +
+			"----------\n" +
+			"4. ERROR in X.java (at line 10)\n" +
+			"	Zork();\n" +
+			"	^^^^\n" +
+			"The method Zork() is undefined for the type X\n" + 			"----------\n");
+	}
+	public void testBug573516_007() {
+		runNegativeTest(
+			new String[] {
+				"X.java",
+				"public class X {\n"+
+				" private static void foo(Object o) {\n"+
+				"   switch (o) {\n"+
+				"     case Integer t, String : System.out.println(\"Error should be flagged for String\");\n"+
+				"     default : System.out.println(\"Object\");\n"+
+				"   }\n"+
+				" }\n"+
+				" public static void main(String[] args) {\n"+
+				"   foo(\"Hello World\");\n"+
+				"   Zork();\n"+
+				" }\n"+
+				"}\n"+
+				"class Y {}",
+			},
+			"----------\n" +
+			"1. ERROR in X.java (at line 4)\n" +
+			"	case Integer t, String : System.out.println(\"Error should be flagged for String\");\n" +
+			"	                ^^^^^^\n" +
+			"String cannot be resolved to a variable\n" +
+			"----------\n" +
+			"2. ERROR in X.java (at line 4)\n" +
+			"	case Integer t, String : System.out.println(\"Error should be flagged for String\");\n" +
+			"	                ^^^^^^\n" +
+			"Constant case label elements and pattern case label elements cannot be present in a switch label\n" +
+			"----------\n" +
+			"4. ERROR in X.java (at line 10)\n" +
+			"	Zork();\n" +
+			"	^^^^\n" +
+			"The method Zork() is undefined for the type X\n" +
+			"----------\n");
+	}
+	public void testBug573516_008() {
+		runNegativeTest(
+			new String[] {
+				"X.java",
+				"public class X {\n"+
+				" private static void foo(Object o) {\n"+
+				"   switch (o.hashCode()) {\n"+
+				"     case Integer t, String : System.out.println(\"Error should be flagged for Integer and String\");\n"+
+				"     default : System.out.println(\"Object\");\n"+
+				"   }\n"+
+				" }\n"+
+				" public static void main(String[] args) {\n"+
+				"   foo(\"Hello World\");\n"+
+				"   Zork();\n"+
+				" }\n"+
+				"}\n"+
+				"class Y {}",
+			},
+			"----------\n" +
+			"1. ERROR in X.java (at line 4)\n" +
+			"	case Integer t, String : System.out.println(\"Error should be flagged for Integer and String\");\n" +
+			"	     ^^^^^^^^^\n" +
+			"Type mismatch: cannot convert from int to Integer\n" +
+			"----------\n" +
+			"2. ERROR in X.java (at line 4)\n" +
+			"	case Integer t, String : System.out.println(\"Error should be flagged for Integer and String\");\n" +
+			"	                ^^^^^^\n" +
+			"String cannot be resolved to a variable\n" +
+			"----------\n" +
+			"3. ERROR in X.java (at line 4)\n" +
+			"	case Integer t, String : System.out.println(\"Error should be flagged for Integer and String\");\n" +
+			"	                ^^^^^^\n" +
+			"Constant case label elements and pattern case label elements cannot be present in a switch label\n" +
+			"----------\n" +
+			"4. ERROR in X.java (at line 10)\n" +
+			"	Zork();\n" +
+			"	^^^^\n" +
+			"The method Zork() is undefined for the type X\n" +
+			"----------\n");
+	}
+	public void testBug573516_009() {
+		runNegativeTest(
+			new String[] {
+				"X.java",
+				"public class X {\n"+
+				" private static void foo(Object o) {\n"+
+				"   switch (o.hashCode()) {\n"+
+				"     case default : System.out.println(\"Default\");\n"+
+				"     default : System.out.println(\"Object\");\n"+
+				"   }\n"+
+				" }\n"+
+				" public static void main(String[] args) {\n"+
+				"   foo(\"Hello World\");\n"+
+				"   Zork();\n"+
+				" }\n"+
+				"}\n"+
+				"class Y {}",
+			},
+			"----------\n" +
+			"1. ERROR in X.java (at line 5)\n" +
+			"	default : System.out.println(\"Object\");\n" +
+			"	^^^^^^^\n" +
+			"The default case is already defined\n" +
+			"----------\n" +
+			"2. ERROR in X.java (at line 10)\n" +
+			"	Zork();\n" +
+			"	^^^^\n" +
+			"The method Zork() is undefined for the type X\n" +
+			"----------\n");
+	}
+	public void testBug573516_010() {
+		runNegativeTest(
+			new String[] {
+				"X.java",
+				"public class X {\n"+
+				" private static void foo(Object o) {\n"+
+				"   switch (o.hashCode()) {\n"+
+				"     case String s, default : System.out.println(\"Error should be flagged for String and default\");\n"+
+				"     default : System.out.println(\"Object\");\n"+
+				"   }\n"+
+				" }\n"+
+				" public static void main(String[] args) {\n"+
+				"   foo(\"Hello World\");\n"+
+				"   Zork();\n"+
+				" }\n"+
+				"}\n"+
+				"class Y {}",
+			},
+			"----------\n" +
+			"1. ERROR in X.java (at line 4)\n" +
+			"	case String s, default : System.out.println(\"Error should be flagged for String and default\");\n" +
+			"	     ^^^^^^^^\n" +
+			"Type mismatch: cannot convert from int to String\n" +
+			"----------\n" +
+			"2. ERROR in X.java (at line 4)\n" +
+			"	case String s, default : System.out.println(\"Error should be flagged for String and default\");\n" +
+			"	                       ^\n" +
+			"A switch label may not have both a pattern case label element and a default case label element.\n" +
+			"----------\n" +
+			"3. ERROR in X.java (at line 5)\n" +
+			"	default : System.out.println(\"Object\");\n" +
+			"	^^^^^^^\n" +
+			"The default case is already defined\n" +
+			"----------\n" +
+			"4. ERROR in X.java (at line 10)\n" +
+			"	Zork();\n" +
+			"	^^^^\n" +
+			"The method Zork() is undefined for the type X\n" +
+			"----------\n");
+	}
+	public void testBug573516_011() {
+		runNegativeTest(
+			new String[] {
+				"X.java",
+				"public class X {\n"+
+				" private static void foo(Object o) {\n"+
+				"   switch (o.hashCode()) {\n"+
+				"     case var s : System.out.println(\"Error should be ANY_PATTERN\");\n"+
+				"     default : System.out.println(\"Object\");\n"+
+				"   }\n"+
+				" }\n"+
+				" public static void main(String[] args) {\n"+
+				"   foo(\"Hello World\");\n"+
+				"   Zork();\n"+
+				" }\n"+
+				"}\n"+
+				"class Y {}",
+			},
+			"----------\n" +
+			"1. ERROR in X.java (at line 4)\n" +
+			"	case var s : System.out.println(\"Error should be ANY_PATTERN\");\n" +
+			"	     ^^^\n" +
+			"'var' is not allowed here\n" +
+			"----------\n" +
+			"2. ERROR in X.java (at line 10)\n" +
+			"	Zork();\n" +
+			"	^^^^\n" +
+			"The method Zork() is undefined for the type X\n" +
+			"----------\n");
+	}
+	public void testBug574228_001() {
+		runNegativeTest(
+			new String[] {
+				"X.java",
+				"public class X {\n"+
+				" private static void foo(Object o) {\n"+
+				"   switch (o) {\n"+
+				"     case 1: System.out.println(\"Integer\"); break;\n"+
+				"     default : System.out.println(\"Object\");\n"+
+				"   }\n"+
+				" }\n"+
+				"   public static void main(String[] args) {\n"+
+				"   foo(\"Hello World\");\n"+
+				"     Zork();\n"+
+				" }\n"+
+				"}",
+			},
+			"----------\n" +
+			"1. ERROR in X.java (at line 4)\n" +
+			"	case 1: System.out.println(\"Integer\"); break;\n" +
+			"	     ^\n" +
+			"The constant case label element is not compatible with switch expression type Object\n" +
+			"----------\n" +
+			"2. ERROR in X.java (at line 10)\n" +
+			"	Zork();\n" +
+			"	^^^^\n" +
+			"The method Zork() is undefined for the type X\n" +
+			"----------\n");
+	}
+
+	public void testBug573936_01() {
+		this.runNegativeTest(
+				new String[] {
+					"X.java",
+					"public class X {\n"+
+					" private static void foo(Object o) {\n"+
+					"   switch (o) {\n"+
+					"     case Integer I: \n"+
+					"       System.out.println(\"Integer\"); \n"+
+					"       System.out.println(I); \n"+
+					"     case String s && s.length()>1: \n"+
+					"       System.out.println(\"String s && s.length()>1\"); \n"+
+					"       System.out.println(s); \n"+
+					"       break;// error no fallthrough allowed in pattern\n"+
+					"     case X x:\n"+
+					"       System.out.println(\"X\"); \n"+
+					"       System.out.println(x);\n"+
+					"       break;\n"+
+					"     default : System.out.println(\"Object\"); \n"+
+					"   }\n"+
+					" }   \n"+
+					"   public static void main(String[] args) {\n"+
+					"   foo(\"Hello World!\");\n"+
+					"     foo(\"H\");\n"+
+					"   foo(bar());\n"+
+					" }\n"+
+					"   public static Object bar() { return new Object();}\n"+
+					"}",
+				},
+				"----------\n" +
+				"1. ERROR in X.java (at line 7)\n" +
+				"	case String s && s.length()>1: \n" +
+				"	^^^^^^^^^^^^^^^^^^^^^^^^^^^^^\n" +
+				"Illegal fall-through to a pattern case label \n" +
+				"----------\n");
+	}
+	public void testBug573939_01() {
+		runNegativeTest(
+				new String[] {
+					"X.java",
+					"public class X {\n"+
+					" private static void foo(Object o) {\n"+
+					"   switch (o) {\n"+
+					"     case Integer s : System.out.println(\"Integer\");\n"+
+					"     case String s1: System.out.println(\"String \");\n"+
+					"     default : System.out.println(\"Object\");\n"+
+					"   }\n"+
+					" }\n"+
+					" public static void main(String[] args) {\n"+
+					"   foo(\"Hello World\");\n"+
+					"   Zork();\n"+
+					" }\n"+
+					"}\n"+
+					"class Y {}",
+				},
+				"----------\n" +
+				"1. ERROR in X.java (at line 5)\n" +
+				"	case String s1: System.out.println(\"String \");\n" +
+				"	^^^^^^^^^^^^^^\n" +
+				"Illegal fall-through to a pattern case label \n" +
+				"----------\n" +
+				"2. ERROR in X.java (at line 11)\n" +
+				"	Zork();\n" +
+				"	^^^^\n" +
+				"The method Zork() is undefined for the type X\n" +
+				"----------\n");
+	}
+	public void testBug573939_02() {
+		this.runConformTest(
+				new String[] {
+					"X.java",
+					"public class X {\n"+
+					" private static void foo(Object o) {\n"+
+					"   switch (o) {\n"+
+					"     case Integer I: System.out.println(\"Integer\"); break;\n"+
+					"     case String s && s.length()>1: System.out.println(\"String > 1\"); break;\n"+
+					"     case String s1: System.out.println(\"String\"); break;\n"+
+					"     case X x: System.out.println(\"X\"); break;\n"+
+					"     default : System.out.println(\"Object\");\n"+
+					"   }\n"+
+					" }\n"+
+					"   public static void main(String[] args) {\n"+
+					"   foo(\"Hello World!\");\n"+
+					"   foo(\"H\");\n"+
+					"   foo(bar());\n"+
+					" }\n"+
+					"   public static Object bar() { return new Object();}\n"+
+					"}",
+				},
+				"String > 1\n" +
+				"String\n" +
+				"Object");
+	}
+	public void testBug573939_03() {
+		this.runConformTest(
+				new String[] {
+					"X.java",
+					"public class X {\n"+
+					" private static void foo(Object o) {\n"+
+					"   switch (o) {\n"+
+					"     case Integer I: \n"+
+					"       System.out.println(\"Integer\"); \n"+
+					"       System.out.println(I); \n"+
+					"       break; \n"+
+					"     case String s && s.length()>1: \n"+
+					"       System.out.println(\"String s && s.length()>1\"); \n"+
+					"       System.out.println(s); \n"+
+					"       break;\n"+
+					"     case String s1: \n"+
+					"       System.out.println(\"String\"); \n"+
+					"       System.out.println(s1);\n"+
+					"       break; \n"+
+					"     case X x:\n"+
+					"       System.out.println(\"X\"); \n"+
+					"       System.out.println(x);\n"+
+					"       break;\n"+
+					"     default : System.out.println(\"Object\"); \n"+
+					"   }\n"+
+					" }   \n"+
+					"   public static void main(String[] args) {\n"+
+					"   foo(\"Hello World!\");\n"+
+					"     foo(\"H\");\n"+
+					"   foo(bar());\n"+
+					" }\n"+
+					"   public static Object bar() { return new Object();}\n"+
+					"}",
+				},
+				"String s && s.length()>1\n" +
+				"Hello World!\n" +
+				"String\n" +
+				"H\n" +
+				"Object");
+	}
+	public void testBug573939_03b() {
+		this.runConformTest(
+				new String[] {
+					"X.java",
+					"public class X {\n"+
+					" private static void foo(Object o) {\n"+
+					"   switch (o) {\n"+
+					"     case Integer I: \n"+
+					"       System.out.println(\"Integer\"); \n"+
+					"       System.out.println(I); \n"+
+					"       break; \n"+
+					"     case String s && s.length()>1: \n"+
+					"       System.out.println(\"String s && s.length()>1\"); \n"+
+					"       System.out.println(s); \n"+
+					"       break;\n"+
+					"     case String s: \n"+
+					"       System.out.println(\"String\"); \n"+
+					"       System.out.println(s);\n"+
+					"       break; \n"+
+					"     case X x:\n"+
+					"       System.out.println(\"X\"); \n"+
+					"       System.out.println(x);\n"+
+					"       break;\n"+
+					"     default : System.out.println(\"Object\"); \n"+
+					"   }\n"+
+					" }   \n"+
+					"   public static void main(String[] args) {\n"+
+					"   foo(\"Hello World!\");\n"+
+					"     foo(\"H\");\n"+
+					"   foo(bar());\n"+
+					" }\n"+
+					"   public static Object bar() { return new Object();}\n"+
+					"}",
+				},
+				"String s && s.length()>1\n" +
+				"Hello World!\n" +
+				"String\n" +
+				"H\n" +
+				"Object");
+	}
+	public void test045() {
+		this.runNegativeTest(
+			new String[] {
+				"X.java",
+				"public abstract class X {\n" +
+				"  public static void main(String[] args) {\n" +
+				"    switch (args.length) {\n" +
+				"      case 1:\n" +
+				"        final int j = 1;\n" +
+				"      case 2:\n" +
+				"        switch (5) {\n" +
+				"          case j:\n" +
+				"        }\n" +
+				"    }\n" +
+				"  }\n" +
+				"}\n",
+			},
+			"----------\n" +
+			"1. ERROR in X.java (at line 8)\n" +
+			"	case j:\n" +
+			"	     ^\n" +
+			"The local variable j may not have been initialized\n" +
+			"----------\n");
+	}
+	public void testBug574525_01() {
+		this.runConformTest(
+				new String[] {
+					"X.java",
+					"public class X {\n"+
+					" private static void foo(Object o) {\n"+
+					"   switch (o) {\n"+
+					"     case Integer I: \n"+
+					"       System.out.println(\"Integer\"); \n"+
+					"       System.out.println(I); \n"+
+					"       break; \n"+
+					"     case null:\n"+
+					"       System.out.println(\"NULL\"); \n"+
+					"       break;\n"+
+					"     default : System.out.println(\"Object\"); \n"+
+					"   }\n"+
+					" }   \n"+
+					"   public static void main(String[] args) {\n"+
+					"     foo(null);\n"+
+					" }\n"+
+					"}",
+				},
+				"NULL");
+	}
+	public void testBug574525_02() {
+		this.runConformTest(
+				new String[] {
+					"X.java",
+					"public class X {\n"+
+					" private static void foo(Object o) {\n"+
+					"   switch (o) {\n"+
+					"     case Integer I: \n"+
+					"       System.out.println(\"Integer\"); \n"+
+					"       System.out.println(I); \n"+
+					"       break; \n"+
+					"     case String s && s.length()>1: \n"+
+					"       System.out.println(\"String s && s.length()>1\"); \n"+
+					"       System.out.println(s); \n"+
+					"       break;\n"+
+					"     case String s1: \n"+
+					"       System.out.println(\"String\"); \n"+
+					"       System.out.println(s1);\n"+
+					"       break; \n"+
+					"     case X x:\n"+
+					"       System.out.println(\"X\"); \n"+
+					"       System.out.println(x);\n"+
+					"       break;\n"+
+					"     case null:\n"+
+					"       System.out.println(\"NULL\"); \n"+
+					"       break;\n"+
+					"     default : System.out.println(\"Object\"); \n"+
+					"   }\n"+
+					" }   \n"+
+					"   public static void main(String[] args) {\n"+
+					"   foo(\"Hello World!\");\n"+
+					"   foo(null);\n"+
+					"   foo(bar());\n"+
+					" }\n"+
+					"   public static Object bar() { return new Object();}\n"+
+					"}",
+				},
+				"String s && s.length()>1\n" +
+				"Hello World!\n" +
+				"NULL\n" +
+				"Object");
+	}
+	public void testBug574525_03() {
+		this.runConformTest(
+				new String[] {
+					"X.java",
+					"public class X {\n"+
+					" private static void foo(Integer o) {\n"+
+					"   switch (o) {\n"+
+					"     case 10: \n"+
+					"       System.out.println(\"Integer\"); \n"+
+					"       System.out.println(o); \n"+
+					"       break; \n"+
+					"     case null:\n"+
+					"       System.out.println(\"NULL\"); \n"+
+					"       break;\n"+
+					"     default : System.out.println(o); \n"+
+					"   }\n"+
+					" }   \n"+
+					"   public static void main(String[] args) {\n"+
+					"     foo(0);\n"+
+					" }\n"+
+					"}",
+				},
+				"0");
+	}
+	public void testBug574525_04() {
+		this.runNegativeTest(
+				new String[] {
+					"X.java",
+					"public class X {\n"+
+					" private static void foo(int o) {\n"+
+					"   switch (o) {\n"+
+					"     case 10: \n"+
+					"       System.out.println(\"Integer\"); \n"+
+					"       System.out.println(o); \n"+
+					"       break; \n"+
+					"     case null:\n"+
+					"       System.out.println(\"NULL\"); \n"+
+					"       break;\n"+
+					"     default : System.out.println(o); \n"+
+					"   }\n"+
+					" }   \n"+
+					"   public static void main(String[] args) {\n"+
+					"     foo(0);\n"+
+					" }\n"+
+					"}",
+				},
+				"----------\n" +
+				"1. ERROR in X.java (at line 8)\n" +
+				"	case null:\n" +
+				"	     ^^^^\n" +
+				"Type mismatch: cannot convert from null to int\n" +
+				"----------\n");
+	}
+	public void testBug574538_01() {
+		this.runConformTest(
+				new String[] {
+					"X.java",
+					"public class X {\n"+
+					" public static void main(String[] args) {\n"+
+					"   foo(Integer.valueOf(11));\n"+
+					"   foo(Integer.valueOf(9));\n"+
+					" }\n"+
+					"\n"+
+					" private static void foo(Object o) {\n"+
+					"   switch (o) {\n"+
+					"   case Integer i && i>10:\n"+
+					"     System.out.println(\"Greater than 10:\" + o);\n"+
+					"     break;\n"+
+					"   case Integer j && j>0:\n"+
+					"     System.out.println(\"Greater than 0:\" + o);\n"+
+					"     break;\n"+
+					"   default:\n"+
+					"     System.out.println(\"Object\" + o);\n"+
+					"   }\n"+
+					" }\n"+
+					"}",
+				},
+				"Greater than 10:11\n" +
+				"Greater than 0:9");
+	}
+	public void testBug574538_02() {
+		this.runConformTest(
+				new String[] {
+					"X.java",
+					"public class X {\n"+
+					" public static void main(String[] args) {\n"+
+					"   foo1(Integer.valueOf(10));\n"+
+					"   foo1(Integer.valueOf(11));\n"+
+					"   foo1(\"Hello World!\");\n"+
+					" }\n"+
+					"\n"+
+					" private static void foo1(Object o) {\n"+
+					"   switch (o) {\n"+
+					"   case Integer i&&i>10 -> System.out.println(\"Greater than 10:\");\n"+
+					"   case String s&&s.equals(\"ff\") -> System.out.println(\"String:\" + s);\n"+
+					"   default -> System.out.println(\"Object:\" + o);\n"+
+					"   }\n"+
+					" }\n"+
+					"}",
+				},
+				"Object:10\n" +
+				"Greater than 10:\n" +
+				"Object:Hello World!");
+	}
+
+	public void testBug574549_01() {
+		this.runConformTest(
+				new String[] {
+					"X.java",
+					"public class X {\n"+
+					" public static void main(String[] args) {\n"+
+					"   foo(\"Hello World!\");\n"+
+					" }\n"+
+					"\n"+
+					" private static void foo(Object o) {\n"+
+					"   switch (o) {\n"+
+					"    case default:\n"+
+					"     System.out.println(\"Object: \" + o);\n"+
+					"   }\n"+
+					" }\n"+
+					"}",
+				},
+				"Object: Hello World!");
+	}
+	public void testBug574549_02() {
+		this.runConformTest(
+				new String[] {
+					"X.java",
+					"public class X {\n"+
+					" public static void main(String[] args) {\n"+
+					"   foo(Integer.valueOf(11));\n"+
+					"   foo(Integer.valueOf(9));\n"+
+					"   foo(\"Hello World!\");\n"+
+					" }\n"+
+					"\n"+
+					" private static void foo(Object o) {\n"+
+					"   switch (o) {\n"+
+					"   case Integer i && i>10:\n"+
+					"     System.out.println(\"Greater than 10:\" + o);\n"+
+					"     break;\n"+
+					"   case Integer j && j>0:\n"+
+					"     System.out.println(\"Greater than 0:\" + o);\n"+
+					"     break;\n"+
+					"   case default:\n"+
+					"     System.out.println(\"Give Me Some SunShine:\" + o);\n"+
+					"   }\n"+
+					" }\n"+
+					"}",
+				},
+				"Greater than 10:11\n" +
+				"Greater than 0:9\n" +
+				"Give Me Some SunShine:Hello World!");
+	}
+	public void testBug574549_03() {
+		this.runNegativeTest(
+				new String[] {
+					"X.java",
+					"public class X {\n"+
+					" public static void main(String[] args) {\n"+
+					"   foo(\"Hello World!\");\n"+
+					" }\n"+
+					"\n"+
+					" private static void foo(Object o) {\n"+
+					"   switch (o) {\n"+
+					"   case Integer i :\n"+
+					"     System.out.println(\"Integer:\" + o);\n"+
+					"     break;\n"+
+					"   case default:\n"+
+					"     System.out.println(\"Object\" + o);\n"+
+					"   case default:\n"+
+					"     System.out.println(\"Give me Some Sunshine\" + o);\n"+
+					"   }\n"+
+					" }\n"+
+					"}",
+				},
+				"----------\n" +
+				"1. ERROR in X.java (at line 13)\n" +
+				"	case default:\n" +
+				"	           ^^\n" +
+				"The default case is already defined\n" +
+				"----------\n");
+	}
+	public void testBug574549_04() {
+		this.runNegativeTest(
+				new String[] {
+					"X.java",
+					"public class X {\n"+
+					" public static void main(String[] args) {\n"+
+					"   foo(\"Hello World!\");\n"+
+					" }\n"+
+					"\n"+
+					" private static void foo(Object o) {\n"+
+					"   switch (o) {\n"+
+					"   case Integer i :\n"+
+					"     System.out.println(\"Integer:\" + o);\n"+
+					"     break;\n"+
+					"   case default:\n"+
+					"     System.out.println(\"Object\" + o);\n"+
+					"   default:\n"+
+					"     System.out.println(\"Give me Some Sunshine\" + o);\n"+
+					"   }\n"+
+					" }\n"+
+					"}",
+				},
+				"----------\n" +
+				"1. ERROR in X.java (at line 13)\n" +
+				"	default:\n" +
+				"	^^^^^^^\n" +
+				"The default case is already defined\n" +
+				"----------\n");
+	}
+	// Test that when a pattern variable is unused and when the OPTION_PreserveUnusedLocal
+	// option is used, no issue is reported at runtime.
+	public void testBug573937_1() {
+		Map<String,String> options = getCompilerOptions();
+		String opt = options.get(CompilerOptions.OPTION_PreserveUnusedLocal);
+		try {
+			options.put(CompilerOptions.OPTION_PreserveUnusedLocal, CompilerOptions.DISABLED);
+			this.runConformTest(
+				new String[] {
+				"X.java",
+					"public class X {\n"
+						+ "	public static void main(String[] args) {\n"
+						+ "		System.out.println(\"Hello\");\n"
+						+ "	}\n"
+						+ "	public static void foo(Object o) {\n"
+						+ "		switch (o) {\n"
+						+ "			case String s:\n"
+						+ "				break;\n"
+						+ "			default:\n"
+						+ "				break;\n"
+						+ "		}\n"
+						+ "	}\n"
+						+ "}",
+					},
+					"Hello",
+					options);
+		} finally {
+			options.put(CompilerOptions.OPTION_PreserveUnusedLocal, opt);
+		}
+	}
+	// A simple pattern variable in a case is not visible in the
+	// following case statement
+	public void testBug573937_2() {
+		this.runNegativeTest(
+				new String[] {
+						"X.java",
+						"public class X {\n"
+						+ "	public static void foo(Object o) {\n"
+						+ "		switch (o) {\n"
+						+ "			case String s:\n"
+						+ "				System.out.println(s);\n"
+						+ "				break;\n"
+						+ "			case Integer i:\n"
+						+ "				System.out.println(s);\n"
+						+ "			default:\n"
+						+ "				break;\n"
+						+ "		}\n"
+						+ "	}\n"
+						+ "}",
+				},
+				"----------\n" +
+				"1. ERROR in X.java (at line 8)\n" +
+				"	System.out.println(s);\n" +
+				"	                   ^\n" +
+				"s cannot be resolved to a variable\n" +
+				"----------\n");
+	}
+	// Same as above, but without break statement
+	public void testBug573937_3() {
+		this.runNegativeTest(
+				new String[] {
+						"X.java",
+						"public class X {\n"
+						+ "	public static void foo(Object o) {\n"
+						+ "		switch (o) {\n"
+						+ "			case String s:\n"
+						+ "				System.out.println(s);\n"
+						+ "			case Integer i:\n"
+						+ "				System.out.println(s);\n"
+						+ "			default:\n"
+						+ "				System.out.println(s);\n"
+						+ "				break;\n"
+						+ "		}\n"
+						+ "	}\n"
+						+ "}",
+				},
+				"----------\n" +
+				"1. ERROR in X.java (at line 7)\n" +
+				"	System.out.println(s);\n" +
+				"	                   ^\n" +
+				"s cannot be resolved to a variable\n" +
+				"----------\n" +
+				"2. ERROR in X.java (at line 9)\n" +
+				"	System.out.println(s);\n" +
+				"	                   ^\n" +
+				"s cannot be resolved to a variable\n" +
+				"----------\n");
+	}
+	// Test that compiler rejects attempts to redeclare local variable
+	// with same name as a pattern variable
+	public void testBug573937_4() {
+		this.runNegativeTest(
+				new String[] {
+						"X.java",
+						"public class X {\n"
+						+ "	public static void foo(Object o) {\n"
+						+ "		switch (o) {\n"
+						+ "			case String s:\n"
+						+ "				String s = null;\n"
+						+ "				System.out.println(s);\n"
+						+ "				break;\n"
+						+ "			default:\n"
+						+ "				break;\n"
+						+ "		}\n"
+						+ "	}\n"
+						+ "}",
+				},
+				"----------\n" +
+				"1. ERROR in X.java (at line 5)\n" +
+				"	String s = null;\n" +
+				"	       ^\n" +
+				"Duplicate local variable s\n" +
+				"----------\n");
+	}
+	// Test that compiler allows local variable with same name as a
+	// pattern variable in a different case statement
+	public void testBug573937_5() {
+		this.runConformTest(
+				new String[] {
+						"X.java",
+						"public class X {\n"
+								+ "	public static void foo(Object o) {\n"
+								+ "		switch (o) {\n"
+								+ "			case String s:\n"
+								+ "				System.out.println(s);\n"
+								+ "				break;\n"
+								+ "			default:\n"
+								+ "				String s = null;\n"
+								+ "				break;\n"
+								+ "		}\n"
+								+ "	}\n"
+								+ "	public static void main(String[] args) {\n"
+								+ "		foo(\"hello\");\n"
+								+ "	}\n"
+								+ "}",
+				},
+				"hello");
+	}
+	// Test that a pattern variable can't use name of an already existing local
+	// variable
+	public void testBug573937_6() {
+		this.runNegativeTest(
+				new String[] {
+						"X.java",
+						"public class X {\n"
+						+ "	public static void foo(Object o) {\n"
+						+ "		switch (o) {\n"
+						+ "			case String o:\n"
+						+ "				System.out.println(o);\n"
+						+ "				break;\n"
+						+ "			default:\n"
+						+ "				break;\n"
+						+ "		}\n"
+						+ "	}\n"
+						+ "}",
+				},
+				"----------\n" +
+				"1. ERROR in X.java (at line 4)\n" +
+				"	case String o:\n" +
+				"	            ^\n" +
+				"Duplicate local variable o\n" +
+				"----------\n");
+	}
+	// Test that compiler rejects attempts to redeclare another pattern
+	// variable (instanceof) with same name as that a pattern variable in
+	// that case statement
+	public void testBug573937_7() {
+		this.runNegativeTest(
+				new String[] {
+						"X.java",
+						"public class X {\n"
+						+ "	public static void foo(Object o) {\n"
+						+ "		switch (o) {\n"
+						+ "			case String s1:\n"
+						+ "				if (o instanceof String s1) {\n"
+						+ "					System.out.println(s1);\n"
+						+ "				}\n"
+						+ "				break;\n"
+						+ "			default:\n"
+						+ "				break;\n"
+						+ "		}\n"
+						+ "	}\n"
+						+ "} ",
+				},
+				"----------\n" +
+				"1. ERROR in X.java (at line 5)\n" +
+				"	if (o instanceof String s1) {\n" +
+				"	                        ^^\n" +
+				"Duplicate local variable s1\n" +
+				"----------\n");
+	}
+	// Test that when multiple case statements declare pattern variables
+	// with same name, correct ones are used in their respective scopes.
+	public void testBug573937_8() {
+		this.runNegativeTest(
+				new String[] {
+						"X.java",
+						"public class X {\n"
+						+ "	public static void foo(Object o) {\n"
+						+ "		switch (o) {\n"
+						+ "			case String s1:\n"
+						+ "				System.out.println(s1.length());\n"
+						+ "				break;\n"
+						+ "			case Integer s1:\n"
+						+ "				System.out.println(s1.length());\n"
+						+ "				break;\n"
+						+ "			default:\n"
+						+ "				break;\n"
+						+ "		}\n"
+						+ "	}\n"
+						+ "} ",
+				},
+				"----------\n" +
+				"1. ERROR in X.java (at line 8)\n" +
+				"	System.out.println(s1.length());\n" +
+				"	                      ^^^^^^\n" +
+				"The method length() is undefined for the type Integer\n" +
+				"----------\n");
+	}
+	// Test that a pattern variable declared in the preceding case statement
+	// can't be used in the case statement itself
+	public void testBug573937_9() {
+		this.runNegativeTest(
+				new String[] {
+						"X.java",
+						"public class X {\n"
+						+ "	public static void foo(Object o) {\n"
+						+ "		switch (o) {\n"
+						+ "			case Integer i1:\n"
+						+ "				break;\n"
+						+ "			case String s1 && s1.length() > i1:\n"
+						+ "					System.out.println(s1.length());\n"
+						+ "				break;\n"
+						+ "			default:\n"
+						+ "				break;\n"
+						+ "		}\n"
+						+ "	}\n"
+						+ "} ",
+				},
+				"----------\n" +
+				"1. ERROR in X.java (at line 6)\n" +
+				"	case String s1 && s1.length() > i1:\n" +
+				"	                                ^^\n" +
+				"i1 cannot be resolved to a variable\n" +
+				"----------\n");
+	}
+	// Test that redefining pattern variables with null is allowed
+	// and produce expected result (NPE) when run.
+	public void testBug573937_10() {
+		Runner runner = new Runner();
+		runner.testFiles = new String[] {
+				"X.java",
+				"public class X {\n"
+				+ "@SuppressWarnings(\"null\")"
+				+ "	public static void foo(Object o) {\n"
+				+ "		switch (o) {\n"
+				+ "			case String s1 && s1.length() == 0:\n"
+				+ "					break;"
+				+ "			case String s1:\n"
+				+ "					s1 = null;\n"
+				+ "					System.out.println(s1.length());\n"
+				+ "				break;\n"
+				+ "			default:\n"
+				+ "				break;\n"
+				+ "		}\n"
+				+ "	}\n"
+				+ "	public static void main(String[] args) {\n"
+				+ "		foo(\"hello\");\n"
+				+ "	}\n"
+				+ "}",
+		};
+		runner.expectedErrorString = "Exception in thread \"main\" java.lang.NullPointerException: Cannot invoke \"String.length()\" because \"s1\" is null\n" +
+										"	at X.foo(X.java:7)\n" +
+										"	at X.main(X.java:14)";
+		runner.vmArguments = new String[] {"--enable-preview"};
+		runner.customOptions = getCompilerOptions();
+		runner.javacTestOptions = JavacTestOptions.forReleaseWithPreview(SwitchPatternTest.previewLevel);
+		runner.runConformTest();
+	}
+	// Test that a pattern variable is allowed in a switch label throw
+	// statement and when run, produces expected result
+	public void testBug573937_11() {
+		Runner runner = new Runner();
+		runner.testFiles = new String[] {
+				"X.java",
+				"public class X {\n"
+				+ "	public static void foo(Object o) throws Exception {\n"
+				+ "		switch (o) {\n"
+				+ "			case String s1:\n"
+				+ "				throw new Exception(s1);\n"
+				+ "			default:\n"
+				+ "				break;\n"
+				+ "		}\n"
+				+ "	}\n"
+				+ "	public static void main(String[] args) throws Exception {\n"
+				+ "		foo(\"hello\");\n"
+				+ "	}\n"
+				+ "} ",
+		};
+		runner.expectedErrorString = "Exception in thread \"main\" java.lang.Exception: hello\n" +
+				"	at X.foo(X.java:5)\n" +
+				"	at X.main(X.java:11)";
+		runner.vmArguments = new String[] {"--enable-preview"};
+		runner.customOptions = getCompilerOptions();
+		runner.javacTestOptions = JavacTestOptions.forReleaseWithPreview(SwitchPatternTest.previewLevel);
+		runner.runConformTest();
+	}
+	// A non effectively final referenced from the RHS of the guarding expression
+	// is reported by the compiler.
+	public void testBug574612_1() {
+		this.runNegativeTest(
+				new String[] {
+						"X.java",
+						"public class X {\n"
+						+ "	public static void foo(Object o) {\n"
+						+ "		int len = 2;\n"
+						+ "		switch (o) {\n"
+						+ "		case String o1 && o1.length() > len:\n"
+						+ "			len = 0;\n"
+						+ "		break;\n"
+						+ "		default:\n"
+						+ "			break;\n"
+						+ "		}\n"
+						+ "	}\n"
+						+ "} ",
+				},
+				"----------\n" +
+				"1. ERROR in X.java (at line 5)\n" +
+				"	case String o1 && o1.length() > len:\n" +
+				"	                                ^^^\n" +
+				"Local variable len referenced from a guard must be final or effectively final\n" +
+				"----------\n");
+	}
+	// A non effectively final referenced from the LHS of the guarding expression
+	// is reported by the compiler.
+	public void testBug574612_2() {
+		this.runNegativeTest(
+				new String[] {
+						"X.java",
+						"public class X {\n"
+						+ "	public static void foo(Object o) {\n"
+						+ "		int len = 2;\n"
+						+ "		switch (o) {\n"
+						+ "		case String o1 && len < o1.length():\n"
+						+ "			len = 0;\n"
+						+ "		break;\n"
+						+ "		default:\n"
+						+ "			break;\n"
+						+ "		}\n"
+						+ "	}\n"
+						+ "} ",
+				},
+				"----------\n" +
+				"1. ERROR in X.java (at line 5)\n" +
+				"	case String o1 && len < o1.length():\n" +
+				"	                  ^^^\n" +
+				"Local variable len referenced from a guard must be final or effectively final\n" +
+				"----------\n");
+	}
+	// An explicitly final local variable, also referenced in a guarding expression of a pattern
+	// and later on re-assigned is only reported for the explicit final being modified
+	public void testBug574612_3() {
+		this.runNegativeTest(
+				new String[] {
+						"X.java",
+						"public class X {\n"
+						+ "	public static void foo(Object o) {\n"
+						+ "		final int len = 2;\n"
+						+ "		switch (o) {\n"
+						+ "		case String o1 && len < o1.length():\n"
+						+ "			len = 0;\n"
+						+ "		break;\n"
+						+ "		default:\n"
+						+ "			break;\n"
+						+ "		}\n"
+						+ "	}\n"
+						+ "} ",
+				},
+				"----------\n" +
+				"1. ERROR in X.java (at line 6)\n" +
+				"	len = 0;\n" +
+				"	^^^\n" +
+				"The final local variable len cannot be assigned. It must be blank and not using a compound assignment\n" +
+				"----------\n");
+	}
+	public void testBug574612_4() {
+		this.runConformTest(
+				new String[] {
+						"X.java",
+						"public class X {\n"
+						+ "	public static void foo(Object o) {\n"
+						+ "		int len = 2;\n"
+						+ "		switch (o) {\n"
+						+ "		case String o1 && len < o1.length():\n"
+						+ "			System.out.println(o1);\n"
+						+ "		break;\n"
+						+ "		default:\n"
+						+ "			break;\n"
+						+ "		}\n"
+						+ "	}\n"
+						+ "	public static void main(String[] args) throws Exception {\n"
+						+ "		foo(\"hello\");\n"
+						+ "	}\n"
+						+ "} ",
+				},
+				"hello");
+	}
+	public void testBug574719_001() {
+		runConformTest(
+			new String[] {
+				"X.java",
+				"public class X {\n"+
+				" public static int foo(Integer o) {\n"+
+				"   int k = 0;\n"+
+				"   switch (o) {\n"+
+				"     case 0, default   : k = 1;\n"+
+				"   }\n"+
+				"   return k;\n"+
+				" } \n"+
+				" public static void main(String[] args) {\n"+
+				"   System.out.println(foo(100 ));\n"+
+				" }\n"+
+				"}",
+			},
+			"1");
+	}
+	public void testBug574719_002() {
+		runConformTest(
+			new String[] {
+				"X.java",
+				"public class X {\n"+
+				" public static int foo(Integer o) {\n"+
+				"   int k = 0;\n"+
+				"   switch (o) {\n"+
+				"     case 0, default, 1   : k = 1;\n"+
+				"   }\n"+
+				"   return k;\n"+
+				" } \n"+
+				" public static void main(String[] args) {\n"+
+				"   System.out.println(foo(100 ));\n"+
+				" }\n"+
+				"}",
+			},
+			"1");
+	}
+	public void testBug574719_003() {
+		runConformTest(
+			new String[] {
+				"X.java",
+				"public class X {\n"+
+				" public static int foo(Integer o) {\n"+
+				"   int k = 0;\n"+
+				"   switch (o) {\n"+
+				"     case default, 1   : k = 1;\n"+
+				"   }\n"+
+				"   return k;\n"+
+				" } \n"+
+				" public static void main(String[] args) {\n"+
+				"   System.out.println(foo(100));\n"+
+				"   System.out.println(foo(0));\n"+
+				" }\n"+
+				"}",
+			},
+			"1\n" +
+			"1");
+	}
+	public void testBug574719_004() {
+		runConformTest(
+			new String[] {
+				"X.java",
+				"public class X {\n"+
+				" public static int foo(Integer o) {\n"+
+				"   int k = 0;\n"+
+				"   switch (o) {\n"+
+				"     case 0  : k = 2; break;\n"+
+				"     case default, 1   : k = 1;\n"+
+				"   }\n"+
+				"   return k;\n"+
+				" } \n"+
+				" public static void main(String[] args) {\n"+
+				"   System.out.println(foo(100));\n"+
+				"   System.out.println(foo(0));\n"+
+				" }\n"+
+				"}",
+			},
+			"1\n" +
+			"2");
+	}
+	public void testBug574719_005() {
+		runConformTest(
+			new String[] {
+				"X.java",
+				"public class X {\n"+
+				" public static int foo(Integer o) {\n"+
+				"   int k = 0;\n"+
+				"   switch (o) {\n"+
+				"     case 0  : k = 2; break;\n"+
+				"     case 1, default   : k = 1;\n"+
+				"   }\n"+
+				"   return k;\n"+
+				" } \n"+
+				" public static void main(String[] args) {\n"+
+				"   System.out.println(foo(100));\n"+
+				"   System.out.println(foo(0));\n"+
+				" }\n"+
+				"}",
+			},
+			"1\n" +
+			"2");
+	}
+	public void testBug574719_006() {
+		runNegativeTest(
+			new String[] {
+				"X.java",
+				"public class X {\n"+
+				" public static int foo(Integer o) {\n"+
+				"   int k = 0;\n"+
+				"   switch (o) {\n"+
+				"     case 0  : k = 2; break;\n"+
+				"     case 1, default, default   : k = 1;\n"+
+				"   }\n"+
+				"   return k;\n"+
+				" } \n"+
+				" public static void main(String[] args) {\n"+
+				"   System.out.println(foo(100));\n"+
+				"   System.out.println(foo(0));\n"+
+				" }\n"+
+				"}",
+			},
+			"----------\n" +
+			"1. ERROR in X.java (at line 6)\n" +
+			"	case 1, default, default   : k = 1;\n" +
+			"	                       ^^^^^\n" +
+			"The default case is already defined\n" +
+			"----------\n");
+	}
+	public void testBug574719_007() {
+		runConformTest(
+			new String[] {
+				"X.java",
+				"public class X {\n"+
+				" public static int foo(Integer o) {\n"+
+				"   int k = 0;\n"+
+				"   switch (o) {\n"+
+				"     case 10, default: k = 1;break;\n"+
+				"     case 0  : k = 2; break;\n"+
+				"   }\n"+
+				"   return k;\n"+
+				" } \n"+
+				" public static void main(String[] args) {\n"+
+				"   System.out.println(foo(100));\n"+
+				"   System.out.println(foo(0));\n"+
+				"   System.out.println(foo(10));\n"+
+				" }\n"+
+				"}",
+			},
+			"1\n"+
+			"2\n"+
+			"1");
+	}
+	public void testBug574561_001() {
+		runNegativeTest(
+			new String[] {
+				"X.java",
+				"public class X {\n"+
+				" public static int foo(Integer o) {\n"+
+				"   int k = 0;\n"+
+				"   switch (o) {\n"+
+				"     default, default  : k = 2; break;\n"+
+				"   }\n"+
+				"   return k;\n"+
+				" } \n"+
+				" public static void main(String[] args) {\n"+
+				"   System.out.println(foo(100));\n"+
+				"   System.out.println(foo(0));\n"+
+				" }\n"+
+				"}",
+			},
+			"----------\n" +
+			"1. ERROR in X.java (at line 5)\n" +
+			"	default, default  : k = 2; break;\n" +
+			"	       ^\n" +
+			"Syntax error on token \",\", : expected\n" +
+			"----------\n");
+	}
+	public void testBug574561_002() {
+		runNegativeTest(
+			new String[] {
+				"X.java",
+				"public class X {\n"+
+				" public static int foo(Integer o) {\n"+
+				"   int k = 0;\n"+
+				"   switch (o) {\n"+
+				"     case default, 1, default   : k = 1;\n"+
+				"   }\n"+
+				"   return k;\n"+
+				" } \n"+
+				" public static void main(String[] args) {\n"+
+				"   System.out.println(foo(100));\n"+
+				"   System.out.println(foo(0));\n"+
+				" }\n"+
+				"}",
+			},
+			"----------\n" +
+			"1. ERROR in X.java (at line 5)\n" +
+			"	case default, 1, default   : k = 1;\n" +
+			"	                       ^^^^^\n" +
+			"The default case is already defined\n" +
+			"----------\n");
+	}
+	public void testBug574561_003() {
+		runNegativeTest(
+			new String[] {
+				"X.java",
+				"public class X {\n"+
+				" public static int foo(Integer o) {\n"+
+				"   int k = 0;\n"+
+				"   switch (o) {\n"+
+				"     case default, 1, default   : k = 1;\n"+
+				"   }\n"+
+				"   return k;\n"+
+				" } \n"+
+				" public static void main(String[] args) {\n"+
+				"   System.out.println(foo(100));\n"+
+				"   System.out.println(foo(0));\n"+
+				" }\n"+
+				"}",
+			},
+			"----------\n" +
+			"1. ERROR in X.java (at line 5)\n" +
+			"	case default, 1, default   : k = 1;\n" +
+			"	                       ^^^^^\n" +
+			"The default case is already defined\n" +
+			"----------\n");
+	}
+	public void testBug574793_001() {
+		runNegativeTest(
+			new String[] {
+				"X.java",
+				"public class X {\n"+
+				" public static void main(String[] args) {}\n"+
+				" private static void foo1(int o) {\n"+
+				"   switch (o) {\n"+
+				"     case null  -> System.out.println(\"null\");\n"+
+				"     case 20  -> System.out.println(\"20\");\n"+
+				"   }\n"+
+				" }\n"+
+				" private static void foo(Object o) {\n"+
+				"   switch (o) {\n"+
+				"   case \"F\"  :\n"+
+				"     break;\n"+
+				"   case 2 :\n"+
+				"     break;\n"+
+				"   default:\n"+
+				"     break;\n"+
+				"   }\n"+
+				" }\n"+
+				"}",
+			},
+			"----------\n" +
+			"1. ERROR in X.java (at line 5)\n" +
+			"	case null  -> System.out.println(\"null\");\n" +
+			"	     ^^^^\n" +
+			"Type mismatch: cannot convert from null to int\n" +
+			"----------\n" +
+			"2. ERROR in X.java (at line 11)\n" +
+			"	case \"F\"  :\n" +
+			"	     ^^^\n" +
+			"The constant case label element is not compatible with switch expression type Object\n" +
+			"----------\n" +
+			"3. ERROR in X.java (at line 13)\n" +
+			"	case 2 :\n" +
+			"	     ^\n" +
+			"The constant case label element is not compatible with switch expression type Object\n" +
+			"----------\n");
+	}
+	public void testBug574559_001() {
+		runNegativeTest(
+			new String[] {
+				"X.java",
+				"public class X {\n"+
+				" public static void main(String[] args) {}\n"+
+				" private static void foo1(Integer o) {\n"+
+				"   switch (o) {\n"+
+				"     case 1, Integer i  -> System.out.println(o);\n"+
+				"   }\n"+
+				" }\n"+
+				"}",
+			},
+			"----------\n" +
+			"1. ERROR in X.java (at line 5)\n" +
+			"	case 1, Integer i  -> System.out.println(o);\n" +
+			"	        ^^^^^^^^^\n" +
+			"Constant case label elements and pattern case label elements cannot be present in a switch label\n" +
+			"----------\n");
+	}
+	public void testBug574559_002() {
+		runNegativeTest(
+			new String[] {
+				"X.java",
+				"public class X {\n"+
+				" public static void main(String[] args) {}\n"+
+				" private static void foo1(Integer o) {\n"+
+				"   switch (o) {\n"+
+				"     case  Integer i, 30  -> System.out.println(o);\n"+
+				"   }\n"+
+				" }\n"+
+				"}",
+			},
+			"----------\n" +
+			"1. ERROR in X.java (at line 5)\n" +
+			"	case  Integer i, 30  -> System.out.println(o);\n" +
+			"	                 ^^\n" +
+			"Constant case label elements and pattern case label elements cannot be present in a switch label\n" +
+			"----------\n");
+	}
+	// Test that fall-through to a pattern is not allowed (label statement group has one statement)
+	public void testBug573940_1() {
+		runNegativeTest(
+				new String[] {
+					"X.java",
+					"public class X {\n"+
+					"public void foo(Number n) {\n"
+					+ "	switch (n) {\n"
+					+ "	case Integer i :\n"
+					+ "		System.out.println(i);\n"
+					+ "	case Float f :\n"
+					+ "		System.out.println(f);\n"
+					+ "	}\n"
+					+ "}\n"+
+					"}",
+				},
+				"----------\n" +
+				"1. ERROR in X.java (at line 6)\n" +
+				"	case Float f :\n" +
+				"	^^^^^^^^^^^^\n" +
+				"Illegal fall-through to a pattern case label \n" +
+				"----------\n");
+	}
+	// Test that fall-through to a pattern is not allowed (label statement group has zero statement)
+	public void testBug573940_2() {
+		runNegativeTest(
+				new String[] {
+					"X.java",
+					"public class X {\n"+
+					"public void foo(Number n) {\n"
+					+ "	switch (n) {\n"
+					+ "	case Integer i :\n"
+					+ "	case Float f :\n"
+					+ "		System.out.println(f);\n"
+					+ "     break;\n"
+					+ "	}\n"
+					+ "}\n"+
+					"}",
+				},
+				"----------\n" +
+				"1. ERROR in X.java (at line 5)\n" +
+				"	case Float f :\n" +
+				"	^^^^^^^^^^^^\n" +
+				"Illegal fall-through to a pattern case label \n" +
+				"----------\n");
+	}
+	// Test that fall-through to a pattern is not allowed (label statement group has zero statement)
+	public void testBug573940_2a() {
+		runNegativeTest(
+				new String[] {
+					"X.java",
+					"public class X {\n"+
+					"public void foo(Number n) {\n"
+					+ "	switch (n) {\n"
+					+ "	default :\n"
+					+ "	case Float f :\n"
+					+ "		System.out.println(f);\n"
+					+ "     break;\n"
+					+ "	}\n"
+					+ "}\n"+
+					"}",
+				},
+				"----------\n" +
+				"1. ERROR in X.java (at line 5)\n" +
+				"	case Float f :\n" +
+				"	^^^^^^^^^^^^\n" +
+				"Illegal fall-through to a pattern case label \n" +
+				"----------\n");
+	}
+	// Test that falling through from a pattern to a default is allowed
+	public void testBug573940_3() {
+		runConformTest(
+				new String[] {
+					"X.java",
+					"public class X {\n"
+					+ "public static void foo(Number n) {\n"
+					+ "		switch (n) {\n"
+					+ "		case Integer i :\n"
+					+ "			System.out.println(i);\n"
+					+ "		default:\n"
+					+ "			System.out.println(\"null\");\n"
+					+ "		}\n"
+					+ "	}\n"
+					+ "public static void main(String[] args) {\n"
+					+ "		foo(Integer.valueOf(5));\n"
+					+ "	}\n"
+					+ "}",
+				},
+				"5\n" +
+				"null");
+	}
+	// Test that a case statement with pattern is allowed when statement group ends
+	// with an Throw statement instead of a break statement
+	public void testBug573940_4() {
+		runConformTest(
+				new String[] {
+					"X.java",
+					"public class X {\n"
+					+ "public static void foo(Number n) {\n"
+					+ "		switch (n) {\n"
+					+ "		case Integer i :\n"
+					+ "			throw new IllegalArgumentException();\n"
+					+ "		default:\n"
+					+ "			System.out.println(\"null\");\n"
+					+ "		}\n"
+					+ "	}\n"
+					+ "public static void main(String[] args) {\n"
+					+ "		try{\n"
+					+ "			foo(Integer.valueOf(5));\n"
+					+ "		} catch(Exception t) {\n"
+					+ "		 	t.printStackTrace();\n"
+					+ "		}\n"
+					+ "	}\n"
+					+ "}",
+				},
+				"",
+				"java.lang.IllegalArgumentException\n" +
+				"	at X.foo(X.java:5)\n" +
+				"	at X.main(X.java:12)");
+	}
+	// Test that switch expression with pattern variables is reported when a case statement
+	// doesn't return any value.
+	public void testBug573940_5() {
+		runNegativeTest(
+				new String[] {
+					"X.java",
+					"public class X {\n"
+					+ "	public static void foo(Number n) {\n"
+					+ "		int j = \n"
+					+ "			switch (n) {\n"
+					+ "			case Integer i -> {\n"
+					+ "			}\n"
+					+ "			default -> {\n"
+					+ "				yield 1;\n"
+					+ "			}\n"
+					+ "		};\n"
+					+ "	}\n"
+					+ "}",
+				},
+				"----------\n" +
+				"1. ERROR in X.java (at line 6)\n" +
+				"	}\n" +
+				"	^^\n" +
+				"A switch labeled block in a switch expression should not complete normally\n" +
+				"----------\n");
+	}
+	public void testBug574564_001() {
+		runNegativeTest(
+			new String[] {
+				"X.java",
+				"public class X {\n"+
+				" public static void main(String[] args) {\n"+
+				"   foo(new String(\"Hello\"));\n"+
+				" }\n"+
+				" private static void foo(Object o) {\n"+
+				"   switch (o) {\n"+
+				"     case var i  -> System.out.println(0);\n"+
+				"     default -> System.out.println(o);\n"+
+				"   }\n"+
+				" }\n"+
+				"}",
+			},
+			"----------\n" +
+			"1. ERROR in X.java (at line 7)\n" +
+			"	case var i  -> System.out.println(0);\n" +
+			"	     ^^^\n" +
+			"'var' is not allowed here\n" +
+			"----------\n");
+	}
+	public void testBug574564_002() {
+		runNegativeTest(
+			new String[] {
+				"X.java",
+				"public class X {\n"+
+				" public static void main(String[] args) {\n"+
+				"   foo(new String(\"Hello\"));\n"+
+				" }\n"+
+				" private static void foo(Object o) {\n"+
+				"   switch (o) {\n"+
+				"     case var i, var j, var k  -> System.out.println(0);\n"+
+				"     default -> System.out.println(o);\n"+
+				"   }\n"+
+				" }\n"+
+				"}",
+			},
+			"----------\n" +
+			"1. ERROR in X.java (at line 7)\n" +
+			"	case var i, var j, var k  -> System.out.println(0);\n" +
+			"	     ^^^\n" +
+			"\'var\' is not allowed here\n" +
+			"----------\n" +
+			"2. ERROR in X.java (at line 7)\n" +
+			"	case var i, var j, var k  -> System.out.println(0);\n" +
+			"	            ^^^\n" +
+			"\'var\' is not allowed here\n" +
+			"----------\n" +
+			"3. ERROR in X.java (at line 7)\n" +
+			"	case var i, var j, var k  -> System.out.println(0);\n" +
+			"	            ^^^^^\n" +
+			"A switch label may not have more than one pattern case label element.\n" +
+			"----------\n" +
+			"4. ERROR in X.java (at line 7)\n" +
+			"	case var i, var j, var k  -> System.out.println(0);\n" +
+			"	                   ^^^\n" +
+			"\'var\' is not allowed here\n" +
+			"----------\n" +
+			"5. ERROR in X.java (at line 7)\n" +
+			"	case var i, var j, var k  -> System.out.println(0);\n" +
+			"	                   ^^^^^\n" +
+			"A switch label may not have more than one pattern case label element.\n" +
+			"----------\n");
+	}
+	public void testBug574564_003() {
+		runNegativeTest(
+			new String[] {
+				"X.java",
+				"public class X {\n"+
+				" public static void main(String[] args) {\n"+
+				"   foo(10);\n"+
+				" }\n"+
+				" private static void foo(Integer o) {\n"+
+				"   switch (o) {\n"+
+				"     case var i, 10  -> System.out.println(0);\n"+
+				"     default -> System.out.println(o);\n"+
+				"   }\n"+
+				" }\n"+
+				"}",
+			},
+			"----------\n" +
+			"1. ERROR in X.java (at line 7)\n" +
+			"	case var i, 10  -> System.out.println(0);\n" +
+			"	     ^^^\n" +
+			"\'var\' is not allowed here\n" +
+			"----------\n" +
+			"2. ERROR in X.java (at line 7)\n" +
+			"	case var i, 10  -> System.out.println(0);\n" +
+			"	            ^^\n" +
+			"Constant case label elements and pattern case label elements cannot be present in a switch label\n" +
+			"----------\n");
+	}
+	public void testBug574564_004() {
+		runNegativeTest(
+			new String[] {
+				"X.java",
+				"public class X {\n"+
+				" public static void main(String[] args) {\n"+
+				"   foo(10);\n"+
+				" }\n"+
+				" private static void foo(Integer o) {\n"+
+				"   switch (o) {\n"+
+				"     case var i, 10, var k  -> System.out.println(0);\n"+
+				"     default -> System.out.println(o);\n"+
+				"   }\n"+
+				" }\n"+
+				"}",
+			},
+			"----------\n" +
+			"1. ERROR in X.java (at line 7)\n" +
+			"	case var i, 10, var k  -> System.out.println(0);\n" +
+			"	     ^^^\n" +
+			"\'var\' is not allowed here\n" +
+			"----------\n" +
+			"2. ERROR in X.java (at line 7)\n" +
+			"	case var i, 10, var k  -> System.out.println(0);\n" +
+			"	            ^^\n" +
+			"Constant case label elements and pattern case label elements cannot be present in a switch label\n" +
+			"----------\n" +
+			"3. ERROR in X.java (at line 7)\n" +
+			"	case var i, 10, var k  -> System.out.println(0);\n" +
+			"	                ^^^\n" +
+			"\'var\' is not allowed here\n" +
+			"----------\n" +
+			"4. ERROR in X.java (at line 7)\n" +
+			"	case var i, 10, var k  -> System.out.println(0);\n" +
+			"	                ^^^^^\n" +
+			"A switch label may not have more than one pattern case label element.\n" +
+			"----------\n");
+	}
+	public void testBug574564_005() {
+		runNegativeTest(
+			new String[] {
+				"X.java",
+				"public class X {\n"+
+				" public static void main(String[] args) {\n"+
+				"   foo(10);\n"+
+				" }\n"+
+				" private static void foo(Integer o) {\n"+
+				"   switch (o) {\n"+
+				"     case  10, null, var k  -> System.out.println(0);\n"+
+				"     default -> System.out.println(o);\n"+
+				"   }\n"+
+				" }\n"+
+				"}",
+			},
+			"----------\n" +
+			"1. ERROR in X.java (at line 7)\n" +
+			"	case  10, null, var k  -> System.out.println(0);\n" +
+			"	                ^^^\n" +
+			"\'var\' is not allowed here\n" +
+			"----------\n" +
+			"2. ERROR in X.java (at line 7)\n" +
+			"	case  10, null, var k  -> System.out.println(0);\n" +
+			"	                ^^^^^\n" +
+			"Constant case label elements and pattern case label elements cannot be present in a switch label\n" +
+			"----------\n");
+	}
+	public void testBug574564_006() {
+		runNegativeTest(
+			new String[] {
+				"X.java",
+				"public class X {\n"+
+				" public static void main(String[] args) {\n"+
+				"   foo(10);\n"+
+				" }\n"+
+				" private static void foo(Integer o) {\n"+
+				"   switch (o) {\n"+
+				"     case  default, var k  -> System.out.println(0);\n"+
+				"     default -> System.out.println(o);\n"+
+				"   }\n"+
+				" }\n"+
+				"}",
+			},
+			"----------\n" +
+			"1. ERROR in X.java (at line 7)\n" +
+			"	case  default, var k  -> System.out.println(0);\n" +
+			"	               ^^^\n" +
+			"\'var\' is not allowed here\n" +
+			"----------\n" +
+			"2. ERROR in X.java (at line 7)\n" +
+			"	case  default, var k  -> System.out.println(0);\n" +
+			"	               ^^^^^\n" +
+			"A switch label may not have both a pattern case label element and a default case label element.\n" +
+			"----------\n" +
+			"3. ERROR in X.java (at line 8)\n" +
+			"	default -> System.out.println(o);\n" +
+			"	^^^^^^^\n" +
+			"The default case is already defined\n" +
+			"----------\n");
+	}
+	public void testBug574564_007() {
+		runNegativeTest(
+			new String[] {
+				"X.java",
+				"public class X {\n"+
+				" public static void main(String[] args) {\n"+
+				"   foo(10);\n"+
+				" }\n"+
+				" private static void foo(Integer o) {\n"+
+				"   switch (o) {\n"+
+				"     case  default, default, var k  -> System.out.println(0);\n"+
+				"     default -> System.out.println(o);\n"+
+				"   }\n"+
+				" }\n"+
+				"}",
+			},
+			"----------\n" +
+			"1. ERROR in X.java (at line 7)\n" +
+			"	case  default, default, var k  -> System.out.println(0);\n" +
+			"	                     ^^^^^^^^\n" +
+			"The default case is already defined\n" +
+			"----------\n" +
+			"2. ERROR in X.java (at line 7)\n" +
+			"	case  default, default, var k  -> System.out.println(0);\n" +
+			"	                        ^^^\n" +
+			"\'var\' is not allowed here\n" +
+			"----------\n" +
+			"3. ERROR in X.java (at line 7)\n" +
+			"	case  default, default, var k  -> System.out.println(0);\n" +
+			"	                        ^^^^^\n" +
+			"A switch label may not have both a pattern case label element and a default case label element.\n" +
+			"----------\n" +
+			"4. ERROR in X.java (at line 8)\n" +
+			"	default -> System.out.println(o);\n" +
+			"	^^^^^^^\n" +
+			"The default case is already defined\n" +
+			"----------\n");
+	}
+	public void testBug574564_008() {
+		runNegativeTest(
+			new String[] {
+				"X.java",
+				"public class X {\n"+
+				" public static void main(String[] args) {\n"+
+				"   foo(10);\n"+
+				" }\n"+
+				" private static void foo(Integer o) {\n"+
+				"   switch (o) {\n"+
+				"     case  default, 1, var k  -> System.out.println(0);\n"+
+				"     default -> System.out.println(o);\n"+
+				"   }\n"+
+				" }\n"+
+				"}",
+			},
+			"----------\n" +
+			"1. ERROR in X.java (at line 7)\n" +
+			"	case  default, 1, var k  -> System.out.println(0);\n" +
+			"	                  ^^^\n" +
+			"\'var\' is not allowed here\n" +
+			"----------\n" +
+			"2. ERROR in X.java (at line 7)\n" +
+			"	case  default, 1, var k  -> System.out.println(0);\n" +
+			"	                  ^^^^^\n" +
+			"A switch label may not have both a pattern case label element and a default case label element.\n" +
+			"----------\n" +
+			"3. ERROR in X.java (at line 7)\n" +
+			"	case  default, 1, var k  -> System.out.println(0);\n" +
+			"	                  ^^^^^\n" +
+			"Constant case label elements and pattern case label elements cannot be present in a switch label\n" +
+			"----------\n" +
+			"4. ERROR in X.java (at line 8)\n" +
+			"	default -> System.out.println(o);\n" +
+			"	^^^^^^^\n" +
+			"The default case is already defined\n" +
+			"----------\n");
+	}
+	public void testBug574564_009() {
+		runNegativeTest(
+			new String[] {
+				"X.java",
+				"public class X {\n"+
+				" private static void foo(Object o) {\n"+
+				"   switch (o) {\n"+
+				"     case String s, default, Integer i  -> System.out.println(0);\n"+
+				"   }\n"+
+				" }\n"+
+				"}",
+			},
+			"----------\n" +
+			"1. ERROR in X.java (at line 4)\n" +
+			"	case String s, default, Integer i  -> System.out.println(0);\n" +
+			"	                      ^\n" +
+			"A switch label may not have both a pattern case label element and a default case label element.\n" +
+			"----------\n" +
+			"2. ERROR in X.java (at line 4)\n" +
+			"	case String s, default, Integer i  -> System.out.println(0);\n" +
+			"	                        ^^^^^^^^^\n" +
+			"A switch label may not have more than one pattern case label element.\n" +
+			"----------\n");
+	}
+	public void testBug574564_010() {
+		Map<String, String> options = getCompilerOptions();
+		options.put(CompilerOptions.OPTION_EnablePreviews, CompilerOptions.DISABLED);
+		runNegativeTest(
+			new String[] {
+				"X.java",
+				"public class X {\n"+
+				" private static void foo(Object o) {\n"+
+				"   switch (o) {\n"+
+				"     case String s, default, Integer i  -> System.out.println(0);\n"+
+				"   }\n"+
+				" }\n"+
+				"}",
+			},
+			"----------\n" +
+			"1. ERROR in X.java (at line 4)\n" +
+			"	case String s, default, Integer i  -> System.out.println(0);\n" +
+			"	            ^\n" +
+			"Syntax error on token \"s\", delete this token\n" +
+			"----------\n" +
+			"2. ERROR in X.java (at line 4)\n" +
+			"	case String s, default, Integer i  -> System.out.println(0);\n" +
+			"	                                ^\n" +
+			"Syntax error on token \"i\", delete this token\n" +
+			"----------\n",
+			null,
+			true,
+			options);
+	}
+	public void testBug574564_011() {
+		Map<String, String> options = getCompilerOptions();
+		options.put(CompilerOptions.OPTION_EnablePreviews, CompilerOptions.DISABLED);
+		runNegativeTest(
+			new String[] {
+				"X.java",
+				"public class X {\n"+
+				" private static void foo(Integer o) {\n"+
+				"   switch (o) {\n"+
+				"     case null  -> System.out.println(0);\n"+
+				"   }\n"+
+				" }\n"+
+				"}",
+			},
+			"----------\n" +
+			"1. ERROR in X.java (at line 4)\n" +
+			"	case null  -> System.out.println(0);\n" +
+			"	     ^^^^\n" +
+			"Pattern Matching in Switch is a preview feature and disabled by default. Use --enable-preview to enable\n" +
+			"----------\n",
+			null,
+			true,
+			options);
+	}
+	public void testBug574564_012() {
+		Map<String, String> options = getCompilerOptions();
+		options.put(CompilerOptions.OPTION_EnablePreviews, CompilerOptions.DISABLED);
+		runNegativeTest(
+			new String[] {
+				"X.java",
+				"public class X {\n"+
+				" private static void foo(Integer o) {\n"+
+				"   switch (o) {\n"+
+				"     case 1, default, null  -> System.out.println(0);\n"+
+				"   }\n"+
+				" }\n"+
+				"}",
+			},
+			"----------\n" +
+			"1. ERROR in X.java (at line 4)\n" +
+			"	case 1, default, null  -> System.out.println(0);\n" +
+			"	               ^\n" +
+			"Pattern Matching in Switch is a preview feature and disabled by default. Use --enable-preview to enable\n" +
+			"----------\n" +
+			"2. ERROR in X.java (at line 4)\n" +
+			"	case 1, default, null  -> System.out.println(0);\n" +
+			"	                 ^^^^\n" +
+			"Pattern Matching in Switch is a preview feature and disabled by default. Use --enable-preview to enable\n" +
+			"----------\n",
+			null,
+			true,
+			options);
+	}
+	public void testBug574564_013() {
+		runNegativeTest(
+			new String[] {
+				"X.java",
+				"public class X {\n"+
+				" private static void foo(Object o) {\n"+
+				"   switch (o) {\n"+
+				"     case default, default -> System.out.println(0);\n"+
+				"   }\n"+
+				" }\n"+
+				"}",
+			},
+			"----------\n" +
+			"1. ERROR in X.java (at line 4)\n" +
+			"	case default, default -> System.out.println(0);\n" +
+			"	              ^^^^^^^\n" +
+			"Syntax error on token \"default\", -> expected after this token\n" +
+			"----------\n");
+	}
+	public void testBug574563_001() {
+		runNegativeTest(
+			new String[] {
+				"X.java",
+				"public class X {\n"+
+				" public static void main(String[] args) {}\n"+
+				" private static void foo1(Integer o) {\n"+
+				"   switch (o) {\n"+
+				"     case null, null  -> System.out.println(o);\n"+
+				"     default  -> System.out.println(o);\n"+
+				"   }\n"+
+				" }\n"+
+				"}",
+			},
+			"----------\n" +
+			"1. ERROR in X.java (at line 5)\n" +
+			"	case null, null  -> System.out.println(o);\n" +
+			"	^^^^^^^^^^^^^^^\n" +
+			"Duplicate case\n" +
+			"----------\n");
+	}
+	public void testBug574563_002() {
+		runNegativeTest(
+			new String[] {
+				"X.java",
+				"public class X {\n"+
+				" private static void foo(Object o) {\n"+
+				"   switch (o) {\n"+
+				"     case null, Integer i  -> System.out.println(0);\n"+
+				"     default -> System.out.println(o);\n"+
+				"   }\n"+
+				"   Zork();\n"+
+				" }\n"+
+				"}",
+			},
+			"----------\n" +
+			"1. ERROR in X.java (at line 7)\n" +
+			"	Zork();\n" +
+			"	^^^^\n" +
+			"The method Zork() is undefined for the type X\n" +
+			"----------\n");
+	}
+	public void testBug574563_003() {
+		runNegativeTest(
+			new String[] {
+				"X.java",
+				"public class X {\n"+
+				" private static void foo(Object o) {\n"+
+				"   switch (o) {\n"+
+				"     case Integer i, null  -> System.out.println(0);\n"+
+				"     default -> System.out.println(o);\n"+
+				"   }\n"+
+				"   Zork();\n"+
+				" }\n"+
+				"}",
+			},
+			"----------\n" +
+			"1. ERROR in X.java (at line 7)\n" +
+			"	Zork();\n" +
+			"	^^^^\n" +
+			"The method Zork() is undefined for the type X\n" +
+			"----------\n");
+	}
+	public void testBug574563_004() {
+		runNegativeTest(
+			new String[] {
+				"X.java",
+				"public class X {\n"+
+				" private static void foo(Object o) {\n"+
+				"   switch (o) {\n"+
+				"     case null, Integer i && i > 10 -> System.out.println(0);\n"+
+				"     default -> System.out.println(o);\n"+
+				"   }\n"+
+				"   Zork();\n"+
+				" }\n"+
+				"}",
+			},
+			"----------\n" +
+			"1. ERROR in X.java (at line 4)\n" +
+			"	case null, Integer i && i > 10 -> System.out.println(0);\n" +
+			"	           ^^^^^^^^^^^^^^^^^^^\n" +
+			"A null case label and patterns can co-exist only if the pattern is a type pattern\n" +
+			"----------\n" +
+			"2. ERROR in X.java (at line 7)\n" +
+			"	Zork();\n" +
+			"	^^^^\n" +
+			"The method Zork() is undefined for the type X\n" +
+			"----------\n");
+	}
+	public void testBug574563_005() {
+		runNegativeTest(
+			new String[] {
+				"X.java",
+				"public class X {\n"+
+				" private static void foo(Object o) {\n"+
+				"   switch (o) {\n"+
+				"     case Integer i && i > 10, null  -> System.out.println(0);\n"+
+				"     default -> System.out.println(o);\n"+
+				"   }\n"+
+				"   Zork();\n"+
+				" }\n"+
+				"}",
+			},
+			"----------\n" +
+			"1. ERROR in X.java (at line 4)\n" +
+			"	case Integer i && i > 10, null  -> System.out.println(0);\n" +
+			"	                          ^^^^\n" +
+			"A null case label and patterns can co-exist only if the pattern is a type pattern\n" +
+			"----------\n" +
+			"2. ERROR in X.java (at line 7)\n" +
+			"	Zork();\n" +
+			"	^^^^\n" +
+			"The method Zork() is undefined for the type X\n" +
+			"----------\n");
+	}
+	public void testBug575030_01() {
+		this.runConformTest(
+				new String[] {
+					"X.java",
+					"public class X {\n"+
+					" public static void main(String[] args) {\n"+
+					"   foo(\"Hello World!\");\n"+
+					" }\n"+
+					"\n"+
+					" private static void foo(String o) {\n"+
+					"   switch (o) {\n"+
+					"     case String s -> System.out.println(s);\n"+
+					"   }\n"+
+					" }\n"+
+					"}",
+				},
+				"Hello World!");
+	}
+	public void testBug574614_001() {
+		runConformTest(
+			new String[] {
+				"X.java",
+				"public class X {\n"+
+				" public static void main(String[] args) {\n"+
+				"   foo(Long.valueOf(10));\n"+
+				" }\n"+
+				" private static void foo(Object o) {\n"+
+				"   String s1 = \" Hello \";\n"+
+				"   String s2 = \"World!\";\n"+
+				"   switch (o) {\n"+
+				"     case Integer I && I > 10: break;\n"+
+				"      case X J: break;\n"+
+				"      case String s : break;\n"+
+				"      default:\n"+
+				"       s1 = new StringBuilder(String.valueOf(s1)).append(String.valueOf(s2)).toString();\n"+
+				"       System.out.println(s1);\n"+
+				"       break; \n"+
+				"   }\n"+
+				" }\n"+
+				"}",
+			},
+			"Hello World!");
+	}
+	public void testBug574614_002() {
+		runConformTest(
+			new String[] {
+				"X.java",
+				"public class X {\n"+
+				" public static void main(String[] args) {\n"+
+				"   foo(Long.valueOf(0));\n"+
+				" }\n"+
+				" private static void foo(Object o) {\n"+
+				"   switch (o) {\n"+
+				"     case Integer I:\n"+
+				"       break;\n"+
+				"      case String s :\n"+
+				"       break;\n"+
+				"      case X J:\n"+
+				"       break;\n"+
+				"      default:\n"+
+				"       String s1 = \"Hello \";\n"+
+				"       String s2 = \"World!\";\n"+
+				"       s1 = s1 +s2; \n"+
+				"       System.out.println(s1);\n"+
+				"       break;\n"+
+				"   }\n"+
+				" } \n"+
+				"}",
+			},
+			"Hello World!");
+	}
+	public void testBug573921_1() {
+		runNegativeTest(
+				new String[] {
+					"X.java",
+					"public class X {\n"+
+					" private static void foo(Object o) {\n"+
+					"		switch(o) {\n" +
+					"			case CharSequence cs ->\n" +
+					"			System.out.println(\"A sequence of length \" + cs.length());\n" +
+					"			case String s && s.length() > 0 -> \n" +
+					"			System.out.println(\"A string: \" + s);\n" +
+					"			default -> {\n" +
+					"				break;\n" +
+					"			} \n" +
+					"		}\n"+
+					" }\n"+
+					"}",
+				},
+				"----------\n" +
+				"1. ERROR in X.java (at line 4)\n" +
+				"	case CharSequence cs ->\n" +
+				"	     ^^^^^^^^^^^^^^^\n" +
+				"This pattern dominates one or more of the following patterns\n" +
+				"----------\n");
+	}
+	public void testBug573921_2() {
+		runNegativeTest(
+				new String[] {
+					"X.java",
+					"public class X {\n"+
+					" private static void foo(Object o) {\n"+
+					"		switch(o) {\n" +
+					"			case CharSequence cs:\n" +
+					"				System.out.println(\"A sequence of length \" + cs.length());\n" +
+					"				break;\n" +
+					"			case String s:\n" +
+					"				System.out.println(\"A string: \" + s);\n" +
+					"				break;\n" +
+					"			default: \n" +
+					"				break;\n" +
+					"		}\n"+
+					" }\n"+
+					"}",
+				},
+				"----------\n" +
+				"1. ERROR in X.java (at line 4)\n" +
+				"	case CharSequence cs:\n" +
+				"	     ^^^^^^^^^^^^^^^\n" +
+				"This pattern dominates one or more of the following patterns\n" +
+				"----------\n");
+	}
+	public void testBug573921_3() {
+		runConformTest(
+				new String[] {
+					"X.java",
+					"public class X {\n"+
+					" public static void main(String[] args) {\n"+
+					"   foo(\"Hello!\");\n"+
+					" }\n"+
+					" private static void foo(Object o) {\n"+
+					"		switch(o) {\n" +
+					"			case String s:\n" +
+					"				System.out.println(\"String:\" + s);\n" +
+					"				break;\n" +
+					"			case CharSequence cs:\n" +
+					"				System.out.println(\"A CS:\" + cs);\n" +
+					"				break;\n" +
+					"			default: \n" +
+					"				break;\n" +
+					"		}\n"+
+					" }\n"+
+					"}",
+				},
+				"String:Hello!");
+	}
+	public void testBug573921_4() {
+		runConformTest(
+				new String[] {
+					"X.java",
+					"public class X {\n"+
+					" public static void main(String[] args) {\n"+
+					"   foo(new StringBuffer(\"Hello!\"));\n"+
+					" }\n"+
+					" private static void foo(Object o) {\n"+
+					"		switch(o) {\n" +
+					"			case String s:\n" +
+					"				System.out.println(\"String:\" + s);\n" +
+					"				break;\n" +
+					"			case CharSequence cs:\n" +
+					"				System.out.println(\"A CS:\" + cs.toString());\n" +
+					"				break;\n" +
+					"			default: \n" +
+					"				break;\n" +
+					"		}\n"+
+					" }\n"+
+					"}",
+				},
+				"A CS:Hello!");
+	}
+	public void testBug573921_5() {
+		runConformTest(
+				new String[] {
+					"X.java",
+					"public class X {\n"+
+					" public static void main(String[] args) {\n"+
+					"   foo(\"Hello\");\n"+
+					" }\n"+
+					" private static void foo(Object o) {\n"+
+					"		switch(o) {\n" +
+					"		case String s && s.length() < 5 :\n" +
+					"			System.out.println(\"1:\" + s);\n" +
+					"			break;\n" +
+					"		case String s && s.length() == 5:\n" +
+					"			System.out.println(\"2:\" + s);\n" +
+					"			break;\n" +
+					"		default : System.out.println(\"Object\");\n" +
+					"	}\n"+
+					" }\n"+
+					"}",
+				},
+				"2:Hello");
+	}
+	public void testBug573921_6() {
+		runConformTest(
+				new String[] {
+					"X.java",
+					"public class X {\n"+
+					" public static void main(String[] args) {\n"+
+					"   foo(\"\");\n"+
+					" }\n"+
+					" private static void foo(Object o) {\n"+
+					"		switch(o) {\n" +
+					"		case String s && s.length() < 5 :\n" +
+					"			System.out.println(\"1:\" + s);\n" +
+					"			break;\n" +
+					"		case String s && s.length() == 5:\n" +
+					"			System.out.println(\"2:\" + s);\n" +
+					"			break;\n" +
+					"		default : System.out.println(\"Object\");\n" +
+					"	}\n"+
+					" }\n"+
+					"}",
+				},
+				"1:");
+	}
+	public void testBug573921_7() {
+		runNegativeTest(
+				new String[] {
+					"X.java",
+					"import java.util.*;\n" +
+					"public class X {\n"+
+					" @SuppressWarnings(\"rawtypes\")\n" +
+					" private static void foo(Object o) {\n"+
+					"		switch(o) {\n"+
+					"		case List cs:\n"+
+					"			System.out.println(\"A sequence of length \" + cs.size());\n"+
+					"			break;\n"+
+					"		case List<String> s: \n"+
+					"			System.out.println(\"A string: \" + s);\n"+
+					"			break;\n"+
+					"		} "+
+					" }\n"+
+					"}",
+				},
+				"----------\n" +
+				"1. ERROR in X.java (at line 6)\n" +
+				"	case List cs:\n" +
+				"	     ^^^^^^^\n" +
+				"This pattern dominates one or more of the following patterns\n" +
+				"----------\n" +
+				"2. ERROR in X.java (at line 9)\n" +
+				"	case List<String> s: \n" +
+				"	     ^^^^^^^^^^^^^^\n" +
+				"Type Object cannot be safely cast to List<String>\n" +
+				"----------\n");
+	}
+	public void testBug573921_8() {
+		runNegativeTest(
+				new String[] {
+					"X.java",
+					"import java.util.*;\n" +
+					"public class X {\n"+
+					" @SuppressWarnings(\"rawtypes\")\n" +
+					" private static void foo(Object o) {\n"+
+					"		switch(o.hashCode()) {\n"+
+					"		case String s:\n"+
+					"			break;\n"+
+					"		default: \n"+
+					"			break;\n"+
+					"		} "+
+					" }\n"+
+					"}",
+				},
+				"----------\n" +
+				"1. ERROR in X.java (at line 6)\n" +
+				"	case String s:\n" +
+				"	     ^^^^^^^^\n" +
+				"Type mismatch: cannot convert from int to String\n" +
+				"----------\n");
+	}
+	public void testBug573921_9() {
+		runNegativeTest(
+				new String[] {
+					"X.java",
+					"import java.util.*;\n" +
+					"public class X {\n"+
+					" @SuppressWarnings(\"rawtypes\")\n" +
+					" private static void foo(Object o) {\n"+
+					"		switch(o) {\n"+
+					"		case Object o1:\n"+
+					"			break;\n"+
+					"		default: \n"+
+					"			break;\n"+
+					"		} "+
+					" }\n"+
+					"}",
+				},
+				"----------\n" +
+				"1. ERROR in X.java (at line 8)\n" +
+				"	default: \n" +
+				"	^^^^^^^\n" +
+				"Switch case cannot have both a total pattern and default label\n" +
+				"----------\n");
+	}
+	public void testBug573921_10() {
+		runNegativeTest(
+				new String[] {
+					"X.java",
+					"import java.util.*;\n" +
+					"public class X {\n"+
+					" @SuppressWarnings(\"rawtypes\")\n" +
+					" private static void foo(List<String> o) {\n"+
+					"		switch(o) {\n"+
+					"		case List o1:\n"+
+					"			break;\n"+
+					"		default: \n"+
+					"			break;\n"+
+					"		} "+
+					" }\n"+
+					"}",
+				},
+				"----------\n" +
+				"1. ERROR in X.java (at line 8)\n" +
+				"	default: \n" +
+				"	^^^^^^^\n" +
+				"Switch case cannot have both a total pattern and default label\n" +
+				"----------\n");
+	}
+	public void testBug573921_11() {
+		runNegativeTest(
+				new String[] {
+					"X.java",
+					"import java.util.*;\n" +
+					"public class X {\n"+
+					" @SuppressWarnings(\"rawtypes\")\n" +
+					" private static void foo(String s) {\n"+
+					"		switch(s) {\n"+
+					"		case CharSequence cs:\n"+
+					"			break;\n"+
+					"		default: \n"+
+					"			break;\n"+
+					"		} "+
+					" }\n"+
+					"}",
+				},
+				"----------\n" +
+				"1. ERROR in X.java (at line 8)\n" +
+				"	default: \n" +
+				"	^^^^^^^\n" +
+				"Switch case cannot have both a total pattern and default label\n" +
+				"----------\n");
+	}
+	public void testBug575049_001() {
+		runConformTest(
+			new String[] {
+				"X.java",
+				"sealed interface I permits A,B,C {}\n"+
+				"final class A implements I {}\n"+
+				"final class B implements I {}\n"+
+				"record C(int j) implements I {} // Implicitly final\n"+
+				"public class X {\n"+
+				" static int testSealedCoverage(I i) {\n"+
+				"   return switch (i) {\n"+
+				"   case A a -> 0;\n"+
+				"   case B b -> 1;\n"+
+				"   case C c -> 2; // No default required!\n"+
+				"   default -> 3;\n"+
+				"   };\n"+
+				" }\n"+
+				" public static void main(String[] args) {\n"+
+				"   A a = new A();\n"+
+				"   System.out.println(testSealedCoverage(a));\n"+
+				" }\n"+
+				"}",
+			},
+			"0");
+	}
+	public void testBug575049_002() {
+		runConformTest(
+			new String[] {
+				"X.java",
+				"sealed interface I permits A,B,C {}\n"+
+				"final class A implements I {}\n"+
+				"final class B implements I {}\n"+
+				"record C(int j) implements I {} // Implicitly final\n"+
+				"public class X {\n"+
+				" static int testSealedCoverage(I i) {\n"+
+				"   return switch (i) {\n"+
+				"   case A a -> 0;\n"+
+				"   case B b -> 1;\n"+
+				"   case C c -> 2; // No default required!\n"+
+				"   };\n"+
+				" }\n"+
+				" public static void main(String[] args) {\n"+
+				"   A a = new A();\n"+
+				"   System.out.println(testSealedCoverage(a));\n"+
+				" }\n"+
+				"}",
+			},
+			"0");
+	}
+	public void testBug575049_003() {
+		runConformTest(
+			new String[] {
+				"X.java",
+				"sealed interface I permits A,B,C {}\n"+
+				"final class A implements I {}\n"+
+				"final class B implements I {}\n"+
+				"record C(int j) implements I {} // Implicitly final\n"+
+				"public class X {\n"+
+				" static int testSealedCoverage(I i) {\n"+
+				"   return switch (i) {\n"+
+				"   case A a -> 0;\n"+
+				"   case B b -> 1;\n"+
+				"   default -> 2; // No default required!\n"+
+				"   };\n"+
+				" }\n"+
+				" public static void main(String[] args) {\n"+
+				"   A a = new A();\n"+
+				"   System.out.println(testSealedCoverage(a));\n"+
+				" }\n"+
+				"}",
+			},
+			"0");
+	}
+	public void testBug575049_004() {
+		runNegativeTest(
+			new String[] {
+				"X.java",
+				"sealed interface I permits A,B,C {}\n"+
+				"final class A implements I {}\n"+
+				"final class B implements I {}\n"+
+				"record C(int j) implements I {} // Implicitly final\n"+
+				"public class X {\n"+
+				" static int testSealedCoverage(I i) {\n"+
+				"   return switch (i) {\n"+
+				"   case A a -> 0;\n"+
+				"   case B b -> 1;\n"+
+				"   };\n"+
+				" }\n"+
+				" public static void main(String[] args) {\n"+
+				"   A a = new A();\n"+
+				"   System.out.println(testSealedCoverage(a));\n"+
+				" }\n"+
+				"}",
+			},
+			"----------\n" +
+			"1. ERROR in X.java (at line 7)\n" +
+			"	return switch (i) {\n" +
+			"	               ^\n" +
+			"A switch expression should have a default case\n" +
+			"----------\n");
+	}
+	public void testBug575048_01() {
+		runNegativeTest(
+			new String[] {
+				"X.java",
+				"public class X {\n"+
+				" static int foo(Integer i) {\n"+
+				"   return switch (i) {\n"+
+				"     default -> 2;\n"+
+				"     case Integer i1 -> 0;\n"+
+				"   };\n"+
+				" }\n"+
+				" public static void main(String[] args) {\n"+
+				"   System.out.println(foo(1));\n"+
+				" }\n"+
+				"}",
+			},
+			"----------\n" +
+			"1. ERROR in X.java (at line 5)\n" +
+			"	case Integer i1 -> 0;\n" +
+			"	^^^^^^^^^^^^^^^\n" +
+			"Switch case cannot have both a total pattern and default label\n" +
+			"----------\n");
+	}
+	public void testBug575053_001() {
+		runConformTest(
+			new String[] {
+				"X.java",
+				"public class X {\n" +
+				"	public void foo(String o) {\n" +
+				"		switch (o) {\n" +
+				"		  case String s && s.length() > 0  -> {}\n" +
+				"		  default -> {}\n" +
+				"		} \n" +
+				"	}\n" +
+				"	public static void main(String[] args) {\n" +
+				"		try{\n" +
+				"		  (new X()).foo(null);\n" +
+				"		} catch(Exception t) {\n" +
+				"		 	t.printStackTrace();\n" +
+				"		}\n" +
+				"	}\n"+
+				"}",
+			},
+			"",
+			"java.lang.NullPointerException\n" +
+			"	at java.base/java.util.Objects.requireNonNull(Objects.java:208)\n" +
+			"	at X.foo(X.java:3)\n" +
+			"	at X.main(X.java:10)");
+	}
+	public void testBug575053_002() {
+		runConformTest(
+			new String[] {
+				"X.java",
+				"public class X {\n" +
+				"	public void foo(Object o) {\n" +
+				"		switch (o) {\n" +
+				"		  case String s -> {}\n" +
+				"		  default -> {}\n" +
+				"		} \n" +
+				"	}\n" +
+				"	public static void main(String[] args) {\n" +
+				"		try{\n" +
+				"		  (new X()).foo(null);\n" +
+				"		} catch(Exception t) {\n" +
+				"		 	t.printStackTrace();\n" +
+				"		}\n" +
+				"	}\n"+
+				"}",
+			},
+			"",
+			"java.lang.NullPointerException\n" +
+			"	at java.base/java.util.Objects.requireNonNull(Objects.java:208)\n" +
+			"	at X.foo(X.java:3)\n" +
+			"	at X.main(X.java:10)");
+	}
+	public void testBug575249_01() {
+		runConformTest(
+			new String[] {
+				"X.java",
+				"public class X {\n" +
+				"	public static int foo(Object o) {\n" +
+				"		return switch (o) {\n" +
+				"		  case (String s) : yield 0;\n" +
+				"		  default : yield 1;\n" +
+				"		};\n" +
+				"	}\n" +
+				"	public static void main(String[] args) {\n" +
+				"		System.out.println(foo(\"Hello\"));\n" +
+				"	}\n"+
+				"}",
+			},
+			"0");
+	}
+	public void testBug575249_02() {
+		runConformTest(
+			new String[] {
+				"X.java",
+				"public class X {\n" +
+				"	public static int foo(Object o) {\n" +
+				"		return switch (o) {\n" +
+				"		  case (String s && s.length() < 10) : yield 0;\n" +
+				"		  default : yield 1;\n" +
+				"		};\n" +
+				"	}\n" +
+				"	public static void main(String[] args) {\n" +
+				"		System.out.println(foo(\"Hello\"));\n" +
+				"	}\n"+
+				"}",
+			},
+			"0");
+	}
+	public void testBug575249_03() {
+		runConformTest(
+			new String[] {
+				"X.java",
+				"public class X {\n" +
+				"	public static int foo(Object o) {\n" +
+				"		return switch (o) {\n" +
+				"		  case (String s) -> 0;\n" +
+				"		  default -> 1;\n" +
+				"		};\n" +
+				"	}\n" +
+				"	public static void main(String[] args) {\n" +
+				"		System.out.println(foo(\"Hello\"));\n" +
+				"	}\n"+
+				"}",
+			},
+			"0");
+	}
+	public void testBug575249_04() {
+		runConformTest(
+			new String[] {
+				"X.java",
+				"public class X {\n" +
+				"	public static int foo(Object o) {\n" +
+				"		return switch (o) {\n" +
+				"		  case (String s && s.length() < 10) -> 0;\n" +
+				"		  default -> 1;\n" +
+				"		};\n" +
+				"	}\n" +
+				"	public static void main(String[] args) {\n" +
+				"		System.out.println(foo(\"Hello\"));\n" +
+				"	}\n"+
+				"}",
+			},
+			"0");
+	}
+}
diff --git a/org.eclipse.jdt.core.tests.compiler/src/org/eclipse/jdt/core/tests/compiler/regression/TestAll.java b/org.eclipse.jdt.core.tests.compiler/src/org/eclipse/jdt/core/tests/compiler/regression/TestAll.java
index a182753..bbd5cad 100644
--- a/org.eclipse.jdt.core.tests.compiler/src/org/eclipse/jdt/core/tests/compiler/regression/TestAll.java
+++ b/org.eclipse.jdt.core.tests.compiler/src/org/eclipse/jdt/core/tests/compiler/regression/TestAll.java
@@ -8,6 +8,10 @@
  *
  * SPDX-License-Identifier: EPL-2.0
  *
+ * This is an implementation of an early-draft specification developed under the Java
+ * Community Process (JCP) and is made available for testing and evaluation purposes
+ * only. The code is not compatible with any specification of the JCP.
+ *
  * Contributors:
  *     IBM Corporation - initial API and implementation
  *     Stephan Herrmann - Contributions for
@@ -196,7 +200,7 @@
 
 	 // add 15 specific test here (check duplicates)
 	 ArrayList since_15 = new ArrayList();
-	 since_15.add(ClassFileReaderTest_15.class);
+	 since_15.add(ClassFileReaderTest_17.class);
 	 since_15.add(JavadocTest_15.class);
 	 since_15.add(Unicode13Test.class);
 	 since_15.add(BatchCompilerTest_15.class);
@@ -204,16 +208,21 @@
 
 	 // add 16 specific test here (check duplicates)
 	 ArrayList since_16 = new ArrayList();
-	 since_16.add(SealedTypesTests.class);
 	 since_16.add(LocalEnumTest.class);
 	 since_16.add(LocalStaticsTest.class);
 	 since_16.add(PreviewFeatureTest.class);
 	 since_16.add(ValueBasedAnnotationTests.class);
 	 since_16.add(BatchCompilerTest_16.class);
-	 since_16.add(RecordsRestrictedClassTest.class);
 	 since_16.add(PatternMatching16Test.class);
+	 since_16.add(RecordsRestrictedClassTest.class);
 	 since_16.add(JavadocTestForRecord.class);
 
+	 // add 17 specific test here (check duplicates)
+	 ArrayList since_17 = new ArrayList();
+	 since_17.add(SealedTypesTests.class);
+	 since_17.add(SwitchPatternTest.class);
+	 since_17.add(InstanceofPrimaryPatternTest.class);
+
 	 // Build final test suite
 	TestSuite all = new TestSuite(TestAll.class.getName());
 	all.addTest(new TestSuite(StandAloneASTParserTest.class));
@@ -391,6 +400,25 @@
 		TestCase.resetForgottenFilters(tests_16);
 		all.addTest(AbstractCompilerTest.buildComplianceTestSuite(ClassFileConstants.getComplianceLevelForJavaVersion(ClassFileConstants.MAJOR_VERSION_16), tests_16));
 	}
+	if ((possibleComplianceLevels & AbstractCompilerTest.F_17) != 0) {
+		ArrayList tests_17 = (ArrayList)standardTests.clone();
+		tests_17.addAll(since_1_4);
+		tests_17.addAll(since_1_5);
+		tests_17.addAll(since_1_6);
+		tests_17.addAll(since_1_7);
+		tests_17.addAll(since_1_8);
+		tests_17.addAll(since_9);
+		tests_17.addAll(since_10);
+		tests_17.addAll(since_11);
+		tests_17.addAll(since_12);
+		tests_17.addAll(since_13);
+		tests_17.addAll(since_14);
+		tests_17.addAll(since_15);
+		tests_17.addAll(since_16);
+		tests_17.addAll(since_17);
+		TestCase.resetForgottenFilters(tests_17);
+		all.addTest(AbstractCompilerTest.buildComplianceTestSuite(ClassFileConstants.getComplianceLevelForJavaVersion(ClassFileConstants.MAJOR_VERSION_17), tests_17));
+	}
 	all.addTest(new TestSuite(Jsr14Test.class));
 	return all;
 }
diff --git a/org.eclipse.jdt.core.tests.compiler/src/org/eclipse/jdt/core/tests/compiler/regression/ValueBasedAnnotationTests.java b/org.eclipse.jdt.core.tests.compiler/src/org/eclipse/jdt/core/tests/compiler/regression/ValueBasedAnnotationTests.java
index 2ea38de..0728691 100644
--- a/org.eclipse.jdt.core.tests.compiler/src/org/eclipse/jdt/core/tests/compiler/regression/ValueBasedAnnotationTests.java
+++ b/org.eclipse.jdt.core.tests.compiler/src/org/eclipse/jdt/core/tests/compiler/regression/ValueBasedAnnotationTests.java
@@ -8,11 +8,17 @@
  *
  * SPDX-License-Identifier: EPL-2.0
  *
+ * This is an implementation of an early-draft specification developed under the Java
+ * Community Process (JCP) and is made available for testing and evaluation purposes
+ * only. The code is not compatible with any specification of the JCP.
+ *
  * Contributors:
  *     IBM Corporation - initial API and implementation
  *******************************************************************************/
 package org.eclipse.jdt.core.tests.compiler.regression;
 import java.util.Map;
+
+import org.eclipse.jdt.internal.compiler.classfmt.ClassFileConstants;
 import org.eclipse.jdt.internal.compiler.impl.CompilerOptions;
 import junit.framework.Test;
 public class ValueBasedAnnotationTests extends AbstractRegressionTest {
@@ -34,12 +40,9 @@
 	@Override
 	protected Map<String, String> getCompilerOptions() {
 		Map<String, String> defaultOptions = super.getCompilerOptions();
-		defaultOptions.put(CompilerOptions.OPTION_Compliance, CompilerOptions.VERSION_16);
-		defaultOptions.put(CompilerOptions.OPTION_Source, CompilerOptions.VERSION_16);
-		defaultOptions.put(CompilerOptions.OPTION_TargetPlatform, CompilerOptions.VERSION_16);
-		defaultOptions.put(CompilerOptions.OPTION_EnablePreviews, CompilerOptions.ENABLED);
-		defaultOptions.put(CompilerOptions.OPTION_ReportPreviewFeatures, CompilerOptions.IGNORE);
-		defaultOptions.put(CompilerOptions.OPTION_Store_Annotations, CompilerOptions.ENABLED);
+		if (this.complianceLevel >= ClassFileConstants.getLatestJDKLevel()) {
+			defaultOptions.put(CompilerOptions.OPTION_EnablePreviews, CompilerOptions.ENABLED);
+		}
 		return defaultOptions;
 	}
 	protected void runWarningTest(String[] testFiles, String expectedCompilerLog) {
diff --git a/org.eclipse.jdt.core.tests.compiler/src/org/eclipse/jdt/core/tests/util/AbstractCompilerTest.java b/org.eclipse.jdt.core.tests.compiler/src/org/eclipse/jdt/core/tests/util/AbstractCompilerTest.java
index a705a2b..6b0ae18 100644
--- a/org.eclipse.jdt.core.tests.compiler/src/org/eclipse/jdt/core/tests/util/AbstractCompilerTest.java
+++ b/org.eclipse.jdt.core.tests.compiler/src/org/eclipse/jdt/core/tests/util/AbstractCompilerTest.java
@@ -1,5 +1,5 @@
 /*******************************************************************************
- * Copyright (c) 2000, 2020 IBM Corporation and others.
+ * Copyright (c) 2000, 2021 IBM Corporation and others.
  *
  * This program and the accompanying materials
  * are made available under the terms of the Eclipse Public License 2.0
@@ -8,6 +8,10 @@
  *
  * SPDX-License-Identifier: EPL-2.0
  *
+ * This is an implementation of an early-draft specification developed under the Java
+ * Community Process (JCP) and is made available for testing and evaluation purposes
+ * only. The code is not compatible with any specification of the JCP.
+ *
  * Contributors:
  *     IBM Corporation - initial API and implementation
  *******************************************************************************/
@@ -48,6 +52,7 @@
 	public static final int F_14  = 0x800;
 	public static final int F_15  = 0x1000;
 	public static final int F_16  = 0x2000;
+	public static final int F_17  = 0x4000;
 
 	public static final boolean RUN_JAVAC = CompilerOptions.ENABLED.equals(System.getProperty("run.javac"));
 	public static final boolean PERFORMANCE_ASSERTS = !CompilerOptions.DISABLED.equals(System.getProperty("jdt.performance.asserts"));
@@ -66,6 +71,7 @@
 	protected static boolean isJRE14Plus = false;
 	protected static boolean isJRE15Plus = false;
 	protected static boolean isJRE16Plus = false;
+	protected static boolean isJRE17Plus = false;
 	protected static boolean reflectNestedClassUseDollar;
 
 	public static int[][] complianceTestLevelMapping = new int[][] {
@@ -83,6 +89,7 @@
 		new int[] {F_14, ClassFileConstants.MAJOR_VERSION_14},
 		new int[] {F_15, ClassFileConstants.MAJOR_VERSION_15},
 		new int[] {F_16, ClassFileConstants.MAJOR_VERSION_16},
+		new int[] {F_17, ClassFileConstants.MAJOR_VERSION_17},
 	};
 
 	/**
@@ -312,7 +319,8 @@
 	public static int getPossibleComplianceLevels() {
 		if (possibleComplianceLevels == UNINITIALIZED) {
 			String specVersion = System.getProperty("java.specification.version");
-			isJRE16Plus =  CompilerOptions.VERSION_16.equals(specVersion);
+			isJRE17Plus =  CompilerOptions.VERSION_17.equals(specVersion);
+			isJRE16Plus = isJRE17Plus || CompilerOptions.VERSION_16.equals(specVersion);
 			isJRE15Plus = isJRE16Plus || CompilerOptions.VERSION_15.equals(specVersion);
 			isJRE14Plus = isJRE15Plus || CompilerOptions.VERSION_14.equals(specVersion);
 			isJRE13Plus = isJRE14Plus || CompilerOptions.VERSION_13.equals(specVersion);
@@ -361,6 +369,9 @@
 					} else if (CompilerOptions.VERSION_16.equals(compliance)) {
 						if (isJRE16Plus)
 							possibleComplianceLevels |= F_16;
+					} else if (CompilerOptions.VERSION_17.equals(compliance)) {
+						if (isJRE17Plus)
+							possibleComplianceLevels |= F_17;
 					} else {
 						System.out.println("Ignoring invalid compliance (" + compliance + ")");
 						System.out.print("Use one of ");
@@ -444,6 +455,10 @@
 					if (canRun16) {
 						possibleComplianceLevels |= F_16;
 					}
+					boolean canRun17 = canRun16 && !CompilerOptions.VERSION_16.equals(specVersion);
+					if (canRun17) {
+						possibleComplianceLevels |= F_17;
+					}
 				} else if ("1.0".equals(specVersion)
 							|| CompilerOptions.VERSION_1_1.equals(specVersion)
 							|| CompilerOptions.VERSION_1_2.equals(specVersion)
@@ -474,6 +489,9 @@
 															possibleComplianceLevels |= F_15;
 															if (!CompilerOptions.VERSION_15.equals(specVersion)) {
 																possibleComplianceLevels |= F_16;
+																if (!CompilerOptions.VERSION_16.equals(specVersion)) {
+																	possibleComplianceLevels |= F_17;
+																}
 															}
 														}
 													}
@@ -662,7 +680,7 @@
 			int major = Integer.parseInt(ver) + ClassFileConstants.MAJOR_VERSION_0;
 			return "version " + ver + " : " + major + ".0";
 		}
-		if (compliance >= ClassFileConstants.getComplianceLevelForJavaVersion(ClassFileConstants.MAJOR_VERSION_16)) return version; // keep this stmt for search for next bump up
+		if (compliance >= ClassFileConstants.getComplianceLevelForJavaVersion(ClassFileConstants.MAJOR_VERSION_17)) return version; // keep this stmt for search for next bump up
 		return version;
 	}
 
diff --git a/org.eclipse.jdt.core.tests.model/JCL/build.xml b/org.eclipse.jdt.core.tests.model/JCL/build.xml
index ddc9f08..0099d07 100644
--- a/org.eclipse.jdt.core.tests.model/JCL/build.xml
+++ b/org.eclipse.jdt.core.tests.model/JCL/build.xml
@@ -1,6 +1,6 @@
 <?xml version="1.0" encoding="UTF-8"?>
 <!--
-    Copyright (c) 2020 GK Software SE and others.
+    Copyright (c) 2020, 2021 GK Software SE and others.
 
     This program and the accompanying materials
     are made available under the terms of the Eclipse Public License 2.0
@@ -60,11 +60,16 @@
 			<param name="suffix" value="14"/>
 		</antcall>
 		<antcall target="converterJclMin">
+			<param name="compliance" value="17"/>
+			<param name="suffix" value="17"/>
+		</antcall>
+		<antcall target="converterJclMin">
 					<param name="compliance" value="15"/>
 					<param name="suffix" value="15"/>
 		</antcall>
 	</target>
 	<target name="converterJclMin">
+		<mkdir dir="${jclbase}/converterJclMin${suffix}/bin" />
 		<javac srcdir="${jclbase}/converterJclMin${suffix}/src" destdir="${jclbase}/converterJclMin${suffix}/bin"
 					debuglevel="lines,source"
 					source="${compliance}"
diff --git a/org.eclipse.jdt.core.tests.model/JCL/converterJclMin1.7.jar b/org.eclipse.jdt.core.tests.model/JCL/converterJclMin1.7.jar
index 1aa97af..b68bd85 100644
--- a/org.eclipse.jdt.core.tests.model/JCL/converterJclMin1.7.jar
+++ b/org.eclipse.jdt.core.tests.model/JCL/converterJclMin1.7.jar
Binary files differ
diff --git a/org.eclipse.jdt.core.tests.model/JCL/converterJclMin1.7src.zip b/org.eclipse.jdt.core.tests.model/JCL/converterJclMin1.7src.zip
index 8dc3f8c..90c91c1 100644
--- a/org.eclipse.jdt.core.tests.model/JCL/converterJclMin1.7src.zip
+++ b/org.eclipse.jdt.core.tests.model/JCL/converterJclMin1.7src.zip
Binary files differ
diff --git a/org.eclipse.jdt.core.tests.model/JCL/converterJclMin1.8.jar b/org.eclipse.jdt.core.tests.model/JCL/converterJclMin1.8.jar
index cbed395..5d25633 100644
--- a/org.eclipse.jdt.core.tests.model/JCL/converterJclMin1.8.jar
+++ b/org.eclipse.jdt.core.tests.model/JCL/converterJclMin1.8.jar
Binary files differ
diff --git a/org.eclipse.jdt.core.tests.model/JCL/converterJclMin1.8src.zip b/org.eclipse.jdt.core.tests.model/JCL/converterJclMin1.8src.zip
index b966b0d..6bbe4c9 100644
--- a/org.eclipse.jdt.core.tests.model/JCL/converterJclMin1.8src.zip
+++ b/org.eclipse.jdt.core.tests.model/JCL/converterJclMin1.8src.zip
Binary files differ
diff --git a/org.eclipse.jdt.core.tests.model/JCL/converterJclMin10.jar b/org.eclipse.jdt.core.tests.model/JCL/converterJclMin10.jar
index 11f8d89..9ef6dfd 100644
--- a/org.eclipse.jdt.core.tests.model/JCL/converterJclMin10.jar
+++ b/org.eclipse.jdt.core.tests.model/JCL/converterJclMin10.jar
Binary files differ
diff --git a/org.eclipse.jdt.core.tests.model/JCL/converterJclMin10src.zip b/org.eclipse.jdt.core.tests.model/JCL/converterJclMin10src.zip
index 88f184d..d27f821 100644
--- a/org.eclipse.jdt.core.tests.model/JCL/converterJclMin10src.zip
+++ b/org.eclipse.jdt.core.tests.model/JCL/converterJclMin10src.zip
Binary files differ
diff --git a/org.eclipse.jdt.core.tests.model/JCL/converterJclMin11.jar b/org.eclipse.jdt.core.tests.model/JCL/converterJclMin11.jar
index dcb69d5..8796dd9 100644
--- a/org.eclipse.jdt.core.tests.model/JCL/converterJclMin11.jar
+++ b/org.eclipse.jdt.core.tests.model/JCL/converterJclMin11.jar
Binary files differ
diff --git a/org.eclipse.jdt.core.tests.model/JCL/converterJclMin11src.zip b/org.eclipse.jdt.core.tests.model/JCL/converterJclMin11src.zip
index 7a91fed..b4e9b6f 100644
--- a/org.eclipse.jdt.core.tests.model/JCL/converterJclMin11src.zip
+++ b/org.eclipse.jdt.core.tests.model/JCL/converterJclMin11src.zip
Binary files differ
diff --git a/org.eclipse.jdt.core.tests.model/JCL/converterJclMin12.jar b/org.eclipse.jdt.core.tests.model/JCL/converterJclMin12.jar
index 2d6cbe4..56e0019 100644
--- a/org.eclipse.jdt.core.tests.model/JCL/converterJclMin12.jar
+++ b/org.eclipse.jdt.core.tests.model/JCL/converterJclMin12.jar
Binary files differ
diff --git a/org.eclipse.jdt.core.tests.model/JCL/converterJclMin12src.zip b/org.eclipse.jdt.core.tests.model/JCL/converterJclMin12src.zip
index 7a91fed..fc6cd99 100644
--- a/org.eclipse.jdt.core.tests.model/JCL/converterJclMin12src.zip
+++ b/org.eclipse.jdt.core.tests.model/JCL/converterJclMin12src.zip
Binary files differ
diff --git a/org.eclipse.jdt.core.tests.model/JCL/converterJclMin13.jar b/org.eclipse.jdt.core.tests.model/JCL/converterJclMin13.jar
index 5938fbe..f9619b9 100644
--- a/org.eclipse.jdt.core.tests.model/JCL/converterJclMin13.jar
+++ b/org.eclipse.jdt.core.tests.model/JCL/converterJclMin13.jar
Binary files differ
diff --git a/org.eclipse.jdt.core.tests.model/JCL/converterJclMin13src.zip b/org.eclipse.jdt.core.tests.model/JCL/converterJclMin13src.zip
index c3f8a91..b5ba021 100644
--- a/org.eclipse.jdt.core.tests.model/JCL/converterJclMin13src.zip
+++ b/org.eclipse.jdt.core.tests.model/JCL/converterJclMin13src.zip
Binary files differ
diff --git a/org.eclipse.jdt.core.tests.model/JCL/converterJclMin14.jar b/org.eclipse.jdt.core.tests.model/JCL/converterJclMin14.jar
index c85d2be..edfd11d 100644
--- a/org.eclipse.jdt.core.tests.model/JCL/converterJclMin14.jar
+++ b/org.eclipse.jdt.core.tests.model/JCL/converterJclMin14.jar
Binary files differ
diff --git a/org.eclipse.jdt.core.tests.model/JCL/converterJclMin14src.zip b/org.eclipse.jdt.core.tests.model/JCL/converterJclMin14src.zip
index 8defabc..7d19bc5 100644
--- a/org.eclipse.jdt.core.tests.model/JCL/converterJclMin14src.zip
+++ b/org.eclipse.jdt.core.tests.model/JCL/converterJclMin14src.zip
Binary files differ
diff --git a/org.eclipse.jdt.core.tests.model/JCL/converterJclMin15.jar b/org.eclipse.jdt.core.tests.model/JCL/converterJclMin15.jar
index f69bef0..e4f6c63 100644
--- a/org.eclipse.jdt.core.tests.model/JCL/converterJclMin15.jar
+++ b/org.eclipse.jdt.core.tests.model/JCL/converterJclMin15.jar
Binary files differ
diff --git a/org.eclipse.jdt.core.tests.model/JCL/converterJclMin15src.zip b/org.eclipse.jdt.core.tests.model/JCL/converterJclMin15src.zip
index 4b62763..6876082 100644
--- a/org.eclipse.jdt.core.tests.model/JCL/converterJclMin15src.zip
+++ b/org.eclipse.jdt.core.tests.model/JCL/converterJclMin15src.zip
Binary files differ
diff --git a/org.eclipse.jdt.core.tests.model/JCL/converterJclMin17.jar b/org.eclipse.jdt.core.tests.model/JCL/converterJclMin17.jar
new file mode 100644
index 0000000..539375b
--- /dev/null
+++ b/org.eclipse.jdt.core.tests.model/JCL/converterJclMin17.jar
Binary files differ
diff --git a/org.eclipse.jdt.core.tests.model/JCL/converterJclMin17src.zip b/org.eclipse.jdt.core.tests.model/JCL/converterJclMin17src.zip
new file mode 100644
index 0000000..8674e83
--- /dev/null
+++ b/org.eclipse.jdt.core.tests.model/JCL/converterJclMin17src.zip
Binary files differ
diff --git a/org.eclipse.jdt.core.tests.model/JCL/converterJclMin9.jar b/org.eclipse.jdt.core.tests.model/JCL/converterJclMin9.jar
index 5116d05..b968f8a 100644
--- a/org.eclipse.jdt.core.tests.model/JCL/converterJclMin9.jar
+++ b/org.eclipse.jdt.core.tests.model/JCL/converterJclMin9.jar
Binary files differ
diff --git a/org.eclipse.jdt.core.tests.model/JCL/converterJclMin9src.zip b/org.eclipse.jdt.core.tests.model/JCL/converterJclMin9src.zip
index 9b811ac..fee9e90 100644
--- a/org.eclipse.jdt.core.tests.model/JCL/converterJclMin9src.zip
+++ b/org.eclipse.jdt.core.tests.model/JCL/converterJclMin9src.zip
Binary files differ
diff --git a/org.eclipse.jdt.core.tests.model/pom.xml b/org.eclipse.jdt.core.tests.model/pom.xml
index 108b21e..73b82d3 100644
--- a/org.eclipse.jdt.core.tests.model/pom.xml
+++ b/org.eclipse.jdt.core.tests.model/pom.xml
@@ -1,6 +1,6 @@
 <?xml version="1.0" encoding="UTF-8"?>
 <!--
-  Copyright (c) 2012, 2020 Eclipse Foundation and others.
+  Copyright (c) 2012, 2021 Eclipse Foundation and others.
   All rights reserved. This program and the accompanying materials
   are made available under the terms of the Eclipse Distribution License v1.0
   which accompanies this distribution, and is available at
@@ -47,6 +47,12 @@
   </build>
 
   <profiles>
+    <profile>
+      <id>build-individual-bundles</id>
+	  <properties>
+		<code.ignoredWarnings>-warn:+fieldHiding,-unavoidableGenericProblems,-discouraged</code.ignoredWarnings>
+	  </properties>
+    </profile>
 	<profile>
 		<id>test-on-javase-9</id>
 		<build>
@@ -230,6 +236,36 @@
 			<tycho.surefire.argLine>--add-modules ALL-SYSTEM -Dcompliance=1.4,1.7,1.8,13,15,16</tycho.surefire.argLine>
 		</properties>
 	</profile>
+	<profile>
+		<id>test-on-javase-17</id>
+		<build>
+			<plugins>
+				<plugin>
+					<groupId>org.apache.maven.plugins</groupId>
+					<artifactId>maven-toolchains-plugin</artifactId>
+					<version>1.1</version>
+					<executions>
+						<execution>
+							<phase>validate</phase>
+							<goals>
+								<goal>toolchain</goal>
+							</goals>
+						</execution>
+					</executions>
+					<configuration>
+						<toolchains>
+							<jdk>
+								<id>JavaSE-17</id>
+							</jdk>
+						</toolchains>
+					</configuration>
+				</plugin>
+			</plugins>
+		</build>
+		<properties>
+			<tycho.surefire.argLine>--add-modules ALL-SYSTEM -Dcompliance=1.4,1.7,1.8,14,17</tycho.surefire.argLine>
+		</properties>
+	</profile>
   </profiles>
 
 </project>
diff --git a/org.eclipse.jdt.core.tests.model/src/org/eclipse/jdt/core/tests/dom/ASTConverter_15Test.java b/org.eclipse.jdt.core.tests.model/src/org/eclipse/jdt/core/tests/dom/ASTConverter_15Test.java
index 52673d8..40b4367 100644
--- a/org.eclipse.jdt.core.tests.model/src/org/eclipse/jdt/core/tests/dom/ASTConverter_15Test.java
+++ b/org.eclipse.jdt.core.tests.model/src/org/eclipse/jdt/core/tests/dom/ASTConverter_15Test.java
@@ -7,6 +7,9 @@
  * https://www.eclipse.org/legal/epl-2.0/
  *
  * SPDX-License-Identifier: EPL-2.0
+ * This is an implementation of an early-draft specification developed under the Java
+ * Community Process (JCP) and is made available for testing and evaluation purposes
+ * only. The code is not compatible with any specification of the JCP.
  * Contributors:
  *     IBM Corporation - initial API and implementation
  *******************************************************************************/
@@ -61,9 +64,9 @@
 		this.ast = AST.newAST(getAST15(), false);
 		this.currentProject = getJavaProject("Converter_15");
 		if (this.ast.apiLevel() == AST.JLS15 ) {
-			this.currentProject.setOption(JavaCore.COMPILER_COMPLIANCE, JavaCore.VERSION_16);
-			this.currentProject.setOption(JavaCore.COMPILER_SOURCE, JavaCore.VERSION_16);
-			this.currentProject.setOption(JavaCore.COMPILER_CODEGEN_TARGET_PLATFORM, JavaCore.VERSION_16);
+			this.currentProject.setOption(JavaCore.COMPILER_COMPLIANCE, JavaCore.VERSION_17);
+			this.currentProject.setOption(JavaCore.COMPILER_SOURCE, JavaCore.VERSION_17);
+			this.currentProject.setOption(JavaCore.COMPILER_CODEGEN_TARGET_PLATFORM, JavaCore.VERSION_17);
 
 		}
 	}
@@ -940,7 +943,8 @@
 			}
 	}
 
-	public void testSealed001() throws CoreException {
+	// Move sealed test to AST 17 converter class
+	public void _testSealed001() throws CoreException {
 		if (!isJRE15) {
 			System.err.println("Test "+getName()+" requires a JRE 15");
 			return;
@@ -986,7 +990,8 @@
 		}
 	}
 
-	public void testSealed002() throws CoreException {
+	// Move sealed test to AST 17 converter class
+	public void _testSealed002() throws CoreException {
 		if (!isJRE15) {
 			System.err.println("Test "+getName()+" requires a JRE 15");
 			return;
@@ -1022,7 +1027,8 @@
 		}
 	}
 
-	public void testSealed003() throws CoreException {
+	// Move sealed test to AST 17 converter class
+	public void _testSealed003() throws CoreException {
 		if (!isJRE15) {
 			System.err.println("Test "+getName()+" requires a JRE 15");
 			return;
@@ -1067,7 +1073,8 @@
 		}
 	}
 
-	public void testSealed004() throws CoreException {
+	// Move sealed test to AST 17 converter class
+	public void _testSealed004() throws CoreException {
 		if (!isJRE15) {
 			System.err.println("Test "+getName()+" requires a JRE 15");
 			return;
diff --git a/org.eclipse.jdt.core.tests.model/src/org/eclipse/jdt/core/tests/dom/ASTConverter_16Test.java b/org.eclipse.jdt.core.tests.model/src/org/eclipse/jdt/core/tests/dom/ASTConverter_16Test.java
index 031ba91..1c7ea3e 100644
--- a/org.eclipse.jdt.core.tests.model/src/org/eclipse/jdt/core/tests/dom/ASTConverter_16Test.java
+++ b/org.eclipse.jdt.core.tests.model/src/org/eclipse/jdt/core/tests/dom/ASTConverter_16Test.java
@@ -7,6 +7,9 @@
  * https://www.eclipse.org/legal/epl-2.0/
  *
  * SPDX-License-Identifier: EPL-2.0
+ * This is an implementation of an early-draft specification developed under the Java
+ * Community Process (JCP) and is made available for testing and evaluation purposes
+ * only. The code is not compatible with any specification of the JCP.
  *
  * Contributors:
  *     IBM Corporation - initial API and implementation
@@ -53,6 +56,7 @@
 
 	ICompilationUnit workingCopy;
 
+	@SuppressWarnings("deprecation")
 	public void setUpSuite() throws Exception {
 		super.setUpSuite();
 		this.ast = AST.newAST(getAST16(), false);
@@ -73,6 +77,7 @@
 		return buildModelTestSuite(ASTConverter_16Test.class);
 	}
 
+	@SuppressWarnings("deprecation")
 	static int getAST16() {
 		return AST.JLS16;
 	}
diff --git a/org.eclipse.jdt.core.tests.model/src/org/eclipse/jdt/core/tests/dom/ASTConverter_17Test.java b/org.eclipse.jdt.core.tests.model/src/org/eclipse/jdt/core/tests/dom/ASTConverter_17Test.java
new file mode 100644
index 0000000..01e7575
--- /dev/null
+++ b/org.eclipse.jdt.core.tests.model/src/org/eclipse/jdt/core/tests/dom/ASTConverter_17Test.java
@@ -0,0 +1,210 @@
+/*******************************************************************************
+ * Copyright (c) 2021 IBM Corporation and others.
+ *
+ * This program and the accompanying materials
+ * are made available under the terms of the Eclipse Public License 2.0
+ * which accompanies this distribution, and is available at
+ * https://www.eclipse.org/legal/epl-2.0/
+ *
+ * SPDX-License-Identifier: EPL-2.0
+ * This is an implementation of an early-draft specification developed under the Java
+ * Community Process (JCP) and is made available for testing and evaluation purposes
+ * only. The code is not compatible with any specification of the JCP.
+ * Contributors:
+ *     IBM Corporation - initial API and implementation
+ *******************************************************************************/
+package org.eclipse.jdt.core.tests.dom;
+
+import java.util.List;
+
+import org.eclipse.core.runtime.CoreException;
+import org.eclipse.jdt.core.ICompilationUnit;
+import org.eclipse.jdt.core.JavaCore;
+import org.eclipse.jdt.core.dom.AST;
+import org.eclipse.jdt.core.dom.ASTNode;
+import org.eclipse.jdt.core.dom.AbstractTypeDeclaration;
+import org.eclipse.jdt.core.dom.CompilationUnit;
+import org.eclipse.jdt.core.dom.Modifier;
+import org.eclipse.jdt.core.dom.TypeDeclaration;
+
+import junit.framework.Test;
+
+@SuppressWarnings("rawtypes")
+public class ASTConverter_17Test extends ConverterTestSetup {
+
+	ICompilationUnit workingCopy;
+
+	public void setUpSuite() throws Exception {
+		super.setUpSuite();
+		this.ast = AST.newAST(getAST17(), false);
+		this.currentProject = getJavaProject("Converter_17");
+		if (this.ast.apiLevel() == AST.JLS17 ) {
+			this.currentProject.setOption(JavaCore.COMPILER_COMPLIANCE, JavaCore.VERSION_17);
+			this.currentProject.setOption(JavaCore.COMPILER_SOURCE, JavaCore.VERSION_17);
+			this.currentProject.setOption(JavaCore.COMPILER_CODEGEN_TARGET_PLATFORM, JavaCore.VERSION_17);
+
+		}
+	}
+
+	public ASTConverter_17Test(String name) {
+		super(name);
+	}
+
+	public static Test suite() {
+		return buildModelTestSuite(ASTConverter_17Test.class);
+	}
+
+	static int getAST17() {
+		return AST.JLS17;
+	}
+	protected void tearDown() throws Exception {
+		super.tearDown();
+		if (this.workingCopy != null) {
+			this.workingCopy.discardWorkingCopy();
+			this.workingCopy = null;
+		}
+	}
+
+
+	public void testSealed001() throws CoreException {
+		if (!isJRE17) {
+			System.err.println("Test "+getName()+" requires a JRE 17");
+			return;
+		}
+		String contents = "public sealed class X permits X1{\n" +
+				"\n" +
+				"}\n" +
+				"non-sealed class X1 extends X {\n" +
+				"\n" +
+				"}\n";
+		this.workingCopy = getWorkingCopy("/Converter_17/src/X.java", true/*resolve*/);
+		ASTNode node = buildAST(
+			contents,
+			this.workingCopy);
+		assertEquals("Not a compilation unit", ASTNode.COMPILATION_UNIT, node.getNodeType());
+		CompilationUnit compilationUnit = (CompilationUnit) node;
+		assertProblemsSize(compilationUnit, 0);
+		node = ((AbstractTypeDeclaration)compilationUnit.types().get(0));
+		assertEquals("Not a Type Declaration", ASTNode.TYPE_DECLARATION, node.getNodeType());
+		TypeDeclaration type = (TypeDeclaration)node;
+		List modifiers = type.modifiers();
+		assertEquals("Incorrect no of modifiers", 2, modifiers.size());
+		Modifier modifier = (Modifier) modifiers.get(1);
+		assertSame("Incorrect modifier keyword", Modifier.ModifierKeyword.SEALED_KEYWORD, modifier.getKeyword());
+		List permittedTypes = type.permittedTypes();
+		assertEquals("Incorrect no of permits", 1, permittedTypes.size());
+		assertEquals("Incorrect type of permit", "org.eclipse.jdt.core.dom.SimpleType", permittedTypes.get(0).getClass().getName());
+		node = ((AbstractTypeDeclaration)compilationUnit.types().get(1));
+		assertEquals("Not a Type Declaration", ASTNode.TYPE_DECLARATION, node.getNodeType());
+		type = (TypeDeclaration)node;
+		modifiers = type.modifiers();
+		assertEquals("Incorrect no of modfiers", 1, modifiers.size());
+		modifier = (Modifier) modifiers.get(0);
+		assertSame("Incorrect modifier keyword", Modifier.ModifierKeyword.NON_SEALED_KEYWORD, modifier.getKeyword());
+
+	}
+
+	public void testSealed002() throws CoreException {
+		if (!isJRE17) {
+			System.err.println("Test "+getName()+" requires a JRE 17");
+			return;
+		}
+		String contents = "public sealed interface X permits X1{\n" +
+				"\n" +
+				"}\n" +
+				"non-sealed interface X1 extends X {\n" +
+				"\n" +
+				"}\n";
+		this.workingCopy = getWorkingCopy("/Converter_17/src/X.java", true/*resolve*/);
+		ASTNode node = buildAST(
+			contents,
+			this.workingCopy);
+		assertEquals("Not a compilation unit", ASTNode.COMPILATION_UNIT, node.getNodeType());
+		CompilationUnit compilationUnit = (CompilationUnit) node;
+		assertProblemsSize(compilationUnit, 0);
+		node = ((AbstractTypeDeclaration)compilationUnit.types().get(0));
+		assertEquals("Not a Record Declaration", ASTNode.TYPE_DECLARATION, node.getNodeType());
+		TypeDeclaration type = (TypeDeclaration)node;
+		List modifiers = type.modifiers();
+		assertEquals("Incorrect no of modfiers", 2, modifiers.size());
+		Modifier modifier = (Modifier) modifiers.get(1);
+		assertSame("Incorrect modifier keyword", Modifier.ModifierKeyword.SEALED_KEYWORD, modifier.getKeyword());
+
+	}
+
+	public void testSealed003() throws CoreException {
+		if (!isJRE17) {
+			System.err.println("Test "+getName()+" requires a JRE 17");
+			return;
+		}
+		String contents = "public sealed interface X permits X1{\n" +
+				"\n" +
+				"}\n" +
+				"non-sealed interface X1 extends X {\n" +
+				"\n" +
+				"}\n";
+		this.workingCopy = getWorkingCopy("/Converter_17/src/X.java", true/*resolve*/);
+		ASTNode node = buildAST(
+			contents,
+			this.workingCopy);
+		assertEquals("Not a compilation unit", ASTNode.COMPILATION_UNIT, node.getNodeType());
+		CompilationUnit compilationUnit = (CompilationUnit) node;
+		assertProblemsSize(compilationUnit, 0);
+		List<AbstractTypeDeclaration> types = compilationUnit.types();
+		assertEquals("No. of Types is not 2", types.size(), 2);
+		AbstractTypeDeclaration type = types.get(0);
+		if (!type.getName().getIdentifier().equals("X")) {
+			type = types.get(1);
+		}
+		assertTrue("type not a type", type instanceof TypeDeclaration);
+		TypeDeclaration typeDecl = (TypeDeclaration)type;
+		assertTrue("type not an interface", typeDecl.isInterface());
+		List modifiers = type.modifiers();
+		assertEquals("Incorrect no of modifiers", 2, modifiers.size());
+		Modifier modifier = (Modifier) modifiers.get(1);
+		assertSame("Incorrect modifier keyword", Modifier.ModifierKeyword.SEALED_KEYWORD, modifier.getKeyword());
+		int startPos = modifier.getStartPosition();
+		assertEquals("Restricter identifier position for sealed is not 7", startPos, contents.indexOf("sealed"));
+		startPos = typeDecl.getRestrictedIdentifierStartPosition();
+		assertEquals("Restricter identifier position for permits is not 26", startPos, contents.indexOf("permits"));
+	}
+
+	public void _testSealed004() throws CoreException {
+		if (!isJRE17) {
+			System.err.println("Test "+getName()+" requires a JRE 17");
+			return;
+		}
+		String contents = "public sealed class X permits X1{\n" +
+				"\n" +
+				"}\n" +
+				"non-sealed class X1 extends X {\n" +
+				"\n" +
+				"}\n";
+		this.workingCopy = getWorkingCopy("/Converter_17/src/X.java", true/*resolve*/);
+		ASTNode node = buildAST(
+			contents,
+			this.workingCopy);
+		assertEquals("Not a compilation unit", ASTNode.COMPILATION_UNIT, node.getNodeType());
+		CompilationUnit compilationUnit = (CompilationUnit) node;
+		assertProblemsSize(compilationUnit, 0);
+		List<AbstractTypeDeclaration> types = compilationUnit.types();
+		assertEquals("No. of Types is not 2", types.size(), 2);
+		AbstractTypeDeclaration type = types.get(0);
+		if (!type.getName().getIdentifier().equals("X")) {
+			type = types.get(1);
+		}
+		assertTrue("type not a type", type instanceof TypeDeclaration);
+		TypeDeclaration typeDecl = (TypeDeclaration)type;
+		assertTrue("type not an class", !typeDecl.isInterface());
+		List modifiers = type.modifiers();
+		assertEquals("Incorrect no of modifiers", 2, modifiers.size());
+		Modifier modifier = (Modifier) modifiers.get(1);
+		assertSame("Incorrect modifier keyword", Modifier.ModifierKeyword.SEALED_KEYWORD, modifier.getKeyword());
+		int startPos = modifier.getStartPosition();
+		assertEquals("Restricter identifier position for sealed is not 7", startPos, contents.indexOf("sealed"));
+		startPos = typeDecl.getRestrictedIdentifierStartPosition();
+		assertEquals("Restricter identifier position for permits is not 26", startPos, contents.indexOf("permits"));
+	}
+
+
+}
diff --git a/org.eclipse.jdt.core.tests.model/src/org/eclipse/jdt/core/tests/dom/ASTConverter_PreviewTest.java b/org.eclipse.jdt.core.tests.model/src/org/eclipse/jdt/core/tests/dom/ASTConverter_PreviewTest.java
index 49e7c10..aaac0a2 100644
--- a/org.eclipse.jdt.core.tests.model/src/org/eclipse/jdt/core/tests/dom/ASTConverter_PreviewTest.java
+++ b/org.eclipse.jdt.core.tests.model/src/org/eclipse/jdt/core/tests/dom/ASTConverter_PreviewTest.java
@@ -1,5 +1,5 @@
 /*******************************************************************************
- * Copyright (c) 2020 IBM Corporation and others.
+ * Copyright (c) 2020, 2021 IBM Corporation and others.
  *
  * This program and the accompanying materials
  * are made available under the terms of the Eclipse Public License 2.0
@@ -8,6 +8,9 @@
  *
  * SPDX-License-Identifier: EPL-2.0
  *
+ * This is an implementation of an early-draft specification developed under the Java
+ * Community Process (JCP) and is made available for testing and evaluation purposes
+ * only. The code is not compatible with any specification of the JCP.
  * Contributors:
  *     IBM Corporation - initial API and implementation
  *******************************************************************************/
@@ -33,6 +36,7 @@
 
 	ICompilationUnit workingCopy;
 
+	@SuppressWarnings("deprecation")
 	public void setUpSuite() throws Exception {
 		super.setUpSuite();
 		this.ast = AST.newAST(getAST16(), false);
@@ -53,6 +57,7 @@
 		return buildModelTestSuite(ASTConverter_PreviewTest.class);
 	}
 
+	@SuppressWarnings("deprecation")
 	static int getAST16() {
 		return AST.JLS16;
 	}
@@ -64,7 +69,7 @@
 		}
 	}
 
-	public void testSealed001() throws CoreException {
+	public void _testSealed001() throws CoreException {
 		if (!isJRE16) {
 			System.err.println("Test "+getName()+" requires a JRE 16");
 			return;
@@ -110,7 +115,7 @@
 		}
 	}
 
-	public void testSealed002() throws CoreException {
+	public void _testSealed002() throws CoreException {
 		if (!isJRE16) {
 			System.err.println("Test "+getName()+" requires a JRE 16");
 			return;
@@ -146,7 +151,7 @@
 		}
 	}
 
-	public void testSealed003() throws CoreException {
+	public void _testSealed003() throws CoreException {
 		if (!isJRE16) {
 			System.err.println("Test "+getName()+" requires a JRE 16");
 			return;
@@ -191,7 +196,7 @@
 		}
 	}
 
-	public void testSealed004() throws CoreException {
+	public void _testSealed004() throws CoreException {
 		if (!isJRE16) {
 			System.err.println("Test "+getName()+" requires a JRE 16");
 			return;
diff --git a/org.eclipse.jdt.core.tests.model/src/org/eclipse/jdt/core/tests/dom/ASTTest.java b/org.eclipse.jdt.core.tests.model/src/org/eclipse/jdt/core/tests/dom/ASTTest.java
index 63c8bef..61b7037 100644
--- a/org.eclipse.jdt.core.tests.model/src/org/eclipse/jdt/core/tests/dom/ASTTest.java
+++ b/org.eclipse.jdt.core.tests.model/src/org/eclipse/jdt/core/tests/dom/ASTTest.java
@@ -9543,7 +9543,7 @@
 
 	@SuppressWarnings("deprecation")
 	public void testASTLevels() throws Exception {
-		int[] apilLevels = {AST.JLS2, AST.JLS3, AST.JLS4, AST.JLS8, AST.JLS9, AST.JLS10, AST.JLS11, AST.JLS12, AST.JLS13, AST.JLS14, AST.JLS15, AST.JLS16};
+		int[] apilLevels = {AST.JLS2, AST.JLS3, AST.JLS4, AST.JLS8, AST.JLS9, AST.JLS10, AST.JLS11, AST.JLS12, AST.JLS13, AST.JLS14, AST.JLS15, AST.JLS16, AST.JLS17};
 		for (int level : apilLevels) {
 			try {
 				DOMASTUtil.checkASTLevel(level);
diff --git a/org.eclipse.jdt.core.tests.model/src/org/eclipse/jdt/core/tests/dom/AbstractASTTests.java b/org.eclipse.jdt.core.tests.model/src/org/eclipse/jdt/core/tests/dom/AbstractASTTests.java
index a08d511..44107f7 100644
--- a/org.eclipse.jdt.core.tests.model/src/org/eclipse/jdt/core/tests/dom/AbstractASTTests.java
+++ b/org.eclipse.jdt.core.tests.model/src/org/eclipse/jdt/core/tests/dom/AbstractASTTests.java
@@ -493,7 +493,9 @@
 		String option = cu.getJavaProject().getOption(JavaCore.COMPILER_COMPLIANCE, true);
 		long jdkLevel = CompilerOptions.versionToJdkLevel(option);
 		int JLSLevel = AST_INTERNAL_JLS3;
-		if (jdkLevel >= ClassFileConstants.getComplianceLevelForJavaVersion(ClassFileConstants.MAJOR_VERSION_16)) {
+		if (jdkLevel >= ClassFileConstants.getComplianceLevelForJavaVersion(ClassFileConstants.MAJOR_VERSION_17)) {
+			JLSLevel = AST_INTERNAL_JLS17;
+		} else if (jdkLevel >= ClassFileConstants.getComplianceLevelForJavaVersion(ClassFileConstants.MAJOR_VERSION_16)) {
 			JLSLevel = AST_INTERNAL_JLS16;
 		} else if (jdkLevel >= ClassFileConstants.getComplianceLevelForJavaVersion(ClassFileConstants.MAJOR_VERSION_15)) {
 			JLSLevel = AST_INTERNAL_JLS15;
diff --git a/org.eclipse.jdt.core.tests.model/src/org/eclipse/jdt/core/tests/dom/ConverterTestSetup.java b/org.eclipse.jdt.core.tests.model/src/org/eclipse/jdt/core/tests/dom/ConverterTestSetup.java
index 6b44610..4b631c1 100644
--- a/org.eclipse.jdt.core.tests.model/src/org/eclipse/jdt/core/tests/dom/ConverterTestSetup.java
+++ b/org.eclipse.jdt.core.tests.model/src/org/eclipse/jdt/core/tests/dom/ConverterTestSetup.java
@@ -7,7 +7,9 @@
  * https://www.eclipse.org/legal/epl-2.0/
  *
  * SPDX-License-Identifier: EPL-2.0
- *
+ * This is an implementation of an early-draft specification developed under the Java
+ * Community Process (JCP) and is made available for testing and evaluation purposes
+ * only. The code is not compatible with any specification of the JCP.
  * Contributors:
  *     IBM Corporation - initial API and implementation
  *******************************************************************************/
@@ -108,6 +110,10 @@
 			this.deleteProject("Converter11"); //$NON-NLS-1$
 			this.deleteProject("Converter13"); //$NON-NLS-1$
 			this.deleteProject("Converter14"); //$NON-NLS-1$
+			this.deleteProject("Converter_15"); //$NON-NLS-1$
+			this.deleteProject("Converter_15_1"); //$NON-NLS-1$
+			this.deleteProject("Converter_16"); //$NON-NLS-1$
+			this.deleteProject("Converter_17"); //$NON-NLS-1$
 			PROJECT_SETUP = false;
 		} else {
 			TEST_SUITES.remove(getClass());
@@ -122,6 +128,10 @@
 				this.deleteProject("Converter11"); //$NON-NLS-1$
 				this.deleteProject("Converter13"); //$NON-NLS-1$
 				this.deleteProject("Converter14"); //$NON-NLS-1$
+				this.deleteProject("Converter_15"); //$NON-NLS-1$
+				this.deleteProject("Converter_15_1"); //$NON-NLS-1$
+				this.deleteProject("Converter_16"); //$NON-NLS-1$
+				this.deleteProject("Converter_17"); //$NON-NLS-1$
 				PROJECT_SETUP = false;
 			}
 		}
@@ -208,6 +218,14 @@
 						new IPath[] {getConverterJCLPath("14"), getConverterJCLSourcePath("14"), getConverterJCLRootSourcePath()},
 						null);
 			}
+		} else if ("17".equals(compliance)) {
+			if (JavaCore.getClasspathVariable("CONVERTER_JCL_17_LIB") == null) {
+				setupExternalJCL("converterJclMin17");
+				JavaCore.setClasspathVariables(
+						new String[] {"CONVERTER_JCL_17_LIB", "CONVERTER_JCL_17_SRC", "CONVERTER_JCL_17_SRCROOT"},
+						new IPath[] {getConverterJCLPath("17"), getConverterJCLSourcePath("17"), getConverterJCLRootSourcePath()},
+						null);
+			}
 		} else if (JavaCore.getClasspathVariable("CONVERTER_JCL_LIB") == null) {
 			setupExternalJCL("converterJclMin");
 			JavaCore.setClasspathVariables(
@@ -238,6 +256,7 @@
 			setUpJavaProject("Converter_15", "15"); //$NON-NLS-1$ //$NON-NLS-2$
 			setUpJavaProject("Converter_15_1", "15"); //$NON-NLS-1$ //$NON-NLS-2$
 			setUpJavaProject("Converter_16", "16"); //$NON-NLS-1$ //$NON-NLS-2$
+			setUpJavaProject("Converter_17", "17"); //$NON-NLS-1$ //$NON-NLS-2$
 			waitUntilIndexesReady(); // needed to find secondary types
 			PROJECT_SETUP = true;
 		}
diff --git a/org.eclipse.jdt.core.tests.model/src/org/eclipse/jdt/core/tests/model/AbstractJavaModelTests.java b/org.eclipse.jdt.core.tests.model/src/org/eclipse/jdt/core/tests/model/AbstractJavaModelTests.java
index 04a09d1..1686ebc 100644
--- a/org.eclipse.jdt.core.tests.model/src/org/eclipse/jdt/core/tests/model/AbstractJavaModelTests.java
+++ b/org.eclipse.jdt.core.tests.model/src/org/eclipse/jdt/core/tests/model/AbstractJavaModelTests.java
@@ -1,11 +1,15 @@
 /*******************************************************************************
- * Copyright (c) 2000, 2020 IBM Corporation and others.
+ * Copyright (c) 2000, 2021 IBM Corporation and others.
  *
  * This program and the accompanying materials
  * are made available under the terms of the Eclipse Public License 2.0
  * which accompanies this distribution, and is available at
  * https://www.eclipse.org/legal/epl-2.0/
  *
+ * This is an implementation of an early-draft specification developed under the Java
+ * Community Process (JCP) and is made available for testing and evaluation purposes
+ * only. The code is not compatible with any specification of the JCP.
+ *
  * SPDX-License-Identifier: EPL-2.0
  * Contributors:
  *     IBM Corporation - initial API and implementation
@@ -157,6 +161,7 @@
 	protected static boolean isJRE14 = false;
 	protected static boolean isJRE15 = false;
 	protected static boolean isJRE16 = false;
+	protected static boolean isJRE17 = false;
 	static {
 		String javaVersion = System.getProperty("java.version");
 		String vmName = System.getProperty("java.vm.name");
@@ -169,6 +174,9 @@
 			}
 		}
 		long jdkLevel = CompilerOptions.versionToJdkLevel(javaVersion.length() > 3 ? javaVersion.substring(0, 3) : javaVersion);
+		if (jdkLevel >= ClassFileConstants.JDK17) {
+			isJRE17 = true;
+		}
 		if (jdkLevel >= ClassFileConstants.JDK16) {
 			isJRE16 = true;
 		}
@@ -244,10 +252,16 @@
 	/**
 	 * Internal synonym for constant AST.JSL16
 	 * to alleviate deprecation warnings once AST.JLS16 is deprecated in future.
+	 * @deprecated
 	 */
 	protected static final int AST_INTERNAL_JLS16 = AST.JLS16;
 
 	/**
+	 * Internal synonym for constant AST.JSL17
+	 */
+	protected static final int AST_INTERNAL_JLS17 = AST.JLS17;
+
+	/**
 	 * Internal synonym for the latest AST level.
 	 *
 	 */
@@ -2249,6 +2263,12 @@
 					options.put(CompilerOptions.OPTION_Source, CompilerOptions.VERSION_16);
 					options.put(CompilerOptions.OPTION_TargetPlatform, CompilerOptions.VERSION_16);
 					javaProject.setOptions(options);
+				} else if ("17".equals(compliance)) {
+					Map options = new HashMap();
+					options.put(CompilerOptions.OPTION_Compliance, CompilerOptions.VERSION_17);
+					options.put(CompilerOptions.OPTION_Source, CompilerOptions.VERSION_17);
+					options.put(CompilerOptions.OPTION_TargetPlatform, CompilerOptions.VERSION_17);
+					javaProject.setOptions(options);
 				}
 
 				result[0] = javaProject;
@@ -3390,7 +3410,11 @@
 				newJclSrcString = "JCL18_SRC"; // Use the same source
 			}
 		} else {
-			if (compliance.equals("16")) {
+			if (compliance.equals("17")) {
+				// Reuse the same 14 stuff as of now. No real need for a new one
+				newJclLibString = "JCL_17_LIB";
+				newJclSrcString = "JCL_17_SRC";
+			} else if (compliance.equals("16")) {
 				// Reuse the same 14 stuff as of now. No real need for a new one
 				newJclLibString = "JCL14_LIB";
 				newJclSrcString = "JCL14_SRC";
@@ -3467,11 +3491,12 @@
 		IPath jcl12Lib = new Path("JCL12_LIB");
 		IPath jcl13Lib = new Path("JCL13_LIB");
 		IPath jcl14Lib = new Path("JCL14_LIB");
+		IPath jcl17Lib = new Path("JCL_17_LIB");
 		IPath jclFull = new Path("JCL18_FULL");
 
 		return path.equals(jclLib) || path.equals(jcl5Lib) || path.equals(jcl8Lib) || path.equals(jcl9Lib)
 				|| path.equals(jcl10Lib) ||  path.equals(jcl11Lib) || path.equals(jcl12Lib) || path.equals(jcl13Lib)
-				|| path.equals(jcl14Lib) || path.equals(jclFull);
+				|| path.equals(jcl14Lib) || path.equals(jcl17Lib) || path.equals(jclFull);
 	}
 	public void setUpJCLClasspathVariables(String compliance) throws JavaModelException, IOException {
 		setUpJCLClasspathVariables(compliance, false);
@@ -3574,6 +3599,14 @@
 					new IPath[] {getExternalJCLPath("14"), getExternalJCLSourcePath("14"), getExternalJCLRootSourcePath()},
 					null);
 			}
+		} else if ("17".equals(compliance)) {
+			if (JavaCore.getClasspathVariable("JCL_17_LIB") == null) {
+				setupExternalJCL("jclMin17");
+				JavaCore.setClasspathVariables(
+					new String[] {"JCL_17_LIB", "JCL_17_SRC", "JCL_SRCROOT"},
+					new IPath[] {getExternalJCLPath("17"), getExternalJCLSourcePath("17"), getExternalJCLRootSourcePath()},
+					null);
+			}
 		} else {
 			if (JavaCore.getClasspathVariable("JCL_LIB") == null) {
 				setupExternalJCL("jclMin");
diff --git a/org.eclipse.jdt.core.tests.model/src/org/eclipse/jdt/core/tests/model/CompletionTests16_1.java b/org.eclipse.jdt.core.tests.model/src/org/eclipse/jdt/core/tests/model/CompletionTests16_1.java
index 0e3eca7..8c509b1 100644
--- a/org.eclipse.jdt.core.tests.model/src/org/eclipse/jdt/core/tests/model/CompletionTests16_1.java
+++ b/org.eclipse.jdt.core.tests.model/src/org/eclipse/jdt/core/tests/model/CompletionTests16_1.java
@@ -1,5 +1,5 @@
 /*******************************************************************************
- * Copyright (c) 2020 IBM Corporation and others.
+ * Copyright (c) 2020, 2021 IBM Corporation and others.
  * All rights reserved. This program and the accompanying materials
  * are made available under the terms of the Eclipse Public License v1.0
  * which accompanies this distribution, and is available at
@@ -31,11 +31,11 @@
 
 	public void setUpSuite() throws Exception {
 		if (COMPLETION_PROJECT == null) {
-			COMPLETION_PROJECT = setUpJavaProject("Completion", "16");
+			COMPLETION_PROJECT = setUpJavaProject("Completion", "17");
 		} else {
-			setUpProjectCompliance(COMPLETION_PROJECT, "16");
+			setUpProjectCompliance(COMPLETION_PROJECT, "17");
 		}
-		COMPLETION_PROJECT.setOption(JavaCore.COMPILER_PB_ENABLE_PREVIEW_FEATURES, JavaCore.ENABLED);
+		COMPLETION_PROJECT.setOption(JavaCore.COMPILER_PB_ENABLE_PREVIEW_FEATURES, JavaCore.DISABLED);
 		super.setUpSuite();
 	}
 
diff --git a/org.eclipse.jdt.core.tests.model/src/org/eclipse/jdt/core/tests/model/JavaSearchBugs17Tests.java b/org.eclipse.jdt.core.tests.model/src/org/eclipse/jdt/core/tests/model/JavaSearchBugs17Tests.java
new file mode 100644
index 0000000..9d75637
--- /dev/null
+++ b/org.eclipse.jdt.core.tests.model/src/org/eclipse/jdt/core/tests/model/JavaSearchBugs17Tests.java
@@ -0,0 +1,1255 @@
+/*******************************************************************************
+ * Copyright (c) 2021 IBM Corporation and others.
+ * All rights reserved. This program and the accompanying materials
+ * are made available under the terms of the Eclipse Public License v1.0
+ * which accompanies this distribution, and is available at
+ * https://www.eclipse.org/legal/epl-2.0/
+ *
+ * SPDX-License-Identifier: EPL-2.0
+ *
+ * This is an implementation of an early-draft specification developed under the Java
+ * Community Process (JCP) and is made available for testing and evaluation purposes
+ * only. The code is not compatible with any specification of the JCP.
+ *
+ * Contributors:
+ *     IBM Corporation - initial API and implementation
+ *******************************************************************************/
+package org.eclipse.jdt.core.tests.model;
+
+import java.io.IOException;
+
+import org.eclipse.core.runtime.CoreException;
+import org.eclipse.jdt.core.ICompilationUnit;
+import org.eclipse.jdt.core.IJavaElement;
+import org.eclipse.jdt.core.IJavaProject;
+import org.eclipse.jdt.core.ILocalVariable;
+import org.eclipse.jdt.core.JavaCore;
+import org.eclipse.jdt.core.JavaModelException;
+import org.eclipse.jdt.core.WorkingCopyOwner;
+import org.eclipse.jdt.core.search.IJavaSearchConstants;
+import org.eclipse.jdt.core.search.IJavaSearchScope;
+import org.eclipse.jdt.core.search.ReferenceMatch;
+import org.eclipse.jdt.core.search.SearchEngine;
+import org.eclipse.jdt.core.search.SearchMatch;
+import org.eclipse.jdt.core.search.SearchPattern;
+import org.eclipse.jdt.core.search.TypeReferenceMatch;
+import org.eclipse.jdt.internal.core.LocalVariable;
+import org.eclipse.jdt.internal.core.SourceField;
+
+import junit.framework.Test;
+
+public class JavaSearchBugs17Tests extends AbstractJavaSearchTests {
+
+	static {
+		// org.eclipse.jdt.internal.core.search.BasicSearchEngine.VERBOSE = true;
+		// TESTS_NUMBERS = new int[] { 19 };
+		// TESTS_RANGE = new int[] { 1, -1 };
+		// TESTS_NAMES = new String[] {"testBug542559_001"};
+	}
+
+	public JavaSearchBugs17Tests(String name) {
+		super(name);
+		this.endChar = "";
+	}
+
+	public static Test suite() {
+		return buildModelTestSuite(JavaSearchBugs17Tests.class, BYTECODE_DECLARATION_ORDER);
+	}
+
+	class TestCollector extends JavaSearchResultCollector {
+		public void acceptSearchMatch(SearchMatch searchMatch) throws CoreException {
+			super.acceptSearchMatch(searchMatch);
+		}
+	}
+
+	class ReferenceCollector extends JavaSearchResultCollector {
+		protected void writeLine() throws CoreException {
+			super.writeLine();
+			ReferenceMatch refMatch = (ReferenceMatch) this.match;
+			IJavaElement localElement = refMatch.getLocalElement();
+			if (localElement != null) {
+				this.line.append("+[");
+				if (localElement.getElementType() == IJavaElement.ANNOTATION) {
+					this.line.append('@');
+					this.line.append(localElement.getElementName());
+					this.line.append(" on ");
+					this.line.append(localElement.getParent().getElementName());
+				} else {
+					this.line.append(localElement.getElementName());
+				}
+				this.line.append(']');
+			}
+		}
+	}
+
+	class TypeReferenceCollector extends ReferenceCollector {
+		protected void writeLine() throws CoreException {
+			super.writeLine();
+			TypeReferenceMatch typeRefMatch = (TypeReferenceMatch) this.match;
+			IJavaElement[] others = typeRefMatch.getOtherElements();
+			int length = others == null ? 0 : others.length;
+			if (length > 0) {
+				this.line.append("+[");
+				for (int i = 0; i < length; i++) {
+					IJavaElement other = others[i];
+					if (i > 0)
+						this.line.append(',');
+					if (other.getElementType() == IJavaElement.ANNOTATION) {
+						this.line.append('@');
+						this.line.append(other.getElementName());
+						this.line.append(" on ");
+						this.line.append(other.getParent().getElementName());
+					} else {
+						this.line.append(other.getElementName());
+					}
+				}
+				this.line.append(']');
+			}
+		}
+	}
+
+	protected IJavaProject setUpJavaProject(final String projectName, String compliance, boolean useFullJCL)
+			throws CoreException, IOException {
+		// copy files in project from source workspace to target workspace
+		IJavaProject setUpJavaProject = super.setUpJavaProject(projectName, compliance, useFullJCL);
+		return setUpJavaProject;
+	}
+
+	IJavaSearchScope getJavaSearchScope() {
+		return SearchEngine.createJavaSearchScope(new IJavaProject[] { getJavaProject("JavaSearchBugs") });
+	}
+
+	IJavaSearchScope getJavaSearchScopeBugs(String packageName, boolean addSubpackages) throws JavaModelException {
+		if (packageName == null)
+			return getJavaSearchScope();
+		return getJavaSearchPackageScope("JavaSearchBugs", packageName, addSubpackages);
+	}
+
+	public ICompilationUnit getWorkingCopy(String path, String source) throws JavaModelException {
+		if (this.wcOwner == null) {
+			this.wcOwner = new WorkingCopyOwner() {
+			};
+		}
+		return getWorkingCopy(path, source, this.wcOwner);
+	}
+
+	@Override
+	public void setUpSuite() throws Exception {
+		super.setUpSuite();
+		JAVA_PROJECT = setUpJavaProject("JavaSearchBugs", "17");
+	}
+
+	public void tearDownSuite() throws Exception {
+		deleteProject("JavaSearchBugs");
+		super.tearDownSuite();
+	}
+
+	protected void setUp() throws Exception {
+		super.setUp();
+		this.resultCollector = new TestCollector();
+		this.resultCollector.showAccuracy(true);
+	}
+
+	// switch pattern search - test reference of an object in case statement
+	public void testBug573943_001() throws CoreException {
+		this.workingCopies = new ICompilationUnit[1];
+		this.workingCopies[0] = getWorkingCopy("/JavaSearchBugs/src/X.java",
+				"public class X {\n" +
+						"public static void main(String[] args) {\n" +
+						"foo(Integer.valueOf(5));\n" +
+						"foo(new Object());\n" +
+						"}\n" +
+						"private static void foo(Object o) {\n" +
+						" switch (o) {\n" +
+						"	case Integer i     -> System.out.println(\"Integer:\" + i);\n" +
+						"	case String /*here*/s     -> System.out.println(\"String:\" + s + s);\n" +
+						"	default       -> System.out.println(\"Object\" + o);\n" +
+						" 	}\n" +
+						"}\n" +
+						"}\n"
+				);
+		IJavaProject javaProject = this.workingCopies[0].getJavaProject(); // assuming single project for all
+		// working copies
+		String old = javaProject.getOption(JavaCore.COMPILER_PB_ENABLE_PREVIEW_FEATURES, true);
+		try {
+			javaProject.setOption(JavaCore.COMPILER_PB_ENABLE_PREVIEW_FEATURES, JavaCore.ENABLED);
+			String str = this.workingCopies[0].getSource();
+			String selection = "/*here*/s";
+			int start = str.indexOf(selection);
+			int length = selection.length();
+
+			IJavaElement[] elements = this.workingCopies[0].codeSelect(start, length);
+			ILocalVariable local = (ILocalVariable) elements[0];
+			search(local, REFERENCES, EXACT_RULE);
+			assertSearchResults("src/X.java void X.foo(Object) [s] EXACT_MATCH\n"
+					+ "src/X.java void X.foo(Object) [s] EXACT_MATCH");
+		} finally {
+			javaProject.setOption(JavaCore.COMPILER_PB_ENABLE_PREVIEW_FEATURES, old);
+		}
+	}
+	// find reference on a field in switch pattern
+	public void testBug573943_002() throws CoreException {
+		this.workingCopies = new ICompilationUnit[1];
+		this.workingCopies[0] = getWorkingCopy("/JavaSearchBugs/src/X.java",
+				"public class X {\n" +
+						"public static  int /*here*/field \n" +
+						"public static void main(String[] args) {\n" +
+						"foo(Integer.valueOf(5));\n" +
+						"foo(new Object());\n" +
+						"}\n" +
+						"private static void foo(Object o) {\n" +
+						" switch (o) {\n" +
+						"	case Integer i   -> System.out.println(\"Integer:\" + i);\n" +
+						"	case String s     -> System.out.println(\"String:\" + s + field);\n" +
+						"	default       -> System.out.println(\"Object\" + o);\n" +
+						" 	}\n" +
+						"}\n" +
+						"}\n"
+				);
+		IJavaProject javaProject = this.workingCopies[0].getJavaProject(); // assuming single project for all
+		// working copies
+		String old = javaProject.getOption(JavaCore.COMPILER_PB_ENABLE_PREVIEW_FEATURES, true);
+		try {
+			javaProject.setOption(JavaCore.COMPILER_PB_ENABLE_PREVIEW_FEATURES, JavaCore.ENABLED);
+			String str = this.workingCopies[0].getSource();
+			String selection = "/*here*/field";
+			int start = str.indexOf(selection);
+			int length = selection.length();
+
+			IJavaElement[] elements = this.workingCopies[0].codeSelect(start, length);
+			SourceField field = (SourceField) elements[0];
+			search(field, REFERENCES, EXACT_RULE);
+			assertSearchResults("src/X.java void X.foo(Object) [field] EXACT_MATCH");
+		} finally {
+			javaProject.setOption(JavaCore.COMPILER_PB_ENABLE_PREVIEW_FEATURES, old);
+		}
+	}
+	// find all occurrence of a field in switch pattern
+	public void testBug573943_003() throws CoreException {
+		this.workingCopies = new ICompilationUnit[1];
+		this.workingCopies[0] = getWorkingCopy("/JavaSearchBugs/src/X.java",
+				"public class X {\n" +
+						"public static  int /*here*/field \n" +
+						"public static void main(String[] args) {\n" +
+						"foo(Integer.valueOf(5));\n" +
+						"foo(new Object());\n" +
+						"}\n" +
+						"private static void foo(Object o) {\n" +
+						" switch (o) {\n" +
+						"	case Integer i   -> System.out.println(\"Integer:\" + i);\n" +
+						"	case String s     -> System.out.println(\"String:\" + s + field);\n" +
+						"	default       -> System.out.println(\"Object\" + o);\n" +
+						" 	}\n" +
+						"}\n" +
+						"}\n"
+				);
+		IJavaProject javaProject = this.workingCopies[0].getJavaProject(); // assuming single project for all
+		// working copies
+		String old = javaProject.getOption(JavaCore.COMPILER_PB_ENABLE_PREVIEW_FEATURES, true);
+		try {
+			javaProject.setOption(JavaCore.COMPILER_PB_ENABLE_PREVIEW_FEATURES, JavaCore.ENABLED);
+			String str = this.workingCopies[0].getSource();
+			String selection = "/*here*/field";
+			int start = str.indexOf(selection);
+			int length = selection.length();
+
+			IJavaElement[] elements = this.workingCopies[0].codeSelect(start, length);
+			SourceField field = (SourceField) elements[0];
+			search(field, ALL_OCCURRENCES, EXACT_RULE);
+			assertSearchResults("src/X.java X.field [field] EXACT_MATCH\n"
+					+ "src/X.java void X.foo(Object) [field] EXACT_MATCH");
+		} finally {
+			javaProject.setOption(JavaCore.COMPILER_PB_ENABLE_PREVIEW_FEATURES, old);
+		}
+	}
+
+	// find all reference of a local variable in switch pattern
+	public void testBug573943_004() throws CoreException {
+		this.workingCopies = new ICompilationUnit[1];
+		this.workingCopies[0] = getWorkingCopy("/JavaSearchBugs/src/X.java",
+				"public class X {\n" +
+						"public static  int /*here*/field \n" +
+						"public static void main(String[] args) {\n" +
+						"foo(Integer.valueOf(5));\n" +
+						"foo(new Object());\n" +
+						"}\n" +
+						"private static void foo(Object o) {\n" +
+						" int /*here*/local=0" +
+						" switch (o) {\n" +
+						"	case Integer i   -> System.out.println(\"Integer:\" + i);\n" +
+						"	case String s     -> System.out.println(\"String:\" + s + local);\n" +
+						"	default       -> System.out.println(\"Object\" + o);\n" +
+						" 	}\n" +
+						"}\n" +
+						"}\n"
+				);
+		IJavaProject javaProject = this.workingCopies[0].getJavaProject(); // assuming single project for all
+		// working copies
+		String old = javaProject.getOption(JavaCore.COMPILER_PB_ENABLE_PREVIEW_FEATURES, true);
+		try {
+			javaProject.setOption(JavaCore.COMPILER_PB_ENABLE_PREVIEW_FEATURES, JavaCore.ENABLED);
+			String str = this.workingCopies[0].getSource();
+			String selection = "/*here*/local";
+			int start = str.indexOf(selection);
+			int length = selection.length();
+
+			IJavaElement[] elements = this.workingCopies[0].codeSelect(start, length);
+			ILocalVariable field = (ILocalVariable) elements[0];
+			search(field, REFERENCES, EXACT_RULE);
+			assertSearchResults("src/X.java void X.foo(Object) [local] EXACT_MATCH");
+		} finally {
+			javaProject.setOption(JavaCore.COMPILER_PB_ENABLE_PREVIEW_FEATURES, old);
+		}
+	}
+	// find all reference of a local variable in switch pattern
+	public void testBug573943_005() throws CoreException {
+		this.workingCopies = new ICompilationUnit[1];
+		this.workingCopies[0] = getWorkingCopy("/JavaSearchBugs/src/X.java",
+				"public class X {\n" +
+						"public static  int /*here*/field \n" +
+						"public static void main(String[] args) {\n" +
+						"foo(Integer.valueOf(5));\n" +
+						"foo(new Object());\n" +
+						"}\n" +
+						"private static void foo(Object o) {\n" +
+						" int /*here*/local=0" +
+						" switch (o) {\n" +
+						"	case Integer i   -> System.out.println(\"Integer:\" + i +local);\n" +
+						"	case String s     -> System.out.println(\"String:\" + s + local);\n" +
+						"	default       -> System.out.println(\"Object\" + o);\n" +
+						" 	}\n" +
+						"}\n" +
+						"}\n"
+				);
+		IJavaProject javaProject = this.workingCopies[0].getJavaProject(); // assuming single project for all
+		// working copies
+		String old = javaProject.getOption(JavaCore.COMPILER_PB_ENABLE_PREVIEW_FEATURES, true);
+		try {
+			javaProject.setOption(JavaCore.COMPILER_PB_ENABLE_PREVIEW_FEATURES, JavaCore.ENABLED);
+			String str = this.workingCopies[0].getSource();
+			String selection = "/*here*/local";
+			int start = str.indexOf(selection);
+			int length = selection.length();
+
+			IJavaElement[] elements = this.workingCopies[0].codeSelect(start, length);
+			ILocalVariable field = (ILocalVariable) elements[0];
+			search(field, ALL_OCCURRENCES, EXACT_RULE);
+			assertSearchResults("src/X.java void X.foo(Object).local [local] EXACT_MATCH\n"
+					+ "src/X.java void X.foo(Object) [local] EXACT_MATCH\n"
+					+ "src/X.java void X.foo(Object) [local] EXACT_MATCH");
+		} finally {
+			javaProject.setOption(JavaCore.COMPILER_PB_ENABLE_PREVIEW_FEATURES, old);
+		}
+	}
+	// find all occurrence of a field in switch case statement and switch expression
+	public void testBug573943_006() throws CoreException {
+		this.workingCopies = new ICompilationUnit[1];
+		this.workingCopies[0] = getWorkingCopy("/JavaSearchBugs/src/X.java",
+				"public class X {\n" +
+						"public static  int /*here*/field \n" +
+						"public static void main(String[] args) {\n" +
+						"foo(Integer.valueOf(5));\n" +
+						"foo(new Object());\n" +
+						"}\n" +
+						"private static void foo(Object o) {\n" +
+						" switch (o) {\n" +
+						"	case Integer i && field > 0  -> System.out.println(\"Integer:\" + i);\n" +
+						"	case String s     -> System.out.println(\"String:\" + s + field);\n" +
+						"	default       -> System.out.println(\"Object\" + o);\n" +
+						" 	}\n" +
+						"}\n" +
+						"}\n"
+				);
+		IJavaProject javaProject = this.workingCopies[0].getJavaProject(); // assuming single project for all
+		// working copies
+		String old = javaProject.getOption(JavaCore.COMPILER_PB_ENABLE_PREVIEW_FEATURES, true);
+		try {
+			javaProject.setOption(JavaCore.COMPILER_PB_ENABLE_PREVIEW_FEATURES, JavaCore.ENABLED);
+			String str = this.workingCopies[0].getSource();
+			String selection = "/*here*/field";
+			int start = str.indexOf(selection);
+			int length = selection.length();
+
+			IJavaElement[] elements = this.workingCopies[0].codeSelect(start, length);
+			SourceField field = (SourceField) elements[0];
+			search(field, ALL_OCCURRENCES, EXACT_RULE);
+			assertSearchResults("src/X.java X.field [field] EXACT_MATCH\n"
+					+ "src/X.java void X.foo(Object) [field] EXACT_MATCH\n"
+					+ "src/X.java void X.foo(Object) [field] EXACT_MATCH");
+		} finally {
+			javaProject.setOption(JavaCore.COMPILER_PB_ENABLE_PREVIEW_FEATURES, old);
+		}
+	}
+	// find all reference of a local variable in switch pattern amd case statements
+	public void testBug573943_007() throws CoreException {
+		this.workingCopies = new ICompilationUnit[1];
+		this.workingCopies[0] = getWorkingCopy("/JavaSearchBugs/src/X.java",
+				"public class X {\n" +
+						"public static  int /*here*/field \n" +
+						"public static void main(String[] args) {\n" +
+						"foo(Integer.valueOf(5));\n" +
+						"foo(new Object());\n" +
+						"}\n" +
+						"private static void foo(Object o) {\n" +
+						" int /*here*/local=0" +
+						" switch (o) {\n" +
+						"	case Integer i && local >9  -> System.out.println(\"Integer:\" + i +local);\n" +
+						"	case String s     -> System.out.println(\"String:\" + s + local);\n" +
+						"	default       -> System.out.println(\"Object\" + o);\n" +
+						" 	}\n" +
+						"}\n" +
+						"}\n"
+				);
+		IJavaProject javaProject = this.workingCopies[0].getJavaProject(); // assuming single project for all
+		// working copies
+		String old = javaProject.getOption(JavaCore.COMPILER_PB_ENABLE_PREVIEW_FEATURES, true);
+		try {
+			javaProject.setOption(JavaCore.COMPILER_PB_ENABLE_PREVIEW_FEATURES, JavaCore.ENABLED);
+			String str = this.workingCopies[0].getSource();
+			String selection = "/*here*/local";
+			int start = str.indexOf(selection);
+			int length = selection.length();
+
+			IJavaElement[] elements = this.workingCopies[0].codeSelect(start, length);
+			ILocalVariable field = (ILocalVariable) elements[0];
+			search(field, ALL_OCCURRENCES, EXACT_RULE);
+			assertSearchResults("src/X.java void X.foo(Object).local [local] EXACT_MATCH\n"
+					+ "src/X.java void X.foo(Object) [local] EXACT_MATCH\n"
+					+ "src/X.java void X.foo(Object) [local] EXACT_MATCH\n"
+					+ "src/X.java void X.foo(Object) [local] EXACT_MATCH");
+		} finally {
+			javaProject.setOption(JavaCore.COMPILER_PB_ENABLE_PREVIEW_FEATURES, old);
+		}
+	}
+	// switch pattern search - test reference of an object in case statement as well as switch expression
+		public void testBug573943_008() throws CoreException {
+			this.workingCopies = new ICompilationUnit[1];
+			this.workingCopies[0] = getWorkingCopy("/JavaSearchBugs/src/X.java",
+					"public class X {\n" +
+							"public static void main(String[] args) {\n" +
+							"foo(Integer.valueOf(5));\n" +
+							"foo(new Object());\n" +
+							"}\n" +
+							"private static void foo(Object o) {\n" +
+							" switch (o) {\n" +
+							"	case Integer i     -> System.out.println(\"Integer:\" + i);\n" +
+							"	case String /*here*/s && s.hashCode()>0    -> System.out.println(\"String:\" );\n" +
+							"	default       -> System.out.println(\"Object\" + o);\n" +
+							" 	}\n" +
+							"}\n" +
+							"}\n"
+					);
+			IJavaProject javaProject = this.workingCopies[0].getJavaProject(); // assuming single project for all
+			// working copies
+			String old = javaProject.getOption(JavaCore.COMPILER_PB_ENABLE_PREVIEW_FEATURES, true);
+			try {
+				javaProject.setOption(JavaCore.COMPILER_PB_ENABLE_PREVIEW_FEATURES, JavaCore.ENABLED);
+				String str = this.workingCopies[0].getSource();
+				String selection = "/*here*/s";
+				int start = str.indexOf(selection);
+				int length = selection.length();
+
+				IJavaElement[] elements = this.workingCopies[0].codeSelect(start, length);
+				ILocalVariable local = (ILocalVariable) elements[0];
+				search(local, REFERENCES, EXACT_RULE);
+				assertSearchResults("src/X.java void X.foo(Object) [s] EXACT_MATCH");
+			} finally {
+				javaProject.setOption(JavaCore.COMPILER_PB_ENABLE_PREVIEW_FEATURES, old);
+			}
+		}
+
+		// switch pattern search - test reference of an custom class object in case statement
+		public void testBug573943_009() throws CoreException {
+			this.workingCopies = new ICompilationUnit[1];
+			this.workingCopies[0] = getWorkingCopy("/JavaSearchBugs/src/X.java",
+					"sealed interface I permits A, B {}\n" +
+					"final class A implements S {}\n" +
+					"final class B implements S {}\n" +
+					"public class X {\n" +
+							"public static void main(String[] args) {\n" +
+							"foo(new A());\n" +
+							"}\n" +
+							"private static void foo(S o) {\n" +
+							" switch (o) {\n" +
+							"	case A /*here*/a :     System.out.println(\"A:\" + a +a); break;\n" +
+							"	case B b :     System.out.println(\"B:\" + b);\n" +
+							"	default  : System.out.println(\"Object\" + o);\n" +
+							" 	}\n" +
+							"}\n" +
+							"}\n"
+					);
+			IJavaProject javaProject = this.workingCopies[0].getJavaProject(); // assuming single project for all
+			// working copies
+			String old = javaProject.getOption(JavaCore.COMPILER_PB_ENABLE_PREVIEW_FEATURES, true);
+			try {
+				javaProject.setOption(JavaCore.COMPILER_PB_ENABLE_PREVIEW_FEATURES, JavaCore.ENABLED);
+				String str = this.workingCopies[0].getSource();
+				String selection = "/*here*/a";
+				int start = str.indexOf(selection);
+				int length = selection.length();
+
+				IJavaElement[] elements = this.workingCopies[0].codeSelect(start, length);
+				ILocalVariable local = (ILocalVariable) elements[0];
+				search(local, REFERENCES, EXACT_RULE);
+				assertSearchResults("src/X.java void X.foo(S) [a] EXACT_MATCH\n"
+						+ "src/X.java void X.foo(S) [a] EXACT_MATCH");
+			} finally {
+				javaProject.setOption(JavaCore.COMPILER_PB_ENABLE_PREVIEW_FEATURES, old);
+			}
+		}
+		// switch pattern search - test reference of an custom class object in case statement amd switch statement
+		public void testBug573943_010() throws CoreException {
+			this.workingCopies = new ICompilationUnit[1];
+			this.workingCopies[0] = getWorkingCopy("/JavaSearchBugs/src/X.java",
+					"sealed interface I permits A, B {}\n" +
+					"final class A implements S {}\n" +
+					"final class B implements S {}\n" +
+					"public class X {\n" +
+							"public static void main(String[] args) {\n" +
+							"foo(new A());\n" +
+							"}\n" +
+							"private static void foo(S o) {\n" +
+							" switch (o) {\n" +
+							"	case A /*here*/a && a.hashCode()> 0 :     System.out.println(\"A:\" + a +a); break;\n" +
+							"	case B b :     System.out.println(\"B:\" + b);\n" +
+							"	default  :     System.out.println(\"Object\" + o);\n" +
+							" 	}\n" +
+							"}\n" +
+							"}\n"
+					);
+			IJavaProject javaProject = this.workingCopies[0].getJavaProject(); // assuming single project for all
+			// working copies
+			String old = javaProject.getOption(JavaCore.COMPILER_PB_ENABLE_PREVIEW_FEATURES, true);
+			try {
+				javaProject.setOption(JavaCore.COMPILER_PB_ENABLE_PREVIEW_FEATURES, JavaCore.ENABLED);
+				String str = this.workingCopies[0].getSource();
+				String selection = "/*here*/a";
+				int start = str.indexOf(selection);
+				int length = selection.length();
+
+				IJavaElement[] elements = this.workingCopies[0].codeSelect(start, length);
+				ILocalVariable local = (ILocalVariable) elements[0];
+				search(local, REFERENCES, EXACT_RULE);
+				assertSearchResults("src/X.java void X.foo(S) [a] EXACT_MATCH\n"
+						+ "src/X.java void X.foo(S) [a] EXACT_MATCH\n"
+						+ "src/X.java void X.foo(S) [a] EXACT_MATCH");
+			} finally {
+				javaProject.setOption(JavaCore.COMPILER_PB_ENABLE_PREVIEW_FEATURES, old);
+			}
+		}
+		// switch pattern search - test reference of an custom record object in case statement
+		public void testBug573943_011() throws CoreException {
+			this.workingCopies = new ICompilationUnit[1];
+			this.workingCopies[0] = getWorkingCopy("/JavaSearchBugs/src/X.java",
+					"sealed interface I permits A, B {}\n" +
+					"record A (int i) implements S {}\n" +
+					"record B (int i) implements S {}\n" +
+					"public class X {\n" +
+							"public static void main(String[] args) {\n" +
+							"foo(new A());\n" +
+							"}\n" +
+							"private static void foo(S o) {\n" +
+							" switch (o) {\n" +
+							"	case A /*here*/a :     System.out.println(\"A:\" + a +a); break;\n" +
+							"	case B b :     System.out.println(\"B:\" + b);break;\n" +
+							"	default   :    System.out.println(\"Object\" + o);\n" +
+							" 	}\n" +
+							"}\n" +
+							"}\n"
+					);
+			IJavaProject javaProject = this.workingCopies[0].getJavaProject(); // assuming single project for all
+			// working copies
+			String old = javaProject.getOption(JavaCore.COMPILER_PB_ENABLE_PREVIEW_FEATURES, true);
+			try {
+				javaProject.setOption(JavaCore.COMPILER_PB_ENABLE_PREVIEW_FEATURES, JavaCore.ENABLED);
+				String str = this.workingCopies[0].getSource();
+				String selection = "/*here*/a";
+				int start = str.indexOf(selection);
+				int length = selection.length();
+
+				IJavaElement[] elements = this.workingCopies[0].codeSelect(start, length);
+				ILocalVariable local = (ILocalVariable) elements[0];
+				search(local, REFERENCES, EXACT_RULE);
+				assertSearchResults("src/X.java void X.foo(S) [a] EXACT_MATCH\n"
+						+ "src/X.java void X.foo(S) [a] EXACT_MATCH");
+			} finally {
+				javaProject.setOption(JavaCore.COMPILER_PB_ENABLE_PREVIEW_FEATURES, old);
+			}
+		}
+		// switch pattern search - test reference of an custom record object in case statement and switch statement
+				public void testBug573943_012() throws CoreException {
+					this.workingCopies = new ICompilationUnit[1];
+					this.workingCopies[0] = getWorkingCopy("/JavaSearchBugs/src/X.java",
+							"sealed interface I permits A, B {}\n" +
+							"record A (int i) implements S {}\n" +
+							"record B (int i) implements S {}\n" +
+							"public class X {\n" +
+									"public static void main(String[] args) {\n" +
+									"foo(new A());\n" +
+									"}\n" +
+									"private static void foo(S o) {\n" +
+									" switch (o) {\n" +
+									"	case A /*here*/a && a.hashCode() :     System.out.println(\"A:\" + a +a); break;\n" +
+									"	case B b :     System.out.println(\"B:\" + b);\n" +
+									"	default  :     System.out.println(\"Object\" + o);\n" +
+									" 	}\n" +
+									"}\n" +
+									"}\n"
+							);
+					IJavaProject javaProject = this.workingCopies[0].getJavaProject(); // assuming single project for all
+					// working copies
+					String old = javaProject.getOption(JavaCore.COMPILER_PB_ENABLE_PREVIEW_FEATURES, true);
+					try {
+						javaProject.setOption(JavaCore.COMPILER_PB_ENABLE_PREVIEW_FEATURES, JavaCore.ENABLED);
+						String str = this.workingCopies[0].getSource();
+						String selection = "/*here*/a";
+						int start = str.indexOf(selection);
+						int length = selection.length();
+
+						IJavaElement[] elements = this.workingCopies[0].codeSelect(start, length);
+						ILocalVariable local = (ILocalVariable) elements[0];
+						search(local, REFERENCES, EXACT_RULE);
+						assertSearchResults("src/X.java void X.foo(S) [a] EXACT_MATCH\n"
+								+ "src/X.java void X.foo(S) [a] EXACT_MATCH\n"
+								+ "src/X.java void X.foo(S) [a] EXACT_MATCH");
+					} finally {
+						javaProject.setOption(JavaCore.COMPILER_PB_ENABLE_PREVIEW_FEATURES, old);
+					}
+				}
+				// switch pattern search - test reference of an custom class object in case statement and switch expression
+				public void testBug573943_013() throws CoreException {
+					this.workingCopies = new ICompilationUnit[1];
+					this.workingCopies[0] = getWorkingCopy("/JavaSearchBugs/src/X.java",
+							"sealed interface I permits A, B {}\n" +
+							"final class A implements S {}\n" +
+							"final class B implements S {}\n" +
+							"public class X {\n" +
+									"public static void main(String[] args) {\n" +
+									"foo(new A());\n" +
+									"}\n" +
+									"private static int foo(S o) {\n" +
+									" switch (o) {\n" +
+									"	case A /*here*/a && a.hashCode()> 0 -> 1;\n" +
+									"	case B b ->2;\n" +
+									"	default  -> 3;\n" +
+									" 	}\n" +
+									"}\n" +
+									"}\n"
+							);
+					IJavaProject javaProject = this.workingCopies[0].getJavaProject(); // assuming single project for all
+					// working copies
+					String old = javaProject.getOption(JavaCore.COMPILER_PB_ENABLE_PREVIEW_FEATURES, true);
+					try {
+						javaProject.setOption(JavaCore.COMPILER_PB_ENABLE_PREVIEW_FEATURES, JavaCore.ENABLED);
+						String str = this.workingCopies[0].getSource();
+						String selection = "/*here*/a";
+						int start = str.indexOf(selection);
+						int length = selection.length();
+
+						IJavaElement[] elements = this.workingCopies[0].codeSelect(start, length);
+						ILocalVariable local = (ILocalVariable) elements[0];
+						search(local, REFERENCES, EXACT_RULE);
+						assertSearchResults("src/X.java int X.foo(S) [a] EXACT_MATCH");
+					} finally {
+						javaProject.setOption(JavaCore.COMPILER_PB_ENABLE_PREVIEW_FEATURES, old);
+					}
+				}
+				// switch pattern search - test reference of an object in case statement as well as switch pattern
+				public void testBug573943_014() throws CoreException {
+					this.workingCopies = new ICompilationUnit[1];
+					this.workingCopies[0] = getWorkingCopy("/JavaSearchBugs/src/X.java",
+							"public class X {\n" +
+									"public static void main(String[] args) {\n" +
+									"foo(Integer.valueOf(5));\n" +
+									"foo(new Object());\n" +
+									"}\n" +
+									"private static void foo(Object o) {\n" +
+									" switch (o) {\n" +
+									"	case Integer i     : System.out.println(\"Integer:\" + i);break;\n" +
+									"	case String /*here*/s     : System.out.println(\"String:\" + s + s);break;\n" +
+									"	default       : System.out.println(\"Object\" + o);\n" +
+									" 	}\n" +
+									"}\n" +
+									"}\n"
+							);
+					IJavaProject javaProject = this.workingCopies[0].getJavaProject(); // assuming single project for all
+					// working copies
+					String old = javaProject.getOption(JavaCore.COMPILER_PB_ENABLE_PREVIEW_FEATURES, true);
+					try {
+						javaProject.setOption(JavaCore.COMPILER_PB_ENABLE_PREVIEW_FEATURES, JavaCore.ENABLED);
+						String str = this.workingCopies[0].getSource();
+						System.out.println(str);
+						String selection = "/*here*/s";
+						int start = str.indexOf(selection);
+						int length = selection.length();
+
+						IJavaElement[] elements = this.workingCopies[0].codeSelect(start, length);
+						ILocalVariable local = (ILocalVariable) elements[0];
+						search(local, REFERENCES, EXACT_RULE);
+						assertSearchResults("src/X.java void X.foo(Object) [s] EXACT_MATCH\n"
+								+ "src/X.java void X.foo(Object) [s] EXACT_MATCH");
+					} finally {
+						javaProject.setOption(JavaCore.COMPILER_PB_ENABLE_PREVIEW_FEATURES, old);
+					}
+				}
+				// switch pattern search - test reference of an object in case statement as well as switch pattern
+				public void testBug573943_015() throws CoreException {
+					this.workingCopies = new ICompilationUnit[1];
+					this.workingCopies[0] = getWorkingCopy("/JavaSearchBugs/src/X.java",
+							"public class X {\n" +
+									"public static void main(String[] args) {\n" +
+									"foo(Integer.valueOf(5));\n" +
+									"foo(new Object());\n" +
+									"}\n" +
+									"private static void foo(Object o) {\n" +
+									" switch (o) {\n" +
+									"	case Integer i     : System.out.println(\"Integer:\" + i);break;\n" +
+									"	case String /*here*/s && s.hashCode()>0    : System.out.println(\"String:\" );break;\n" +
+									"	default       : System.out.println(\"Object\" + o);\n" +
+									" 	}\n" +
+									"}\n" +
+									"}\n"
+							);
+					IJavaProject javaProject = this.workingCopies[0].getJavaProject(); // assuming single project for all
+					// working copies
+					String old = javaProject.getOption(JavaCore.COMPILER_PB_ENABLE_PREVIEW_FEATURES, true);
+					try {
+						javaProject.setOption(JavaCore.COMPILER_PB_ENABLE_PREVIEW_FEATURES, JavaCore.ENABLED);
+						String str = this.workingCopies[0].getSource();
+						String selection = "/*here*/s";
+						int start = str.indexOf(selection);
+						int length = selection.length();
+
+						IJavaElement[] elements = this.workingCopies[0].codeSelect(start, length);
+						ILocalVariable local = (ILocalVariable) elements[0];
+						search(local, REFERENCES, EXACT_RULE);
+						assertSearchResults("src/X.java void X.foo(Object) [s] EXACT_MATCH");
+					} finally {
+						javaProject.setOption(JavaCore.COMPILER_PB_ENABLE_PREVIEW_FEATURES, old);
+					}
+				}
+				// type reference with a switch expression pattern
+				// see testBug573943_012 for switch pattern and type reference
+				public void testBug573943_016() throws CoreException {
+					this.workingCopies = new ICompilationUnit[1];
+					this.workingCopies[0] = getWorkingCopy("/JavaSearchBugs/src/X.java",
+							"sealed interface I permits A, B {}\n" +
+							"final class A implements S {}\n" +
+							"final class B implements S {}\n" +
+							"public class X {\n" +
+									"public static void main(String[] args) {\n" +
+									"foo(new A());\n" +
+									"}\n" +
+									"private static void foo(S o) {\n" +
+									" switch (o) {\n" +
+									"	case A /*here*/a ->     System.out.println(\"A:\" + a +a); \n" +
+									"	case B b ->    System.out.println(\"B:\" + b);\n" +
+									"	default  -> System.out.println(\"Object\" + o);\n" +
+									" 	}\n" +
+									"}\n" +
+									"}\n"
+							);
+					IJavaProject javaProject = this.workingCopies[0].getJavaProject(); // assuming single project for all
+					// working copies
+					String old = javaProject.getOption(JavaCore.COMPILER_PB_ENABLE_PREVIEW_FEATURES, true);
+					try {
+						javaProject.setOption(JavaCore.COMPILER_PB_ENABLE_PREVIEW_FEATURES, JavaCore.ENABLED);
+						String str = this.workingCopies[0].getSource();
+						String selection = "/*here*/a";
+						int start = str.indexOf(selection);
+						int length = selection.length();
+
+						IJavaElement[] elements = this.workingCopies[0].codeSelect(start, length);
+						ILocalVariable local = (ILocalVariable) elements[0];
+						search(local, REFERENCES, EXACT_RULE);
+						assertSearchResults("src/X.java void X.foo(S) [a] EXACT_MATCH\n"
+								+ "src/X.java void X.foo(S) [a] EXACT_MATCH");
+					} finally {
+						javaProject.setOption(JavaCore.COMPILER_PB_ENABLE_PREVIEW_FEATURES, old);
+					}
+				}
+
+				// type reference with a switch expression pattern
+				public void testBug573943_017() throws CoreException {
+					this.workingCopies = new ICompilationUnit[1];
+					this.workingCopies[0] = getWorkingCopy("/JavaSearchBugs/src/X.java",
+							"sealed interface I permits A, B {}\n" +
+							"final class A implements S {}\n" +
+							"final class B implements S {}\n" +
+							"public class X {\n" +
+									"public static void main(String[] args) {\n" +
+									"foo(new A());\n" +
+									"}\n" +
+									"private static void foo(S o) {\n" +
+									" switch (o) {\n" +
+									"	case A /*here*/a && a.toString().length()>2 ->     System.out.println(\"A:\" + a +a); \n" +
+									"	case B b ->    System.out.println(\"B:\" + b);\n" +
+									"	default  -> System.out.println(\"Object\" + o);\n" +
+									" 	}\n" +
+									"}\n" +
+									"}\n"
+							);
+					IJavaProject javaProject = this.workingCopies[0].getJavaProject(); // assuming single project for all
+					// working copies
+					String old = javaProject.getOption(JavaCore.COMPILER_PB_ENABLE_PREVIEW_FEATURES, true);
+					try {
+						javaProject.setOption(JavaCore.COMPILER_PB_ENABLE_PREVIEW_FEATURES, JavaCore.ENABLED);
+						String str = this.workingCopies[0].getSource();
+						String selection = "/*here*/a";
+						int start = str.indexOf(selection);
+						int length = selection.length();
+
+						IJavaElement[] elements = this.workingCopies[0].codeSelect(start, length);
+						ILocalVariable local = (ILocalVariable) elements[0];
+						search(local, REFERENCES, EXACT_RULE);
+						assertSearchResults("src/X.java void X.foo(S) [a] EXACT_MATCH\n"
+									+"src/X.java void X.foo(S) [a] EXACT_MATCH\n"
+								+ "src/X.java void X.foo(S) [a] EXACT_MATCH");
+					} finally {
+						javaProject.setOption(JavaCore.COMPILER_PB_ENABLE_PREVIEW_FEATURES, old);
+					}
+				}
+				// selection of pattern variable in case statement and verify that it is local variable
+				public void testBug573943_018() throws CoreException {
+					this.workingCopies = new ICompilationUnit[1];
+					this.workingCopies[0] = getWorkingCopy("/JavaSearchBugs/src/X.java",
+							"public class X {\n" +
+									"public static void main(String[] args) {\n" +
+									"foo(Integer.valueOf(5));\n" +
+									"foo(new Object());\n" +
+									"}\n" +
+									"private static void foo(Object o) {\n" +
+									" switch (o) {\n" +
+									"	case Integer i     -> System.out.println(\"Integer:\" + i);\n" +
+									"	case String s     -> System.out.println(\"String:\" + /*here*/s + s);\n" +
+									"	default       -> System.out.println(\"Object\" + o);\n" +
+									" 	}\n" +
+									"}\n" +
+									"}\n"
+							);
+					IJavaProject javaProject = this.workingCopies[0].getJavaProject(); // assuming single project for all
+					// working copies
+					String old = javaProject.getOption(JavaCore.COMPILER_PB_ENABLE_PREVIEW_FEATURES, true);
+					try {
+						javaProject.setOption(JavaCore.COMPILER_PB_ENABLE_PREVIEW_FEATURES, JavaCore.ENABLED);
+						String str = this.workingCopies[0].getSource();
+						String selection = "/*here*/s";
+						int start = str.indexOf(selection);
+						int length = selection.length();
+
+						IJavaElement[] elements = this.workingCopies[0].codeSelect(start, length);
+						assertTrue(elements[0] instanceof LocalVariable);
+
+					} finally {
+						javaProject.setOption(JavaCore.COMPILER_PB_ENABLE_PREVIEW_FEATURES, old);
+					}
+				}
+				// selection of pattern variable in case statement and search for declaration
+				public void testBug573943_019() throws CoreException {
+					this.workingCopies = new ICompilationUnit[1];
+					this.workingCopies[0] = getWorkingCopy("/JavaSearchBugs/src/X.java",
+							"public class X {\n" +
+									"public static void main(String[] args) {\n" +
+									"foo(Integer.valueOf(5));\n" +
+									"foo(new Object());\n" +
+									"}\n" +
+									"private static void foo(Object o) {\n" +
+									" switch (o) {\n" +
+									"	case Integer i     -> System.out.println(\"Integer:\" + i);\n" +
+									"	case String s     -> System.out.println(\"String:\" + /*here*/s + s);\n" +
+									"	default       -> System.out.println(\"Object\" + o);\n" +
+									" 	}\n" +
+									"}\n" +
+									"}\n"
+							);
+					IJavaProject javaProject = this.workingCopies[0].getJavaProject(); // assuming single project for all
+					// working copies
+					String old = javaProject.getOption(JavaCore.COMPILER_PB_ENABLE_PREVIEW_FEATURES, true);
+					try {
+						javaProject.setOption(JavaCore.COMPILER_PB_ENABLE_PREVIEW_FEATURES, JavaCore.ENABLED);
+						String str = this.workingCopies[0].getSource();
+						String selection = "/*here*/s";
+						int start = str.indexOf(selection);
+						int length = selection.length();
+
+						IJavaElement[] elements = this.workingCopies[0].codeSelect(start, length);
+						ILocalVariable local = (ILocalVariable) elements[0];
+						search(local, DECLARATIONS, EXACT_RULE);
+						assertSearchResults("src/X.java void X.foo(Object).s [s] EXACT_MATCH");
+
+					} finally {
+						javaProject.setOption(JavaCore.COMPILER_PB_ENABLE_PREVIEW_FEATURES, old);
+					}
+				}
+				// selection of guarded pattern variable in case statement and verify that it is local variable
+				public void testBug573943_020() throws CoreException {
+					this.workingCopies = new ICompilationUnit[1];
+					this.workingCopies[0] = getWorkingCopy("/JavaSearchBugs/src/X.java",
+							"public class X {\n" +
+									"public static void main(String[] args) {\n" +
+									"foo(Integer.valueOf(5));\n" +
+									"foo(new Object());\n" +
+									"}\n" +
+									"private static void foo(Object o) {\n" +
+									" final int a=0; \n" +
+									" switch (o) {\n" +
+									"	case Integer i  && a > 5  -> System.out.println(\"Integer:\" + /*here*/i);\n" +
+									"	case String s     -> System.out.println(\"String:\" + s + s);\n" +
+									"	default       -> System.out.println(\"Object\" + o);\n" +
+									" 	}\n" +
+									"}\n" +
+									"}\n"
+							);
+					IJavaProject javaProject = this.workingCopies[0].getJavaProject(); // assuming single project for all
+					// working copies
+					String old = javaProject.getOption(JavaCore.COMPILER_PB_ENABLE_PREVIEW_FEATURES, true);
+					try {
+						javaProject.setOption(JavaCore.COMPILER_PB_ENABLE_PREVIEW_FEATURES, JavaCore.ENABLED);
+						String str = this.workingCopies[0].getSource();
+						String selection = "/*here*/i";
+						int start = str.indexOf(selection);
+						int length = selection.length();
+
+						IJavaElement[] elements = this.workingCopies[0].codeSelect(start, length);
+						assertTrue(elements[0] instanceof LocalVariable);
+
+
+					} finally {
+						javaProject.setOption(JavaCore.COMPILER_PB_ENABLE_PREVIEW_FEATURES, old);
+					}
+				}
+				// selection of pattern variable in case statement and search for declaration
+				public void testBug573943_021() throws CoreException {
+					this.workingCopies = new ICompilationUnit[1];
+					this.workingCopies[0] = getWorkingCopy("/JavaSearchBugs/src/X.java",
+							"public class X {\n" +
+									"public static void main(String[] args) {\n" +
+									"foo(Integer.valueOf(5));\n" +
+									"foo(new Object());\n" +
+									"}\n" +
+									"private static void foo(Object o) {\n" +
+									" final int a=0; \n" +
+									" switch (o) {\n" +
+									"	case Integer i  && a > 5  -> System.out.println(\"Integer:\" + /*here*/i);\n" +
+									"	case String s     -> System.out.println(\"String:\" + s + s);\n" +
+									"	default       -> System.out.println(\"Object\" + o);\n" +
+									" 	}\n" +
+									"}\n" +
+									"}\n"
+							);
+					IJavaProject javaProject = this.workingCopies[0].getJavaProject(); // assuming single project for all
+					// working copies
+					String old = javaProject.getOption(JavaCore.COMPILER_PB_ENABLE_PREVIEW_FEATURES, true);
+					try {
+						javaProject.setOption(JavaCore.COMPILER_PB_ENABLE_PREVIEW_FEATURES, JavaCore.ENABLED);
+						String str = this.workingCopies[0].getSource();
+						String selection = "/*here*/i";
+						int start = str.indexOf(selection);
+						int length = selection.length();
+
+						IJavaElement[] elements = this.workingCopies[0].codeSelect(start, length);
+						ILocalVariable local = (ILocalVariable) elements[0];
+						search(local, DECLARATIONS, EXACT_RULE);
+						assertSearchResults("src/X.java void X.foo(Object).i [i] EXACT_MATCH");
+
+					} finally {
+						javaProject.setOption(JavaCore.COMPILER_PB_ENABLE_PREVIEW_FEATURES, old);
+					}
+				}
+				//not a working copy test
+				public void testBug573943_022() throws Exception {
+					try {
+						IJavaProject project = createJavaProject("first", new String[] {"src"}, new String[] {"JCL17_LIB"}, "bin", "17");
+						project.setOption(JavaCore.COMPILER_PB_ENABLE_PREVIEW_FEATURES, JavaCore.ENABLED);
+						project.open(null);
+						createFolder("/first/src/p1");
+						createFile("/first/src/p1/BClass.java",
+								"package p1;\n" +
+								"public class BClass {\n" +
+								"}\n"
+								);
+						createFile("/first/src/p1/X.java",
+								"package p1;\n" +
+										"public class X {\n" +
+										"public static void main(String[] args) {\n" +
+										"foo(Integer.valueOf(5));\n" +
+										"foo(new Object());\n" +
+										"}\n" +
+										"private static void foo(Object o) {\n" +
+										" switch (o) {\n" +
+										"	case BClass i   -> System.out.println(\"Integer:\" + i);\n" +
+										"	default       -> System.out.println(\"Object\" + o);\n" +
+										" 	}\n" +
+										"}\n" +
+										"}\n"
+								);
+						project.close();
+						project.open(null);
+						waitUntilIndexesReady();
+
+						SearchPattern pattern = SearchPattern.createPattern("BClass", IJavaSearchConstants.TYPE, REFERENCES, SearchPattern.R_EXACT_MATCH);
+						IJavaSearchScope scope = SearchEngine.createJavaSearchScope(new IJavaProject[]
+								{project});
+						search(pattern, scope, this.resultCollector);
+						assertSearchResults(
+								"src/p1/X.java void p1.X.foo(Object) [BClass] EXACT_MATCH",
+							this.resultCollector);
+					}
+					finally {
+
+						deleteProject("first");
+					}
+				}
+				// find reference on a field in switch pattern - without select
+				public void testBug573943_023() throws CoreException {
+					this.workingCopies = new ICompilationUnit[1];
+					this.workingCopies[0] = getWorkingCopy("/JavaSearchBugs/src/X.java",
+							"public class X {\n" +
+									"public static  int /*here*/fieldj17 \n" +
+									"public static void main(String[] args) {\n" +
+									"foo(Integer.valueOf(5));\n" +
+									"foo(new Object());\n" +
+									"}\n" +
+									"private static void foo(Object o) {\n" +
+									" switch (o) {\n" +
+									"	case Integer i   -> System.out.println(\"Integer:\" + i);\n" +
+									"	case String s     -> System.out.println(\"String:\" + s + fieldj17 +fieldj17);\n" +
+									"	default       -> System.out.println(\"Object\" + o);\n" +
+									" 	}\n" +
+									"}\n" +
+									"}\n"
+							);
+					IJavaProject javaProject = this.workingCopies[0].getJavaProject(); // assuming single project for all
+					// working copies
+					String old = javaProject.getOption(JavaCore.COMPILER_PB_ENABLE_PREVIEW_FEATURES, true);
+					try {
+						javaProject.setOption(JavaCore.COMPILER_PB_ENABLE_PREVIEW_FEATURES, JavaCore.ENABLED);
+
+						search("fieldj17", FIELD, REFERENCES);
+						assertSearchResults("src/X.java void X.foo(Object) [fieldj17] EXACT_MATCH\n"
+								+ "src/X.java void X.foo(Object) [fieldj17] EXACT_MATCH");
+					} finally {
+						javaProject.setOption(JavaCore.COMPILER_PB_ENABLE_PREVIEW_FEATURES, old);
+					}
+					}
+				// find all occurrence on a field in switch pattern - without select
+				public void testBug573943_024() throws CoreException {
+					this.workingCopies = new ICompilationUnit[1];
+					this.workingCopies[0] = getWorkingCopy("/JavaSearchBugs/src/X.java",
+							"public class X {\n" +
+									"public static  int /*here*/fieldj17 \n" +
+									"public static void main(String[] args) {\n" +
+									"foo(Integer.valueOf(5));\n" +
+									"foo(new Object());\n" +
+									"}\n" +
+									"private static void foo(Object o) {\n" +
+									" switch (o) {\n" +
+									"	case Integer i   -> System.out.println(\"Integer:\" + i);\n" +
+									"	case String s     -> System.out.println(\"String:\" + s + fieldj17 +fieldj17);\n" +
+									"	default       -> System.out.println(\"Object\" + o);\n" +
+									" 	}\n" +
+									"}\n" +
+									"}\n"
+							);
+					IJavaProject javaProject = this.workingCopies[0].getJavaProject(); // assuming single project for all
+					// working copies
+					String old = javaProject.getOption(JavaCore.COMPILER_PB_ENABLE_PREVIEW_FEATURES, true);
+					try {
+						javaProject.setOption(JavaCore.COMPILER_PB_ENABLE_PREVIEW_FEATURES, JavaCore.ENABLED);
+
+						search("fieldj17", FIELD, ALL_OCCURRENCES);
+						assertSearchResults("src/X.java X.fieldj17 [fieldj17] EXACT_MATCH\n"+
+								"src/X.java void X.foo(Object) [fieldj17] EXACT_MATCH\n"
+								+ "src/X.java void X.foo(Object) [fieldj17] EXACT_MATCH");
+					} finally {
+						javaProject.setOption(JavaCore.COMPILER_PB_ENABLE_PREVIEW_FEATURES, old);
+					}
+					}
+				// find all occurrence on a class in switch pattern - without select ( switch statement)
+				public void testBug573943_026() throws CoreException {
+					this.workingCopies = new ICompilationUnit[1];
+					this.workingCopies[0] = getWorkingCopy("/JavaSearchBugs/src/X.java",
+							"sealed interface I permits A17, B {}\n" +
+							"final class AJ17 implements S {}\n" +
+							"final class B implements S {}\n" +
+							"public class X {\n" +
+									"public static void main(String[] args) {\n" +
+									"foo(new A());\n" +
+									"}\n" +
+									"private static void foo(S o) {\n" +
+									" switch (o) {\n" +
+									"	case AJ17 /*here*/a :     System.out.println(); break;\n" +
+									"	case B b :     System.out.println(\"B:\" + b);\n" +
+									"	default  : System.out.println(\"Object\" + o);\n" +
+									" 	}\n" +
+									"}\n" +
+									"}\n"
+							);
+					IJavaProject javaProject = this.workingCopies[0].getJavaProject(); // assuming single project for all
+					// working copies
+					String old = javaProject.getOption(JavaCore.COMPILER_PB_ENABLE_PREVIEW_FEATURES, true);
+					try {
+						javaProject.setOption(JavaCore.COMPILER_PB_ENABLE_PREVIEW_FEATURES, JavaCore.ENABLED);
+						search("AJ17", CLASS, ALL_OCCURRENCES);
+						assertSearchResults("src/X.java AJ17 [AJ17] EXACT_MATCH\n"
+								+ "src/X.java void X.foo(S) [AJ17] EXACT_MATCH");
+					} finally {
+						javaProject.setOption(JavaCore.COMPILER_PB_ENABLE_PREVIEW_FEATURES, old);
+					}
+				}
+				// find all reference on a class in switch pattern - without select ( Switch Statement)
+				public void testBug573943_027() throws CoreException {
+					this.workingCopies = new ICompilationUnit[1];
+					this.workingCopies[0] = getWorkingCopy("/JavaSearchBugs/src/X.java",
+							"sealed interface I permits A17, B {}\n" +
+							"final class AJ17 implements S {}\n" +
+							"final class B implements S {}\n" +
+							"public class X {\n" +
+									"public static void main(String[] args) {\n" +
+									"foo(new A());\n" +
+									"}\n" +
+									"private static void foo(S o) {\n" +
+									" switch (o) {\n" +
+									"	case AJ17 /*here*/a :     System.out.println(); break;\n" +
+									"	case B b :     System.out.println(\"B:\" + b);\n" +
+									"	default  : System.out.println(\"Object\" + o);\n" +
+									" 	}\n" +
+									"}\n" +
+									"}\n"
+							);
+					IJavaProject javaProject = this.workingCopies[0].getJavaProject(); // assuming single project for all
+					// working copies
+					String old = javaProject.getOption(JavaCore.COMPILER_PB_ENABLE_PREVIEW_FEATURES, true);
+					try {
+						javaProject.setOption(JavaCore.COMPILER_PB_ENABLE_PREVIEW_FEATURES, JavaCore.ENABLED);
+						search("AJ17", CLASS, REFERENCES);
+						assertSearchResults("src/X.java void X.foo(S) [AJ17] EXACT_MATCH");
+					} finally {
+						javaProject.setOption(JavaCore.COMPILER_PB_ENABLE_PREVIEW_FEATURES, old);
+					}
+				}
+				// find all reference on a class in switch pattern - without select
+				public void testBug573943_028() throws CoreException {
+					this.workingCopies = new ICompilationUnit[1];
+					this.workingCopies[0] = getWorkingCopy("/JavaSearchBugs/src/X.java",
+							"sealed interface I permits A17, B {}\n" +
+							"final class AJ17 implements S {}\n" +
+							"final class B implements S {}\n" +
+							"public class X {\n" +
+									"public static void main(String[] args) {\n" +
+									"foo(new A());\n" +
+									"}\n" +
+									"private static void foo(S o) {\n" +
+									" switch (o) {\n" +
+									"	case AJ17 /*here*/a ->     System.out.println(); \n" +
+									"	case B b ->     System.out.println(\"B:\" + b);\n" +
+									"	default  -> System.out.println(\"Object\" + o);\n" +
+									" 	}\n" +
+									"}\n" +
+									"}\n"
+							);
+					IJavaProject javaProject = this.workingCopies[0].getJavaProject(); // assuming single project for all
+					// working copies
+					String old = javaProject.getOption(JavaCore.COMPILER_PB_ENABLE_PREVIEW_FEATURES, true);
+					try {
+						javaProject.setOption(JavaCore.COMPILER_PB_ENABLE_PREVIEW_FEATURES, JavaCore.ENABLED);
+						search("AJ17", CLASS, REFERENCES);
+						assertSearchResults("src/X.java void X.foo(S) [AJ17] EXACT_MATCH");
+					} finally {
+						javaProject.setOption(JavaCore.COMPILER_PB_ENABLE_PREVIEW_FEATURES, old);
+					}
+				}
+				// find all occurrence on a class in switch pattern - without select
+				public void testBug573943_029() throws Exception {
+					try {
+						IJavaProject project = createJavaProject("first", new String[] {"src"}, new String[] {"JCL17_LIB"}, "bin", "17");
+						project.setOption(JavaCore.COMPILER_PB_ENABLE_PREVIEW_FEATURES, JavaCore.ENABLED);
+						project.open(null);
+						createFolder("/first/src/p1");
+						createFile("/first/src/p1/BClass.java",
+								"package p1;\n" +
+								"public class BClass {\n" +
+								"}\n"
+								);
+						createFile("/first/src/p1/X.java",
+								"package p1;\n" +
+										"public class X {\n" +
+										" public int field_j17; "+
+										"public static void main(String[] args) {\n" +
+										"foo(Integer.valueOf(5));\n" +
+										"foo(new Object());\n" +
+										"}\n" +
+										"private static void foo(Object o) {\n" +
+										" switch (o) {\n" +
+										"	case BClass i && field_j17>0  -> System.out.println(\"Integer:\" + i);\n" +
+										"	default       -> System.out.println(\"Object\" + o);\n" +
+										" 	}\n" +
+										"}\n" +
+										"}\n"
+								);
+						project.close();
+						project.open(null);
+						waitUntilIndexesReady();
+
+						SearchPattern pattern = SearchPattern.createPattern("field_j17", IJavaSearchConstants.FIELD, ALL_OCCURRENCES, SearchPattern.R_EXACT_MATCH);
+						IJavaSearchScope scope = SearchEngine.createJavaSearchScope(new IJavaProject[]
+								{project});
+						search(pattern, scope, this.resultCollector);
+						assertSearchResults(
+								"src/p1/X.java p1.X.field_j17 [field_j17] EXACT_MATCH\n"
+								+ "src/p1/X.java void p1.X.foo(Object) [field_j17] EXACT_MATCH",
+							this.resultCollector);
+					}
+					finally {
+
+						deleteProject("first");
+					}
+				}
+				// find all references on a class in switch pattern - without select
+				public void testBug573943_030() throws Exception {
+					try {
+						IJavaProject project = createJavaProject("first", new String[] {"src"}, new String[] {"JCL17_LIB"}, "bin", "17");
+						project.setOption(JavaCore.COMPILER_PB_ENABLE_PREVIEW_FEATURES, JavaCore.ENABLED);
+						project.open(null);
+						createFolder("/first/src/p1");
+						createFile("/first/src/p1/BClass.java",
+								"package p1;\n" +
+								"public class BClass {\n" +
+								"}\n"
+								);
+						createFile("/first/src/p1/X.java",
+								"package p1;\n" +
+										"public class X {\n" +
+										" public int field_j17; "+
+										"public static void main(String[] args) {\n" +
+										"foo(Integer.valueOf(5));\n" +
+										"foo(new Object());\n" +
+										"}\n" +
+										"private static void foo(Object o) {\n" +
+										" switch (o) {\n" +
+										"	case BClass i && field_j17>0  -> System.out.println(\"Integer:\" + i);\n" +
+										"	default       -> System.out.println(\"Object\" + o);\n" +
+										" 	}\n" +
+										"}\n" +
+										"}\n"
+								);
+						project.close();
+						project.open(null);
+						waitUntilIndexesReady();
+
+						SearchPattern pattern = SearchPattern.createPattern("field_j17", IJavaSearchConstants.FIELD, REFERENCES, SearchPattern.R_EXACT_MATCH);
+						IJavaSearchScope scope = SearchEngine.createJavaSearchScope(new IJavaProject[]
+								{project});
+						search(pattern, scope, this.resultCollector);
+						assertSearchResults(
+								"src/p1/X.java void p1.X.foo(Object) [field_j17] EXACT_MATCH",
+							this.resultCollector);
+					}
+					finally {
+
+						deleteProject("first");
+					}
+				}
+}
+
+
diff --git a/org.eclipse.jdt.core.tests.model/src/org/eclipse/jdt/core/tests/model/ReconcilerTests.java b/org.eclipse.jdt.core.tests.model/src/org/eclipse/jdt/core/tests/model/ReconcilerTests.java
index 11b1a5f..168bc30 100644
--- a/org.eclipse.jdt.core.tests.model/src/org/eclipse/jdt/core/tests/model/ReconcilerTests.java
+++ b/org.eclipse.jdt.core.tests.model/src/org/eclipse/jdt/core/tests/model/ReconcilerTests.java
@@ -6039,13 +6039,13 @@
 	}
 }
 public void testBug564613_001() throws CoreException, IOException, InterruptedException {
-	if (!isJRE15) return;
+	if (!isJRE17) return;
 	IJavaProject project15 = null;
 	try {
 		project15 = createJava15Project("Reconciler_15", new String[] {"src"});
-		project15.setOption(JavaCore.COMPILER_SOURCE, JavaCore.VERSION_16);
-		project15.setOption(JavaCore.COMPILER_COMPLIANCE, JavaCore.VERSION_16);
-		project15.setOption(JavaCore.COMPILER_CODEGEN_TARGET_PLATFORM, JavaCore.VERSION_16);
+		project15.setOption(JavaCore.COMPILER_SOURCE, JavaCore.VERSION_17);
+		project15.setOption(JavaCore.COMPILER_COMPLIANCE, JavaCore.VERSION_17);
+		project15.setOption(JavaCore.COMPILER_CODEGEN_TARGET_PLATFORM, JavaCore.VERSION_17);
 		project15.setOption(JavaCore.COMPILER_PB_ENABLE_PREVIEW_FEATURES, JavaCore.ENABLED);
 		project15.setOption(JavaCore.COMPILER_PB_REPORT_PREVIEW_FEATURES, JavaCore.IGNORE);
 
diff --git a/org.eclipse.jdt.core.tests.model/src/org/eclipse/jdt/core/tests/model/ReconcilerTests16.java b/org.eclipse.jdt.core.tests.model/src/org/eclipse/jdt/core/tests/model/ReconcilerTests16.java
index 0ac8382..4e809d5 100644
--- a/org.eclipse.jdt.core.tests.model/src/org/eclipse/jdt/core/tests/model/ReconcilerTests16.java
+++ b/org.eclipse.jdt.core.tests.model/src/org/eclipse/jdt/core/tests/model/ReconcilerTests16.java
@@ -35,7 +35,8 @@
 	protected ICompilationUnit workingCopy;
 	protected ProblemRequestor problemRequestor;
 
-	/*package*/ static final int JLS_LATEST = AST.JLS16;
+	/*package*/ @SuppressWarnings("deprecation")
+	static final int JLS_LATEST = AST.JLS16;
 
 /**
  */
diff --git a/org.eclipse.jdt.core.tests.model/src/org/eclipse/jdt/core/tests/model/RunJavaSearchTests.java b/org.eclipse.jdt.core.tests.model/src/org/eclipse/jdt/core/tests/model/RunJavaSearchTests.java
index 131c537..4d71f79 100644
--- a/org.eclipse.jdt.core.tests.model/src/org/eclipse/jdt/core/tests/model/RunJavaSearchTests.java
+++ b/org.eclipse.jdt.core.tests.model/src/org/eclipse/jdt/core/tests/model/RunJavaSearchTests.java
@@ -69,6 +69,7 @@
 		allClasses.add(JavaSearchBugs13Tests.class);
 		allClasses.add(JavaSearchBugs15Tests.class);
 		allClasses.add(JavaSearchBugs16Tests.class);
+		allClasses.add(JavaSearchBugs17Tests.class);
 		allClasses.add(JavaSearchMultipleProjectsTests.class);
 		allClasses.add(SearchTests.class);
 		allClasses.add(JavaSearchScopeTests.class);
diff --git a/org.eclipse.jdt.core.tests.model/src/org/eclipse/jdt/core/tests/model/SealedTypeModelTests.java b/org.eclipse.jdt.core.tests.model/src/org/eclipse/jdt/core/tests/model/SealedTypeModelTests.java
index 243c874..a9a9ace 100644
--- a/org.eclipse.jdt.core.tests.model/src/org/eclipse/jdt/core/tests/model/SealedTypeModelTests.java
+++ b/org.eclipse.jdt.core.tests.model/src/org/eclipse/jdt/core/tests/model/SealedTypeModelTests.java
@@ -1,5 +1,5 @@
 /*******************************************************************************
- * Copyright (c) 2020 IBM Corporation.
+ * Copyright (c) 2020, 2021 IBM Corporation.
  *
  * This program and the accompanying materials
  * are made available under the terms of the Eclipse Public License 2.0
@@ -53,11 +53,10 @@
 		};
 	}
 	public static Test suite() {
-		return buildModelTestSuite(AbstractCompilerTest.F_15, SealedTypeModelTests.class);
+		return buildModelTestSuite(AbstractCompilerTest.F_17, SealedTypeModelTests.class);
 	}
 	protected IJavaProject createJavaProject(String projectName) throws CoreException {
-		IJavaProject createJavaProject = super.createJavaProject(projectName, new String[] {"src"}, new String[] {"JCL14_LIB"}, "bin", "15");
-		createJavaProject.setOption(JavaCore.COMPILER_PB_ENABLE_PREVIEW_FEATURES, JavaCore.ENABLED);
+		IJavaProject createJavaProject = super.createJavaProject(projectName, new String[] {"src"}, new String[] {"JCL14_LIB"}, "bin", "17");
 		return createJavaProject;
 	}
 	// Check types with neither sealed nor non-sealed don't return those modifiers
@@ -65,8 +64,7 @@
 		try {
 			IJavaProject project = createJavaProject("SealedTypes");
 			project.open(null);
-			String fileContent =  "@SuppressWarnings(\"preview\")\n" +
-									"interface I {}\n" +
+			String fileContent =  "interface I {}\n" +
 									"public class X implements I {}\n" +
 									"interface Y extends I {}\n";
 
@@ -178,7 +176,7 @@
 			String outputDirectory = Util.getOutputDirectory();
 
 			String jarPath = outputDirectory + File.separator + "sealed.jar";
-			Util.createJar(sources, jarPath, "15", true);
+			Util.createJar(sources, jarPath, "17", true);
 
 			IJavaProject project = createJavaProject("SealedTypes");
 			addClasspathEntry(project, JavaCore.newLibraryEntry(new Path(jarPath), null, null, null, null, false));
@@ -239,7 +237,7 @@
 			String outputDirectory = Util.getOutputDirectory();
 
 			String jarPath = outputDirectory + File.separator + "sealed.jar";
-			Util.createJar(sources, jarPath, "15", true);
+			Util.createJar(sources, jarPath, "17", true);
 
 			IJavaProject project = createJavaProject("SealedTypes");
 			addClasspathEntry(project, JavaCore.newLibraryEntry(new Path(jarPath), null, null, null, null, false));
diff --git a/org.eclipse.jdt.core.tests.model/src/org/eclipse/jdt/core/tests/rewrite/describing/ASTRewritingInstanceOfPatternExpressionTest.java b/org.eclipse.jdt.core.tests.model/src/org/eclipse/jdt/core/tests/rewrite/describing/ASTRewritingInstanceOfPatternExpressionTest.java
index 0dd523f..80e8adb 100644
--- a/org.eclipse.jdt.core.tests.model/src/org/eclipse/jdt/core/tests/rewrite/describing/ASTRewritingInstanceOfPatternExpressionTest.java
+++ b/org.eclipse.jdt.core.tests.model/src/org/eclipse/jdt/core/tests/rewrite/describing/ASTRewritingInstanceOfPatternExpressionTest.java
@@ -7,7 +7,9 @@
  * https://www.eclipse.org/legal/epl-2.0/
  *
  * SPDX-License-Identifier: EPL-2.0
- *
+ * This is an implementation of an early-draft specification developed under the Java
+ * Community Process (JCP) and is made available for testing and evaluation purposes
+ * only. The code is not compatible with any specification of the JCP.
  * Contributors:
  *     IBM Corporation - initial API and implementation
  *******************************************************************************/
@@ -43,6 +45,7 @@
 		return createSuite(ASTRewritingInstanceOfPatternExpressionTest.class, 16);
 	}
 
+	@SuppressWarnings("deprecation")
 	@Override
 	protected void setUp() throws Exception {
 		super.setUp();
diff --git a/org.eclipse.jdt.core.tests.model/src/org/eclipse/jdt/core/tests/rewrite/describing/ASTRewritingRecordAnnotationsTest.java b/org.eclipse.jdt.core.tests.model/src/org/eclipse/jdt/core/tests/rewrite/describing/ASTRewritingRecordAnnotationsTest.java
index de630b7..b6d8505 100644
--- a/org.eclipse.jdt.core.tests.model/src/org/eclipse/jdt/core/tests/rewrite/describing/ASTRewritingRecordAnnotationsTest.java
+++ b/org.eclipse.jdt.core.tests.model/src/org/eclipse/jdt/core/tests/rewrite/describing/ASTRewritingRecordAnnotationsTest.java
@@ -7,6 +7,9 @@
  * https://www.eclipse.org/legal/epl-2.0/
  *
  * SPDX-License-Identifier: EPL-2.0
+ * This is an implementation of an early-draft specification developed under the Java
+ * Community Process (JCP) and is made available for testing and evaluation purposes
+ * only. The code is not compatible with any specification of the JCP.
  * Contributors:
  *     IBM Corporation - initial API and implementation
  *******************************************************************************/
@@ -57,6 +60,7 @@
 		return createSuite(ASTRewritingRecordAnnotationsTest.class, getAST16());
 	}
 
+	@SuppressWarnings("deprecation")
 	protected static int getAST16() {
 		return AST.JLS16;
 	}
diff --git a/org.eclipse.jdt.core.tests.model/src/org/eclipse/jdt/core/tests/rewrite/describing/ASTRewritingRecordDeclarationTest.java b/org.eclipse.jdt.core.tests.model/src/org/eclipse/jdt/core/tests/rewrite/describing/ASTRewritingRecordDeclarationTest.java
index d7aa800..926d17f 100644
--- a/org.eclipse.jdt.core.tests.model/src/org/eclipse/jdt/core/tests/rewrite/describing/ASTRewritingRecordDeclarationTest.java
+++ b/org.eclipse.jdt.core.tests.model/src/org/eclipse/jdt/core/tests/rewrite/describing/ASTRewritingRecordDeclarationTest.java
@@ -7,7 +7,9 @@
 * https://www.eclipse.org/legal/epl-2.0/
 *
 * SPDX-License-Identifier: EPL-2.0
-*
+* This is an implementation of an early-draft specification developed under the Java
+ * Community Process (JCP) and is made available for testing and evaluation purposes
+ * only. The code is not compatible with any specification of the JCP.
 * Contributors:
 *     IBM Corporation - initial API and implementation
 *******************************************************************************/
@@ -63,6 +65,7 @@
 	protected void setUp() throws Exception {
 		super.setUp();
 		setUpProjectAbove16();
+		setUpProjectAbove17();
 	}
 
 	@SuppressWarnings("deprecation")
diff --git a/org.eclipse.jdt.core.tests.model/src/org/eclipse/jdt/core/tests/rewrite/describing/ASTRewritingSwitchExpressionsTest.java b/org.eclipse.jdt.core.tests.model/src/org/eclipse/jdt/core/tests/rewrite/describing/ASTRewritingSwitchExpressionsTest.java
index eaa5b76..9587c92 100644
--- a/org.eclipse.jdt.core.tests.model/src/org/eclipse/jdt/core/tests/rewrite/describing/ASTRewritingSwitchExpressionsTest.java
+++ b/org.eclipse.jdt.core.tests.model/src/org/eclipse/jdt/core/tests/rewrite/describing/ASTRewritingSwitchExpressionsTest.java
@@ -7,6 +7,9 @@
  * https://www.eclipse.org/legal/epl-2.0/
  *
  * SPDX-License-Identifier: EPL-2.0
+ * This is an implementation of an early-draft specification developed under the Java
+ * Community Process (JCP) and is made available for testing and evaluation purposes
+ * only. The code is not compatible with any specification of the JCP.
  * Contributors:
  *     IBM Corporation - initial API and implementation
  *******************************************************************************/
@@ -53,7 +56,8 @@
 	@Override
 	protected void setUp() throws Exception {
 		super.setUp();
-		//super.setUpProjectAbove14();
+		super.setUpProjectAbove14();
+		setUpProjectAbove17();
 
 	}
 
@@ -309,7 +313,9 @@
 		buf.append(" 				int z = 100;\n");
 		buf.append(" 				yield z;\n");
 		buf.append("			}\n");
-		buf.append("			case 100, 200 -> {yield 2048;}\n");
+		buf.append("			case 100, 200 -> {\n");
+		buf.append("    yield 2048;\n");
+		buf.append("}\n");
 		buf.append("            default -> {\n");
 		buf.append("				yield 12;\n");
 		buf.append("			}\n");
diff --git a/org.eclipse.jdt.core.tests.model/src/org/eclipse/jdt/core/tests/rewrite/describing/ASTRewritingTest.java b/org.eclipse.jdt.core.tests.model/src/org/eclipse/jdt/core/tests/rewrite/describing/ASTRewritingTest.java
index 95daa6a..93b98b0 100644
--- a/org.eclipse.jdt.core.tests.model/src/org/eclipse/jdt/core/tests/rewrite/describing/ASTRewritingTest.java
+++ b/org.eclipse.jdt.core.tests.model/src/org/eclipse/jdt/core/tests/rewrite/describing/ASTRewritingTest.java
@@ -7,6 +7,9 @@
  * https://www.eclipse.org/legal/epl-2.0/
  *
  * SPDX-License-Identifier: EPL-2.0
+ * This is an implementation of an early-draft specification developed under the Java
+ * Community Process (JCP) and is made available for testing and evaluation purposes
+ * only. The code is not compatible with any specification of the JCP.
  * Contributors:
  *     IBM Corporation - initial API and implementation
  *******************************************************************************/
@@ -89,9 +92,12 @@
 	/** @deprecated using deprecated code */
 	private final static int JLS15_INTERNAL = AST.JLS15;
 
+	/** @deprecated using deprecated code */
 	private final static int JLS16_INTERNAL = AST.JLS16;
 
-	private final static int[] JLS_LEVELS = { JLS2_INTERNAL, JLS3_INTERNAL, JLS4_INTERNAL, JLS8_INTERNAL, JLS9_INTERNAL, JLS10_INTERNAL, JLS14_INTERNAL, JLS15_INTERNAL, JLS16_INTERNAL};
+	private final static int JLS17_INTERNAL = AST.JLS17;
+
+	private final static int[] JLS_LEVELS = { JLS2_INTERNAL, JLS3_INTERNAL, JLS4_INTERNAL, JLS8_INTERNAL, JLS9_INTERNAL, JLS10_INTERNAL, JLS14_INTERNAL, JLS15_INTERNAL, JLS16_INTERNAL, JLS17_INTERNAL};
 
 	private static final String ONLY_AST_STRING = "_only";
 	private static final String SINCE_AST_STRING = "_since";
@@ -245,6 +251,7 @@
 		setUpProjectAbove16();
 	}
 
+	@SuppressWarnings("deprecation")
 	protected void setUpProjectAbove16() throws Exception {
 		if (this.apiLevel == AST_INTERNAL_JLS16 ) {
 			this.project1.setOption(JavaCore.COMPILER_COMPLIANCE, JavaCore.VERSION_16);
@@ -253,6 +260,14 @@
 		}
 	}
 
+	protected void setUpProjectAbove17() throws Exception {
+		if (this.apiLevel == AST_INTERNAL_JLS17 ) {
+			this.project1.setOption(JavaCore.COMPILER_COMPLIANCE, JavaCore.VERSION_17);
+			this.project1.setOption(JavaCore.COMPILER_SOURCE, JavaCore.VERSION_17);
+			this.project1.setOption(JavaCore.COMPILER_CODEGEN_TARGET_PLATFORM, JavaCore.VERSION_16);
+		}
+	}
+
 	protected IJavaProject createProject(String projectName, String complianceVersion) throws CoreException {
 		IJavaProject proj = createJavaProject(projectName, new String[] {"src"}, "bin");
 		proj.setOption(DefaultCodeFormatterConstants.FORMATTER_TAB_CHAR, JavaCore.SPACE);
diff --git a/org.eclipse.jdt.core.tests.model/src/org/eclipse/jdt/core/tests/rewrite/describing/ASTRewritingTypeDeclTest.java b/org.eclipse.jdt.core.tests.model/src/org/eclipse/jdt/core/tests/rewrite/describing/ASTRewritingTypeDeclTest.java
index 92d030a..e3ef7b5 100644
--- a/org.eclipse.jdt.core.tests.model/src/org/eclipse/jdt/core/tests/rewrite/describing/ASTRewritingTypeDeclTest.java
+++ b/org.eclipse.jdt.core.tests.model/src/org/eclipse/jdt/core/tests/rewrite/describing/ASTRewritingTypeDeclTest.java
@@ -2051,17 +2051,13 @@
 	}
 
 	public void testSealedModifier_001() throws Exception {
-		if (checkAPILevel(16)) {
+		if (checkAPILevel(17)) {
 			return;
 		}
 		IPackageFragment pack1= this.sourceFolder.createPackageFragment("test1", false, null);
 		String old = this.project1.getOption(JavaCore.COMPILER_PB_ENABLE_PREVIEW_FEATURES, true);
 		try {
-			this.project1.setOption(JavaCore.COMPILER_PB_ENABLE_PREVIEW_FEATURES, JavaCore.ENABLED);
-			this.project1.setOption(JavaCore.COMPILER_PB_REPORT_PREVIEW_FEATURES, JavaCore.IGNORE);
-			this.project1.setOption(JavaCore.COMPILER_COMPLIANCE, JavaCore.VERSION_16);
-			this.project1.setOption(JavaCore.COMPILER_SOURCE, JavaCore.VERSION_16);
-			this.project1.setOption(JavaCore.COMPILER_CODEGEN_TARGET_PLATFORM, JavaCore.VERSION_16);
+			setProjectCompliance();
 
 			StringBuilder buf= new StringBuilder();
 			buf.append("package test1;\n");
@@ -2105,10 +2101,17 @@
 		}
 
 	}
+	private void setProjectCompliance() {
+		this.project1.setOption(JavaCore.COMPILER_PB_ENABLE_PREVIEW_FEATURES, JavaCore.ENABLED);
+		this.project1.setOption(JavaCore.COMPILER_PB_REPORT_PREVIEW_FEATURES, JavaCore.IGNORE);
+		this.project1.setOption(JavaCore.COMPILER_COMPLIANCE, JavaCore.VERSION_17);
+		this.project1.setOption(JavaCore.COMPILER_SOURCE, JavaCore.VERSION_17);
+		this.project1.setOption(JavaCore.COMPILER_CODEGEN_TARGET_PLATFORM, JavaCore.VERSION_17);
+	}
 
 
 	public void testSealedModifier_002() throws Exception {
-		if (checkAPILevel(16)) {
+		if (checkAPILevel(17)) {
 			return;
 		}
 		IPackageFragment pack1= this.sourceFolder.createPackageFragment("test1", false, null);
@@ -2125,11 +2128,7 @@
 
 		String old = this.project1.getOption(JavaCore.COMPILER_PB_ENABLE_PREVIEW_FEATURES, true);
 		try {
-			this.project1.setOption(JavaCore.COMPILER_PB_ENABLE_PREVIEW_FEATURES, JavaCore.ENABLED);
-			this.project1.setOption(JavaCore.COMPILER_PB_REPORT_PREVIEW_FEATURES, JavaCore.IGNORE);
-			this.project1.setOption(JavaCore.COMPILER_COMPLIANCE, JavaCore.VERSION_16);
-			this.project1.setOption(JavaCore.COMPILER_SOURCE, JavaCore.VERSION_16);
-			this.project1.setOption(JavaCore.COMPILER_CODEGEN_TARGET_PLATFORM, JavaCore.VERSION_16);
+			setProjectCompliance();
 			CompilationUnit astRoot= createAST(cu);
 			ASTRewrite rewrite= ASTRewrite.create(astRoot.getAST());
 
@@ -2163,7 +2162,7 @@
 	}
 
 	public void testSealedModifier_003() throws Exception {
-		if (checkAPILevel(16)) {
+		if (checkAPILevel(17)) {
 			return;
 		}
 		IPackageFragment pack1= this.sourceFolder.createPackageFragment("test1", false, null);
@@ -2177,8 +2176,7 @@
 
 		String old = this.project1.getOption(JavaCore.COMPILER_PB_ENABLE_PREVIEW_FEATURES, true);
 		try {
-			this.project1.setOption(JavaCore.COMPILER_PB_ENABLE_PREVIEW_FEATURES, JavaCore.ENABLED);
-			this.project1.setOption(JavaCore.COMPILER_PB_REPORT_PREVIEW_FEATURES, JavaCore.IGNORE);
+			setProjectCompliance();
 			CompilationUnit astRoot= createAST(cu);
 			ASTRewrite rewrite= ASTRewrite.create(astRoot.getAST());
 
@@ -2213,7 +2211,7 @@
 	}
 
 	public void testSealedModifier_004() throws Exception {
-		if (checkAPILevel(16)) {
+		if (checkAPILevel(17)) {
 			return;
 		}
 		IPackageFragment pack1= this.sourceFolder.createPackageFragment("test1", false, null);
@@ -2225,11 +2223,7 @@
 
 		String old = this.project1.getOption(JavaCore.COMPILER_PB_ENABLE_PREVIEW_FEATURES, true);
 		try {
-			this.project1.setOption(JavaCore.COMPILER_PB_ENABLE_PREVIEW_FEATURES, JavaCore.ENABLED);
-			this.project1.setOption(JavaCore.COMPILER_PB_REPORT_PREVIEW_FEATURES, JavaCore.IGNORE);
-			this.project1.setOption(JavaCore.COMPILER_COMPLIANCE, JavaCore.VERSION_16);
-			this.project1.setOption(JavaCore.COMPILER_SOURCE, JavaCore.VERSION_16);
-			this.project1.setOption(JavaCore.COMPILER_CODEGEN_TARGET_PLATFORM, JavaCore.VERSION_16);
+			setProjectCompliance();
 			CompilationUnit astRoot= createAST(cu);
 			ASTRewrite rewrite= ASTRewrite.create(astRoot.getAST());
 
@@ -2263,17 +2257,13 @@
 	}
 
 	public void testSealedModifier_005() throws Exception {
-		if (checkAPILevel(16)) {
+		if (checkAPILevel(17)) {
 			return;
 		}
 		IPackageFragment pack1= this.sourceFolder.createPackageFragment("test1", false, null);
 		String old = this.project1.getOption(JavaCore.COMPILER_PB_ENABLE_PREVIEW_FEATURES, true);
 		try {
-			this.project1.setOption(JavaCore.COMPILER_PB_ENABLE_PREVIEW_FEATURES, JavaCore.ENABLED);
-			this.project1.setOption(JavaCore.COMPILER_PB_REPORT_PREVIEW_FEATURES, JavaCore.IGNORE);
-			this.project1.setOption(JavaCore.COMPILER_COMPLIANCE, JavaCore.VERSION_16);
-			this.project1.setOption(JavaCore.COMPILER_SOURCE, JavaCore.VERSION_16);
-			this.project1.setOption(JavaCore.COMPILER_CODEGEN_TARGET_PLATFORM, JavaCore.VERSION_16);
+			setProjectCompliance();
 
 			StringBuilder buf= new StringBuilder();
 			buf.append("package test1;\n");
@@ -2330,17 +2320,13 @@
 	}
 
 	public void testSealedModifier_006() throws Exception {
-		if (checkAPILevel(16)) {
+		if (checkAPILevel(17)) {
 			return;
 		}
 		IPackageFragment pack1= this.sourceFolder.createPackageFragment("test1", false, null);
 		String old = this.project1.getOption(JavaCore.COMPILER_PB_ENABLE_PREVIEW_FEATURES, true);
 		try {
-			this.project1.setOption(JavaCore.COMPILER_PB_ENABLE_PREVIEW_FEATURES, JavaCore.ENABLED);
-			this.project1.setOption(JavaCore.COMPILER_PB_REPORT_PREVIEW_FEATURES, JavaCore.IGNORE);
-			this.project1.setOption(JavaCore.COMPILER_COMPLIANCE, JavaCore.VERSION_16);
-			this.project1.setOption(JavaCore.COMPILER_SOURCE, JavaCore.VERSION_16);
-			this.project1.setOption(JavaCore.COMPILER_CODEGEN_TARGET_PLATFORM, JavaCore.VERSION_16);
+			setProjectCompliance();
 
 			StringBuilder buf= new StringBuilder();
 			buf.append("package test1;\n");
@@ -2391,17 +2377,13 @@
 
 	public void testSealedModifier_007() throws Exception {
 
-		if (checkAPILevel(16)) {
+		if (checkAPILevel(17)) {
 			return;
 		}
 		IPackageFragment pack1= this.sourceFolder.createPackageFragment("test1", false, null);
 		String old = this.project1.getOption(JavaCore.COMPILER_PB_ENABLE_PREVIEW_FEATURES, true);
 		try {
-			this.project1.setOption(JavaCore.COMPILER_PB_ENABLE_PREVIEW_FEATURES, JavaCore.ENABLED);
-			this.project1.setOption(JavaCore.COMPILER_PB_REPORT_PREVIEW_FEATURES, JavaCore.IGNORE);
-			this.project1.setOption(JavaCore.COMPILER_COMPLIANCE, JavaCore.VERSION_16);
-			this.project1.setOption(JavaCore.COMPILER_SOURCE, JavaCore.VERSION_16);
-			this.project1.setOption(JavaCore.COMPILER_CODEGEN_TARGET_PLATFORM, JavaCore.VERSION_16);
+			setProjectCompliance();
 			StringBuilder buf= new StringBuilder();
 			buf.append("package test1;\n");
 			buf.append("public sealed class C permits C1 //comment\n");
@@ -2445,17 +2427,13 @@
 
 	public void testSealedModifier_008() throws Exception {
 
-		if (checkAPILevel(16)) {
+		if (checkAPILevel(17)) {
 			return;
 		}
 		IPackageFragment pack1= this.sourceFolder.createPackageFragment("test1", false, null);
 		String old = this.project1.getOption(JavaCore.COMPILER_PB_ENABLE_PREVIEW_FEATURES, true);
 		try {
-			this.project1.setOption(JavaCore.COMPILER_PB_ENABLE_PREVIEW_FEATURES, JavaCore.ENABLED);
-			this.project1.setOption(JavaCore.COMPILER_PB_REPORT_PREVIEW_FEATURES, JavaCore.IGNORE);
-			this.project1.setOption(JavaCore.COMPILER_COMPLIANCE, JavaCore.VERSION_16);
-			this.project1.setOption(JavaCore.COMPILER_SOURCE, JavaCore.VERSION_16);
-			this.project1.setOption(JavaCore.COMPILER_CODEGEN_TARGET_PLATFORM, JavaCore.VERSION_16);
+			setProjectCompliance();
 			StringBuilder buf= new StringBuilder();
 			buf.append("package test1;\n");
 			buf.append("public class C//comment\n");
@@ -2500,7 +2478,7 @@
 	}
 
 	public void testSealedModifier_009() throws Exception {
-		if (checkAPILevel(16)) {
+		if (checkAPILevel(17)) {
 			return;
 		}
 		IPackageFragment pack1= this.sourceFolder.createPackageFragment("test1", false, null);
@@ -2514,8 +2492,7 @@
 
 		String old = this.project1.getOption(JavaCore.COMPILER_PB_ENABLE_PREVIEW_FEATURES, true);
 		try {
-			this.project1.setOption(JavaCore.COMPILER_PB_ENABLE_PREVIEW_FEATURES, JavaCore.ENABLED);
-			this.project1.setOption(JavaCore.COMPILER_PB_REPORT_PREVIEW_FEATURES, JavaCore.IGNORE);
+			setProjectCompliance();
 			CompilationUnit astRoot= createAST(cu);
 			ASTRewrite rewrite= ASTRewrite.create(astRoot.getAST());
 
diff --git a/org.eclipse.jdt.core.tests.model/src/org/eclipse/jdt/core/tests/rewrite/describing/ImportRewriteTest.java b/org.eclipse.jdt.core.tests.model/src/org/eclipse/jdt/core/tests/rewrite/describing/ImportRewriteTest.java
index 197d0ea..4c0c022 100644
--- a/org.eclipse.jdt.core.tests.model/src/org/eclipse/jdt/core/tests/rewrite/describing/ImportRewriteTest.java
+++ b/org.eclipse.jdt.core.tests.model/src/org/eclipse/jdt/core/tests/rewrite/describing/ImportRewriteTest.java
@@ -1,5 +1,5 @@
 /*******************************************************************************
- * Copyright (c) 2000, 2018 IBM Corporation and others.
+ * Copyright (c) 2000, 2021 IBM Corporation and others.
  *
  * This program and the accompanying materials
  * are made available under the terms of the Eclipse Public License 2.0
@@ -2206,7 +2206,7 @@
 		String[] order= new String[] { "java.awt", "java" };
 
 		ImportRewrite imports= newImportsRewrite(cu, order, 99, 99, true);
-		imports.addImport("java.applet.Applet");
+		imports.addImport("java.beans.Beans");
 
 		apply(imports);
 
@@ -2215,7 +2215,7 @@
 		buf.append("\n");
 		buf.append("import java.awt.Panel;\n");
 		buf.append("\n");
-		buf.append("import java.applet.Applet;\n");
+		buf.append("import java.beans.Beans;\n");
 		buf.append("import java.math.BigInteger;\n");
 		buf.append("\n");
 		buf.append("public class C {\n");
diff --git a/org.eclipse.jdt.core.tests.model/src/org/eclipse/jdt/core/tests/rewrite/describing/ImportRewrite_RecordTest.java b/org.eclipse.jdt.core.tests.model/src/org/eclipse/jdt/core/tests/rewrite/describing/ImportRewrite_RecordTest.java
index 1b78b3e..70e6494 100644
--- a/org.eclipse.jdt.core.tests.model/src/org/eclipse/jdt/core/tests/rewrite/describing/ImportRewrite_RecordTest.java
+++ b/org.eclipse.jdt.core.tests.model/src/org/eclipse/jdt/core/tests/rewrite/describing/ImportRewrite_RecordTest.java
@@ -1,5 +1,5 @@
 /*******************************************************************************
- * Copyright (c) 2020 IBM Corporation and others.
+ * Copyright (c) 2020, 2021 IBM Corporation and others.
  *
  * This program and the accompanying materials
  * are made available under the terms of the Eclipse Public License 2.0
@@ -7,6 +7,9 @@
  * https://www.eclipse.org/legal/epl-2.0/
  *
  * SPDX-License-Identifier: EPL-2.0
+ * This is an implementation of an early-draft specification developed under the Java
+ * Community Process (JCP) and is made available for testing and evaluation purposes
+ * only. The code is not compatible with any specification of the JCP.
  *		IBM Corporation - initial API and implementation
  *******************************************************************************/
 package org.eclipse.jdt.core.tests.rewrite.describing;
@@ -83,6 +86,7 @@
 		waitUntilIndexesReady();
 	}
 
+	@SuppressWarnings("deprecation")
 	protected static int getJLS16() {
 		return AST.JLS16;
 	}
diff --git a/org.eclipse.jdt.core.tests.model/workspace/Converter_17/.classpath b/org.eclipse.jdt.core.tests.model/workspace/Converter_17/.classpath
new file mode 100644
index 0000000..5fd007d
--- /dev/null
+++ b/org.eclipse.jdt.core.tests.model/workspace/Converter_17/.classpath
@@ -0,0 +1,6 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<classpath>
+	<classpathentry kind="src" path="src"/>
+	<classpathentry kind="var" path="CONVERTER_JCL_17_LIB" sourcepath="CONVERTER_JCL_17_SRC" rootpath="CONVERTER_JCL_SRCROOT"/>
+	<classpathentry kind="output" path="bin"/>
+</classpath>
diff --git a/org.eclipse.jdt.core.tests.model/workspace/Converter_17/.project b/org.eclipse.jdt.core.tests.model/workspace/Converter_17/.project
new file mode 100644
index 0000000..7fa54e6
--- /dev/null
+++ b/org.eclipse.jdt.core.tests.model/workspace/Converter_17/.project
@@ -0,0 +1,17 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<projectDescription>
+	<name>Converter_15</name>
+	<comment></comment>
+	<projects>
+	</projects>
+	<buildSpec>
+		<buildCommand>
+			<name>org.eclipse.jdt.core.javabuilder</name>
+			<arguments>
+			</arguments>
+		</buildCommand>
+	</buildSpec>
+	<natures>
+		<nature>org.eclipse.jdt.core.javanature</nature>
+	</natures>
+</projectDescription>
diff --git a/org.eclipse.jdt.core.tests.model/workspace/Converter_17/src/X.java b/org.eclipse.jdt.core.tests.model/workspace/Converter_17/src/X.java
new file mode 100644
index 0000000..fa1d493
--- /dev/null
+++ b/org.eclipse.jdt.core.tests.model/workspace/Converter_17/src/X.java
@@ -0,0 +1,4 @@
+public class X {
+	public void foo(X this) {
+	}
+}
\ No newline at end of file
diff --git a/org.eclipse.jdt.core.tests.performance/forceQualifierUpdate.txt b/org.eclipse.jdt.core.tests.performance/forceQualifierUpdate.txt
index a4a5612..6f93ca2 100644
--- a/org.eclipse.jdt.core.tests.performance/forceQualifierUpdate.txt
+++ b/org.eclipse.jdt.core.tests.performance/forceQualifierUpdate.txt
@@ -1,3 +1,4 @@
 # To force a version qualifier update, add the bug here
 Bug 545608 - [comparator] 4.12 Comparator errors - I20190320-1800
-Bug 561237 - [comparator] Comparator errors I20200318-1800
\ No newline at end of file
+Bug 561237 - [comparator] Comparator errors I20200318-1800
+Bug 574551 - Comparator errors in Y20210629-0800
\ No newline at end of file
diff --git a/org.eclipse.jdt.core.tests.performance/src/org/eclipse/jdt/core/tests/performance/SecondaryTypesPerformanceTest.java b/org.eclipse.jdt.core.tests.performance/src/org/eclipse/jdt/core/tests/performance/SecondaryTypesPerformanceTest.java
index a472b13..203a833 100644
--- a/org.eclipse.jdt.core.tests.performance/src/org/eclipse/jdt/core/tests/performance/SecondaryTypesPerformanceTest.java
+++ b/org.eclipse.jdt.core.tests.performance/src/org/eclipse/jdt/core/tests/performance/SecondaryTypesPerformanceTest.java
@@ -8,6 +8,10 @@
  *
  * SPDX-License-Identifier: EPL-2.0
  *
+ * This is an implementation of an early-draft specification developed under the Java
+ * Community Process (JCP) and is made available for testing and evaluation purposes
+ * only. The code is not compatible with any specification of the JCP.
+ *
  * Contributors:
  *     Sven Strohschein - initial API and implementation
  *******************************************************************************/
@@ -78,6 +82,7 @@
 		}
 	}
 
+	@SuppressWarnings("deprecation")
 	public void test01() {
 		List<String> classpathList = new ArrayList<>();
 		classpathList.addAll(createClasspathStrings());
diff --git a/org.eclipse.jdt.core/.settings/.api_filters b/org.eclipse.jdt.core/.settings/.api_filters
index eb740a6..31f0818 100644
--- a/org.eclipse.jdt.core/.settings/.api_filters
+++ b/org.eclipse.jdt.core/.settings/.api_filters
@@ -1,5 +1,13 @@
 <?xml version="1.0" encoding="UTF-8" standalone="no"?>
 <component id="org.eclipse.jdt.core" version="2">
+    <resource path="META-INF/MANIFEST.MF">
+        <filter id="931135546">
+            <message_arguments>
+                <message_argument value="3.27.50"/>
+                <message_argument value="3.26.0"/>
+            </message_arguments>
+        </filter>
+    </resource>
     <resource path="compiler/org/eclipse/jdt/core/compiler/CategorizedProblem.java" type="org.eclipse.jdt.core.compiler.CategorizedProblem">
         <filter comment="Java 14" id="576725006">
             <message_arguments>
@@ -8,6 +16,15 @@
             </message_arguments>
         </filter>
     </resource>
+    <resource path="dom/org/eclipse/jdt/core/dom/AST.java" type="org.eclipse.jdt.core.dom.AST">
+        <filter id="388194388">
+            <message_arguments>
+                <message_argument value="org.eclipse.jdt.core.dom.AST"/>
+                <message_argument value="JLS_Latest"/>
+                <message_argument value="16"/>
+            </message_arguments>
+        </filter>
+    </resource>
     <resource path="dom/org/eclipse/jdt/core/dom/Annotation.java" type="org.eclipse.jdt.core.dom.Annotation">
         <filter id="576725006">
             <message_arguments>
diff --git a/org.eclipse.jdt.core/META-INF/MANIFEST.MF b/org.eclipse.jdt.core/META-INF/MANIFEST.MF
index 48ad968..407b75c 100644
--- a/org.eclipse.jdt.core/META-INF/MANIFEST.MF
+++ b/org.eclipse.jdt.core/META-INF/MANIFEST.MF
@@ -3,7 +3,7 @@
 Bundle-ManifestVersion: 2
 Bundle-Name: %pluginName
 Bundle-SymbolicName: org.eclipse.jdt.core; singleton:=true
-Bundle-Version: 3.27.0.qualifier
+Bundle-Version: 3.27.50.qualifier
 Bundle-Activator: org.eclipse.jdt.core.JavaCore
 Bundle-Vendor: %providerName
 Bundle-Localization: plugin
diff --git a/org.eclipse.jdt.core/batch/org/eclipse/jdt/internal/compiler/batch/Main.java b/org.eclipse.jdt.core/batch/org/eclipse/jdt/internal/compiler/batch/Main.java
index 571b208..c13e7e5 100644
--- a/org.eclipse.jdt.core/batch/org/eclipse/jdt/internal/compiler/batch/Main.java
+++ b/org.eclipse.jdt.core/batch/org/eclipse/jdt/internal/compiler/batch/Main.java
@@ -1,5 +1,5 @@
 /*******************************************************************************
- * Copyright (c) 2000, 2020 IBM Corporation and others.
+ * Copyright (c) 2000, 2021 IBM Corporation and others.
  *
  * This program and the accompanying materials
  * are made available under the terms of the Eclipse Public License 2.0
@@ -8,6 +8,10 @@
  *
  * SPDX-License-Identifier: EPL-2.0
  *
+ * This is an implementation of an early-draft specification developed under the Java
+ * Community Process (JCP) and is made available for testing and evaluation purposes
+ * only. The code is not compatible with any specification of the JCP.
+ *
  * Contributors:
  *     IBM Corporation - initial API and implementation
  *     Tom Tromey - Contribution for bug 125961
@@ -2157,6 +2161,16 @@
 					mode = DEFAULT;
 					continue;
 				}
+				if (currentArg.equals("-17") || currentArg.equals("-17.0")) { //$NON-NLS-1$ //$NON-NLS-2$
+					if (didSpecifyCompliance) {
+						throw new IllegalArgumentException(
+							this.bind("configure.duplicateCompliance", currentArg)); //$NON-NLS-1$
+					}
+					didSpecifyCompliance = true;
+					this.options.put(CompilerOptions.OPTION_Compliance, CompilerOptions.VERSION_16);
+					mode = DEFAULT;
+					continue;
+				}
 				if (currentArg.equals("-d")) { //$NON-NLS-1$
 					if (this.destinationPath != null) {
 						StringBuilder errorMessage = new StringBuilder();
@@ -3206,6 +3220,9 @@
 		case "16": //$NON-NLS-1$
 		case "16.0": //$NON-NLS-1$
 			return CompilerOptions.VERSION_16;
+		case "17": //$NON-NLS-1$
+		case "17.0": //$NON-NLS-1$
+			return CompilerOptions.VERSION_17;
 		default:
 			return null;
 	}
diff --git a/org.eclipse.jdt.core/batch/org/eclipse/jdt/internal/compiler/batch/messages.properties b/org.eclipse.jdt.core/batch/org/eclipse/jdt/internal/compiler/batch/messages.properties
index 52e5115..127e461 100644
--- a/org.eclipse.jdt.core/batch/org/eclipse/jdt/internal/compiler/batch/messages.properties
+++ b/org.eclipse.jdt.core/batch/org/eclipse/jdt/internal/compiler/batch/messages.properties
@@ -1,5 +1,5 @@
 ###############################################################################
-# Copyright (c) 2000, 2019 IBM Corporation and others.
+# Copyright (c) 2000, 2021 IBM Corporation and others.
 #
 # This program and the accompanying materials
 # are made available under the terms of the Eclipse Public License 2.0
@@ -8,6 +8,10 @@
 #
 # SPDX-License-Identifier: EPL-2.0
 #
+# This is an implementation of an early-draft specification developed under the Java
+# Community Process (JCP) and is made available for testing and evaluation purposes
+# only. The code is not compatible with any specification of the JCP.
+#
 # Contributors:
 #   IBM Corporation - initial API and implementation
 #   Benjamin Muskalla - Contribution for bug 239066
@@ -67,7 +71,7 @@
 configure.unsupportedReleaseOption = option --release is supported only when run with JDK 9 or above
 configure.unsupportedWithRelease = option {0} is not supported when --release is used
 configure.unsupportedReleaseVersion = release version {0} is not supported
-configure.source = source level should be in ''1.1''...''1.8'',''9''...''16'' (or ''5.0''..''16.0''): {0}
+configure.source = source level should be in ''1.1''...''1.8'',''9''...''17'' (or ''5.0''..''17.0''): {0}
 configure.invalidSystem = invalid location for system libraries: {0}
 configure.unsupportedOption = option {0} not supported at compliance level 9 and above
 configure.duplicateOutputPath = duplicate output path specification: {0}
@@ -84,7 +88,7 @@
 configure.invalidWarningConfiguration = invalid warning configuration: ''{0}''
 configure.invalidWarning = invalid warning token: ''{0}''. Ignoring warning and compiling
 configure.invalidWarningOption = invalid warning option: ''{0}''. Must specify a warning token
-configure.targetJDK = target level should be in ''1.1''...''1.8'',''9''...''16'' (or ''5.0''..''16.0'') or cldc1.1: {0}
+configure.targetJDK = target level should be in ''1.1''...''1.8'',''9''...''17'' (or ''5.0''..''17.0'') or cldc1.1: {0}
 configure.incompatibleTargetForSource = Target level ''{0}'' is incompatible with source level ''{1}''. A target level ''{1}'' or better is required
 configure.incompatibleTargetForGenericSource = Target level ''{0}'' is incompatible with source level ''{1}''. A source level ''1.5'' or better is required
 configure.incompatibleComplianceForSource = Compliance level ''{0}'' is incompatible with source level ''{1}''. A compliance level ''{1}'' or better is required
@@ -251,9 +255,10 @@
 \    -14 -14.0          use 14  compliance (-source 14  -target 14)\n\
 \    -15 -15.0          use 15  compliance (-source 15  -target 15)\n\
 \    -16 -16.0          use 16  compliance (-source 16  -target 16)\n\
-\    -source <version>  set source level: 1.3 to 1.9, 10 to 16\n\
+\    -17 -17.0          use 17  compliance (-source 17  -target 17)\n\
+\    -source <version>  set source level: 1.3 to 1.9, 10 to 17\n\
 \                       (or 6, 6.0, etc)\n\
-\    -target <version>  set classfile target: 1.3 to 1.9, 10 to 16\n\
+\    -target <version>  set classfile target: 1.3 to 1.9, 10 to 17\n\
 \                       (or 6, 6.0, etc)\n\
 \                       cldc1.1 can also be used to generate the StackMap\n\
 \                       attribute\n\
diff --git a/org.eclipse.jdt.core/codeassist/org/eclipse/jdt/internal/codeassist/complete/CompletionParser.java b/org.eclipse.jdt.core/codeassist/org/eclipse/jdt/internal/codeassist/complete/CompletionParser.java
index ff22726..8f8643d 100644
--- a/org.eclipse.jdt.core/codeassist/org/eclipse/jdt/internal/codeassist/complete/CompletionParser.java
+++ b/org.eclipse.jdt.core/codeassist/org/eclipse/jdt/internal/codeassist/complete/CompletionParser.java
@@ -2262,7 +2262,7 @@
 						}
 						keywords[count++] = Keywords.IMPLEMENTS;
 					}
-					if (this.options.enablePreviewFeatures) {
+					if (JavaFeature.SEALED_CLASSES.isSupported(this.options)) {
 						boolean sealed = (type.modifiers & ExtraCompilerModifiers.AccSealed) != 0;
 						if (sealed)
 							keywords[count++] = RestrictedIdentifiers.PERMITS;
@@ -2603,7 +2603,7 @@
 				if(type.superInterfaces == null) {
 					keywords[count++] = Keywords.IMPLEMENTS;
 				}
-				if (this.options.enablePreviewFeatures) {
+				if (JavaFeature.SEALED_CLASSES.isSupported(this.options)) {
 					boolean sealed = (type.modifiers & ExtraCompilerModifiers.AccSealed) != 0;
 					if (sealed)
 						keywords[count++] = RestrictedIdentifiers.PERMITS;
diff --git a/org.eclipse.jdt.core/codeassist/org/eclipse/jdt/internal/codeassist/impl/AssistParser.java b/org.eclipse.jdt.core/codeassist/org/eclipse/jdt/internal/codeassist/impl/AssistParser.java
index b467078..2059902 100644
--- a/org.eclipse.jdt.core/codeassist/org/eclipse/jdt/internal/codeassist/impl/AssistParser.java
+++ b/org.eclipse.jdt.core/codeassist/org/eclipse/jdt/internal/codeassist/impl/AssistParser.java
@@ -8,6 +8,10 @@
  *
  * SPDX-License-Identifier: EPL-2.0
  *
+ * This is an implementation of an early-draft specification developed under the Java
+ * Community Process (JCP) and is made available for testing and evaluation purposes
+ * only. The code is not compatible with any specification of the JCP.
+ *
  * Contributors:
  *     IBM Corporation - initial API and implementation
  *******************************************************************************/
@@ -29,6 +33,7 @@
 import org.eclipse.jdt.internal.compiler.ast.AbstractVariableDeclaration;
 import org.eclipse.jdt.internal.compiler.ast.Annotation;
 import org.eclipse.jdt.internal.compiler.ast.Block;
+import org.eclipse.jdt.internal.compiler.ast.CaseStatement;
 import org.eclipse.jdt.internal.compiler.ast.CompilationUnitDeclaration;
 import org.eclipse.jdt.internal.compiler.ast.ConstructorDeclaration;
 import org.eclipse.jdt.internal.compiler.ast.ExplicitConstructorCall;
@@ -353,9 +358,15 @@
 					element = element.add(stmt, 0);
 					this.lastCheckPoint = stmt.sourceEnd + 1;
 				} else if (stmt.containsPatternVariable()) {
+					LocalDeclaration localDeclaration = null;
+					if(stmt instanceof CaseStatement) {
+						localDeclaration = ((CaseStatement)stmt).getLocalDeclaration();
+						if(localDeclaration !=null)
+							element.add(localDeclaration, 0);
+					}
 					element.add(stmt, 0);
 					this.lastCheckPoint = stmt.sourceEnd + 1;
-					this.isOrphanCompletionNode = false;
+					this.isOrphanCompletionNode = localDeclaration !=null;
 				}
 			}
 			continue;
diff --git a/org.eclipse.jdt.core/codeassist/org/eclipse/jdt/internal/codeassist/select/SelectionParser.java b/org.eclipse.jdt.core/codeassist/org/eclipse/jdt/internal/codeassist/select/SelectionParser.java
index eb41835..954f1eb 100644
--- a/org.eclipse.jdt.core/codeassist/org/eclipse/jdt/internal/codeassist/select/SelectionParser.java
+++ b/org.eclipse.jdt.core/codeassist/org/eclipse/jdt/internal/codeassist/select/SelectionParser.java
@@ -1,5 +1,5 @@
 /*******************************************************************************
- * Copyright (c) 2000, 2020 IBM Corporation and others.
+ * Copyright (c) 2000, 2021 IBM Corporation and others.
  *
  * This program and the accompanying materials
  * are made available under the terms of the Eclipse Public License 2.0
@@ -8,6 +8,10 @@
  *
  * SPDX-License-Identifier: EPL-2.0
  *
+ * This is an implementation of an early-draft specification developed under the Java
+ * Community Process (JCP) and is made available for testing and evaluation purposes
+ * only. The code is not compatible with any specification of the JCP.
+ *
  * Contributors:
  *     IBM Corporation - initial API and implementation
  *     Jesper Steen Møller <jesper@selskabet.org> - contributions for:
@@ -51,6 +55,7 @@
 import org.eclipse.jdt.internal.compiler.ast.ModuleReference;
 import org.eclipse.jdt.internal.compiler.ast.NameReference;
 import org.eclipse.jdt.internal.compiler.ast.NormalAnnotation;
+import org.eclipse.jdt.internal.compiler.ast.Pattern;
 import org.eclipse.jdt.internal.compiler.ast.QualifiedAllocationExpression;
 import org.eclipse.jdt.internal.compiler.ast.Reference;
 import org.eclipse.jdt.internal.compiler.ast.ReferenceExpression;
@@ -804,14 +809,14 @@
 	int length = this.patternLengthPtr >= 0 ?
 			this.patternLengthStack[this.patternLengthPtr--] : 0;
 	if (length > 0) {
-		LocalDeclaration typeDecl = (LocalDeclaration) this.patternStack[this.patternPtr--];
+		Pattern pattern = (Pattern) this.patternStack[this.patternPtr--];
 		pushOnExpressionStack(getUnspecifiedReferenceOptimized());
 		if (this.assistNode == null || this.expressionStack[this.expressionPtr] != this.assistNode) {
 			// Push only when the selection node is not the expression of this
 			// pattern matching instanceof expression
-			pushOnAstStack(typeDecl);
-			if ((this.selectionStart >= typeDecl.sourceStart)
-					&&  (this.selectionEnd <= typeDecl.sourceEnd)) {
+			pushOnAstStack(pattern.getPatternVariableIntroduced());
+			if ((this.selectionStart >= pattern.sourceStart)
+					&&  (this.selectionEnd <= pattern.sourceEnd)) {
 				this.restartRecovery	= true;
 				this.lastIgnoredToken = -1;
 			}
diff --git a/org.eclipse.jdt.core/compiler/org/eclipse/jdt/core/compiler/IProblem.java b/org.eclipse.jdt.core/compiler/org/eclipse/jdt/core/compiler/IProblem.java
index 2a722c5..220d436 100644
--- a/org.eclipse.jdt.core/compiler/org/eclipse/jdt/core/compiler/IProblem.java
+++ b/org.eclipse.jdt.core/compiler/org/eclipse/jdt/core/compiler/IProblem.java
@@ -8,6 +8,10 @@
  *
  * SPDX-License-Identifier: EPL-2.0
  *
+ * This is an implementation of an early-draft specification developed under the Java
+ * Community Process (JCP) and is made available for testing and evaluation purposes
+ * only. The code is not compatible with any specification of the JCP.
+ *
  * Contributors:
  *     IBM Corporation - initial API and implementation
  *     IBM Corporation - added the following constants
@@ -1580,6 +1584,12 @@
 	int UnboxingConversion = Internal + 721;
 
 	/**
+	 * Modifiers
+	 * @since 3.27 BETA_JAVA17
+	 */
+	int StrictfpNotRequired = Syntax + Internal + 741;
+
+	/**
 	 * Enum
 	 */
 	/** @since 3.1 */
@@ -2456,4 +2466,36 @@
 	int SealedSuperTypeDisallowed = PreviewRelated + 1867;
 	/* Java15 errors - end */
 
-	}
+	/**
+	 * @since 3.27 BETA_JAVA17
+	 * @noreference preview feature error
+	 */
+	int LocalReferencedInGuardMustBeEffectivelyFinal = PreviewRelated + 1900;
+	/** @since 3.27 BETA_JAVA17
+	 * @noreference preview feature error */
+	int SwitchPatternConstantCaseLabelIncompatible = PreviewRelated + 1901;
+	/** @since 3.27 BETA_JAVA17
+	 * @noreference preview feature error */
+	int SwitchPatternConstantWithPatternIncompatible = PreviewRelated + 1902;
+	/**
+	 * @since 3.27 BETA_JAVA17
+	 * @noreference preview feature error
+	 */
+	int IllegalFallthroughToPattern = PreviewRelated + 1903;
+
+	/** @since 3.27 BETA_JAVA17
+	 * @noreference preview feature error */
+	int SwitchPatternOnlyOnePatternCaseLabelAllowed = PreviewRelated + 1904;
+	/** @since 3.27 BETA_JAVA17
+	 * @noreference preview feature error */
+	int SwitchPatternBothPatternAndDefaultCaseLabelsNotAllowed = PreviewRelated + 1905;
+	/** @since 3.27 BETA_JAVA17
+	 * @noreference preview feature error */
+	int SwitchPatternBothNullAndNonTypePatternNotAllowed = PreviewRelated + 1906;
+	/** @since 3.27 BETA_JAVA17
+	 * @noreference preview feature error */
+	int PatternDominates = PreviewRelated + 1907;
+	/** @since 3.27 BETA_JAVA17
+	 * @noreference preview feature error */
+	int IllegalTotalPatternWithDefault = PreviewRelated + 1908;
+}
diff --git a/org.eclipse.jdt.core/compiler/org/eclipse/jdt/internal/compiler/ASTVisitor.java b/org.eclipse.jdt.core/compiler/org/eclipse/jdt/internal/compiler/ASTVisitor.java
index 00e93e6..72ba7c7 100644
--- a/org.eclipse.jdt.core/compiler/org/eclipse/jdt/internal/compiler/ASTVisitor.java
+++ b/org.eclipse.jdt.core/compiler/org/eclipse/jdt/internal/compiler/ASTVisitor.java
@@ -1,5 +1,5 @@
 /*******************************************************************************
- * Copyright (c) 2000, 2020 IBM Corporation and others.
+ * Copyright (c) 2000, 2021 IBM Corporation and others.
  *
  * This program and the accompanying materials
  * are made available under the terms of the Eclipse Public License 2.0
@@ -8,6 +8,10 @@
  *
  * SPDX-License-Identifier: EPL-2.0
  *
+ * This is an implementation of an early-draft specification developed under the Java
+ * Community Process (JCP) and is made available for testing and evaluation purposes
+ * only. The code is not compatible with any specification of the JCP.
+ *
  * Contributors:
  *     IBM Corporation - initial API and implementation
  *******************************************************************************/
@@ -40,6 +44,9 @@
 			ClassScope classScope) {
 			// do nothing by default
 	}
+	public void endVisit(TypePattern anyPattern, BlockScope scope) {
+		// do nothing by default
+	}
 	public void endVisit(Argument argument, BlockScope scope) {
 		// do nothing by default
 	}
@@ -152,6 +159,9 @@
 		BlockScope scope) {
 		// do nothing by default
 	}
+	public void endVisit(FakeDefaultLiteral fakeDefaultLiteral, BlockScope scope) {
+		// do nothing by default
+	}
 	public void endVisit(FalseLiteral falseLiteral, BlockScope scope) {
 		// do nothing by default
 	}
@@ -173,6 +183,9 @@
 	public void endVisit(ForStatement forStatement, BlockScope scope) {
 		// do nothing by default
 	}
+	public void endVisit(GuardedPattern guardedPattern, BlockScope scope) {
+		// do nothing by default, keep traversing
+	}
 	public void endVisit(IfStatement ifStatement, BlockScope scope) {
 		// do nothing by default
 	}
@@ -332,6 +345,9 @@
 	public void endVisit(OR_OR_Expression or_or_Expression, BlockScope scope) {
 		// do nothing by default
 	}
+	public void endVisit(Pattern patternExpression, BlockScope scope) {
+		// do nothing by default
+	}
 	public void endVisit(ParameterizedQualifiedTypeReference parameterizedQualifiedTypeReference, BlockScope scope) {
 		// do nothing by default
 	}
@@ -539,6 +555,9 @@
 			ClassScope classScope) {
 		return true; // do nothing by default, keep traversing
 	}
+	public boolean visit(TypePattern anyPattern, BlockScope scope) {
+		return true; // do nothing by default, keep traversing
+	}
 	public boolean visit(Argument argument, BlockScope scope) {
 		return true; // do nothing by default, keep traversing
 	}
@@ -654,6 +673,9 @@
 		BlockScope scope) {
 		return true; // do nothing by default, keep traversing
 	}
+	public boolean visit(FakeDefaultLiteral fakeDefaultLiteral, BlockScope scope) {
+		return true; // do nothing by default, keep traversing
+	}
 	public boolean visit(FalseLiteral falseLiteral, BlockScope scope) {
 		return true; // do nothing by default, keep traversing
 	}
@@ -675,6 +697,9 @@
 	public boolean visit(ForStatement forStatement, BlockScope scope) {
 		return true; // do nothing by default, keep traversing
 	}
+	public boolean visit(GuardedPattern guardedPattern, BlockScope scope) {
+		return true; // do nothing by default, keep traversing
+	}
 	public boolean visit(IfStatement ifStatement, BlockScope scope) {
 		return true; // do nothing by default, keep traversing
 	}
@@ -853,6 +878,9 @@
 	public boolean visit(ParameterizedSingleTypeReference parameterizedSingleTypeReference, ClassScope scope) {
 		return true; // do nothing by default, keep traversing
 	}
+	public boolean visit(Pattern patternExpression, BlockScope scope) {
+		return true; // do nothing by default, keep traversing
+	}
 	public boolean visit(PostfixExpression postfixExpression, BlockScope scope) {
 		return true; // do nothing by default, keep traversing
 	}
diff --git a/org.eclipse.jdt.core/compiler/org/eclipse/jdt/internal/compiler/ClassFile.java b/org.eclipse.jdt.core/compiler/org/eclipse/jdt/internal/compiler/ClassFile.java
index cf9e830..ac3a0bd 100644
--- a/org.eclipse.jdt.core/compiler/org/eclipse/jdt/internal/compiler/ClassFile.java
+++ b/org.eclipse.jdt.core/compiler/org/eclipse/jdt/internal/compiler/ClassFile.java
@@ -8,6 +8,10 @@
  *
  * SPDX-License-Identifier: EPL-2.0
  *
+ * This is an implementation of an early-draft specification developed under the Java
+ * Community Process (JCP) and is made available for testing and evaluation purposes
+ * only. The code is not compatible with any specification of the JCP.
+ *
  * Contributors:
  *     IBM Corporation - initial API and implementation
  *     Jesper S Moller - Contributions for
@@ -189,7 +193,8 @@
 	public static final String ALTMETAFACTORY_STRING = new String(ConstantPool.ALTMETAFACTORY);
 	public static final String METAFACTORY_STRING = new String(ConstantPool.METAFACTORY);
 	public static final String BOOTSTRAP_STRING = new String(ConstantPool.BOOTSTRAP);
-	public static final String[] BOOTSTRAP_METHODS = {ALTMETAFACTORY_STRING, METAFACTORY_STRING, BOOTSTRAP_STRING};
+	public static final String TYPESWITCH_STRING = new String(ConstantPool.TYPESWITCH);
+	public static final String[] BOOTSTRAP_METHODS = {ALTMETAFACTORY_STRING, METAFACTORY_STRING, BOOTSTRAP_STRING, TYPESWITCH_STRING};
 
 	/**
 	 * INTERNAL USE-ONLY
@@ -435,7 +440,7 @@
 		if (this.bootstrapMethods != null && !this.bootstrapMethods.isEmpty()) {
 			attributesNumber += generateBootstrapMethods(this.bootstrapMethods);
 		}
-		if (this.targetJDK >= ClassFileConstants.JDK16) {
+		if (this.targetJDK >= ClassFileConstants.JDK17) {
 			// add record attributes
 			attributesNumber += generatePermittedTypeAttributes();
 		}
@@ -3645,6 +3650,8 @@
 				localContentsOffset = addBootStrapLambdaEntry(localContentsOffset, (FunctionalExpression) o, fPtr);
 			} else if (o instanceof TypeDeclaration) {
 				localContentsOffset = addBootStrapRecordEntry(localContentsOffset, (TypeDeclaration) o, fPtr);
+			} else if (o instanceof SwitchStatement) {
+				localContentsOffset = addBootStrapTypeSwitchEntry(localContentsOffset, (SwitchStatement) o, fPtr);
 			}
 		}
 
@@ -3833,6 +3840,38 @@
 		}
 		return localContentsOffset;
 	}
+	private int addBootStrapTypeSwitchEntry(int localContentsOffset, SwitchStatement switchStatement, Map<String, Integer> fPtr) {
+		final int contentsEntries = 10;
+		int indexFortypeSwitch = fPtr.get(ClassFile.TYPESWITCH_STRING);
+		if (contentsEntries + localContentsOffset >= this.contents.length) {
+			resizeContents(contentsEntries);
+		}
+		if (indexFortypeSwitch == 0) {
+			ReferenceBinding javaLangRuntimeSwitchBootstraps = this.referenceBinding.scope.getJavaLangRuntimeSwitchBootstraps();
+			indexFortypeSwitch = this.constantPool.literalIndexForMethodHandle(ClassFileConstants.MethodHandleRefKindInvokeStatic, javaLangRuntimeSwitchBootstraps,
+					ConstantPool.TYPESWITCH, ConstantPool.JAVA_LANG_RUNTIME_SWITCHBOOTSTRAPS_TYPESWITCH_SIGNATURE, false);
+			fPtr.put(ClassFile.BOOTSTRAP_STRING, indexFortypeSwitch);
+		}
+		this.contents[localContentsOffset++] = (byte) (indexFortypeSwitch >> 8);
+		this.contents[localContentsOffset++] = (byte) indexFortypeSwitch;
+
+		// u2 num_bootstrap_arguments
+		int numArgsLocation = localContentsOffset;
+		int numArgs = switchStatement.caseLabelElementTypes.size();
+		this.contents[numArgsLocation++] = (byte) (numArgs >> 8);
+		this.contents[numArgsLocation] = (byte) numArgs;
+		localContentsOffset += 2;
+
+		for (TypeBinding type : switchStatement.caseLabelElementTypes) {
+			char[] typeName = type.constantPoolName();
+			int typeIndex = this.constantPool.literalIndexForType(typeName);
+			this.contents[localContentsOffset++] = (byte) (typeIndex >> 8);
+			this.contents[localContentsOffset++] = (byte) typeIndex;
+		}
+
+		return localContentsOffset;
+	}
+
 	private int generateLineNumberAttribute() {
 		int localContentsOffset = this.contentsOffset;
 		int attributesNumber = 0;
@@ -4305,6 +4344,9 @@
 		if ((methodBinding.tagBits & TagBits.ClearPrivateModifier) != 0) {
 			accessFlags &= ~ClassFileConstants.AccPrivate;
 		}
+		if (this.targetJDK >= ClassFileConstants.JDK17) {
+			accessFlags &= ~(ClassFileConstants.AccStrictfp);
+		}
 		this.contents[this.contentsOffset++] = (byte) (accessFlags >> 8);
 		this.contents[this.contentsOffset++] = (byte) accessFlags;
 		int nameIndex = this.constantPool.literalIndex(methodBinding.selector);
@@ -6109,6 +6151,14 @@
 		return expression.bootstrapMethodNumber = this.bootstrapMethods.size() - 1;
 	}
 
+	public int recordBootstrapMethod(SwitchStatement switchStatement) {
+		if (this.bootstrapMethods == null) {
+			this.bootstrapMethods = new ArrayList<>();
+		}
+		this.bootstrapMethods.add(switchStatement);
+		return this.bootstrapMethods.size() - 1;
+	}
+
 	public void reset(/*@Nullable*/SourceTypeBinding typeBinding, CompilerOptions options) {
 		// the code stream is reinitialized for each method
 		if (typeBinding != null) {
diff --git a/org.eclipse.jdt.core/compiler/org/eclipse/jdt/internal/compiler/ast/ASTNode.java b/org.eclipse.jdt.core/compiler/org/eclipse/jdt/internal/compiler/ast/ASTNode.java
index d1e1841..9fe482a 100644
--- a/org.eclipse.jdt.core/compiler/org/eclipse/jdt/internal/compiler/ast/ASTNode.java
+++ b/org.eclipse.jdt.core/compiler/org/eclipse/jdt/internal/compiler/ast/ASTNode.java
@@ -8,6 +8,10 @@
  *
  * SPDX-License-Identifier: EPL-2.0
  *
+ * This is an implementation of an early-draft specification developed under the Java
+ * Community Process (JCP) and is made available for testing and evaluation purposes
+ * only. The code is not compatible with any specification of the JCP.
+ *
  * Contributors:
  *     IBM Corporation - initial API and implementation
  *     Matt McCutchen - partial fix for https://bugs.eclipse.org/bugs/show_bug.cgi?id=122995
@@ -99,7 +103,7 @@
 	public final static int Bit4 = 0x8;					// return type (operator) | first assignment to local (name ref,local decl) | undocumented empty block (block, type and method decl)
 	public final static int Bit5 = 0x10;					// value for return (expression) | has all method bodies (unit) | supertype ref (type ref) | resolved (field decl)| name ref (yield result value)
 	public final static int Bit6 = 0x20;					// depth (name ref, msg) | ignore need cast check (cast expression) | error in signature (method declaration/ initializer) | is recovered (annotation reference)
-	public final static int Bit7 = 0x40;					// depth (name ref, msg) | need runtime checkcast (cast expression) | label used (labelStatement) | needFreeReturn (AbstractMethodDeclaration)
+	public final static int Bit7 = 0x40;					// depth (name ref, msg) | need runtime checkcast (cast expression) | label used (labelStatement) | needFreeReturn (AbstractMethodDeclaration) | Used in Pattern Guard expression (NameReference)
 	public final static int Bit8 = 0x80;					// depth (name ref, msg) | unsafe cast (cast expression) | is default constructor (constructor declaration) | isElseStatementUnreachable (if statement)
 	public final static int Bit9 = 0x100;				// depth (name ref, msg) | operator (operator) | is local type (type decl) | isThenStatementUnreachable (if statement) | can be static
 	public final static int Bit10= 0x200;				// depth (name ref, msg) | operator (operator) | is anonymous type (type decl) | is implicit constructor (constructor)
@@ -199,6 +203,7 @@
 	public static final int DepthSHIFT = 5;	// Bit6 -> Bit13
 	public static final int DepthMASK = Bit6|Bit7|Bit8|Bit9|Bit10|Bit11|Bit12|Bit13; // 8 bits for actual depth value (max. 255)
 	public static final int IsCapturedOuterLocal = Bit20;
+	public static final int IsUsedInPatternGuard = Bit7;
 	public static final int IsSecretYieldValueUsage = Bit5;
 
 	// for statements
diff --git a/org.eclipse.jdt.core/compiler/org/eclipse/jdt/internal/compiler/ast/CaseStatement.java b/org.eclipse.jdt.core/compiler/org/eclipse/jdt/internal/compiler/ast/CaseStatement.java
index 8c504b2..24895e5 100644
--- a/org.eclipse.jdt.core/compiler/org/eclipse/jdt/internal/compiler/ast/CaseStatement.java
+++ b/org.eclipse.jdt.core/compiler/org/eclipse/jdt/internal/compiler/ast/CaseStatement.java
@@ -1,5 +1,5 @@
 /*******************************************************************************
- * Copyright (c) 2000, 2019 IBM Corporation and others.
+ * Copyright (c) 2000, 2021 IBM Corporation and others.
  *
  * This program and the accompanying materials
  * are made available under the terms of the Eclipse Public License 2.0
@@ -8,6 +8,10 @@
  *
  * SPDX-License-Identifier: EPL-2.0
  *
+ * This is an implementation of an early-draft specification developed under the Java
+ * Community Process (JCP) and is made available for testing and evaluation purposes
+ * only. The code is not compatible with any specification of the JCP.
+ *
  * Contributors:
  *     IBM Corporation - initial API and implementation
  *******************************************************************************/
@@ -24,19 +28,26 @@
 import org.eclipse.jdt.internal.compiler.flow.FlowInfo;
 import org.eclipse.jdt.internal.compiler.impl.Constant;
 import org.eclipse.jdt.internal.compiler.impl.IntConstant;
-//import org.eclipse.jdt.internal.compiler.impl.IntConstant;
+import org.eclipse.jdt.internal.compiler.impl.JavaFeature;
 import org.eclipse.jdt.internal.compiler.lookup.Binding;
 import org.eclipse.jdt.internal.compiler.lookup.BlockScope;
+import org.eclipse.jdt.internal.compiler.lookup.ExtraCompilerModifiers;
 import org.eclipse.jdt.internal.compiler.lookup.FieldBinding;
+import org.eclipse.jdt.internal.compiler.lookup.LocalVariableBinding;
 import org.eclipse.jdt.internal.compiler.lookup.ReferenceBinding;
 import org.eclipse.jdt.internal.compiler.lookup.TypeBinding;
 
 public class CaseStatement extends Statement {
 
+	static final int CASE_CONSTANT = 1;
+	static final int CASE_PATTERN  = 2;
+
 	public BranchLabel targetLabel;
 	public Expression[] constantExpressions; // case with multiple expressions
 	public BranchLabel[] targetLabels; // for multiple expressions
 	public boolean isExpr = false;
+	private int caseLabelElements = 0; // TODO: Think of moving it up to switch statement for mem optimization
+	/* package */ int patternIndex = -1; // points to first pattern var index [only one pattern variable allowed now - should be 0]
 
 public CaseStatement(Expression constantExpression, int sourceEnd, int sourceStart) {
 	this(sourceEnd, sourceStart, constantExpression != null ? new Expression[] {constantExpression} : null);
@@ -46,6 +57,18 @@
 	this.constantExpressions = constantExpressions;
 	this.sourceEnd = sourceEnd;
 	this.sourceStart = sourceStart;
+	initPatterns();
+}
+
+private void initPatterns() {
+	int l = this.constantExpressions == null ? 0 : this.constantExpressions.length;
+	for (int i = 0; i < l; ++i) {
+		Expression e = this.constantExpressions[i];
+		if (e instanceof Pattern) {
+			this.patternIndex = i;
+			break;
+		}
+	}
 }
 
 @Override
@@ -67,12 +90,20 @@
 		Expression e) {
 	if (e.constant == Constant.NotAConstant
 			&& !e.resolvedType.isEnum()) {
-		currentScope.problemReporter().caseExpressionMustBeConstant(e);
+		boolean caseNullorDefaultAllowed =
+				JavaFeature.PATTERN_MATCHING_IN_SWITCH.isSupported(currentScope.compilerOptions())
+				&& (e instanceof NullLiteral || e instanceof FakeDefaultLiteral);
+		if (!caseNullorDefaultAllowed)
+			currentScope.problemReporter().caseExpressionMustBeConstant(e);
 	}
 	e.analyseCode(currentScope, flowContext, flowInfo);
 }
 
 @Override
+public boolean containsPatternVariable() {
+	return this.patternIndex != -1;
+}
+@Override
 public StringBuffer printStatement(int tab, StringBuffer output) {
 	printIndent(tab, output);
 	if (this.constantExpressions == null) {
@@ -103,12 +134,22 @@
 		for (int i = 0, l = this.targetLabels.length; i < l; ++i) {
 			this.targetLabels[i].place();
 		}
-	} else {
-		this.targetLabel.place();
 	}
+	if (this.targetLabel != null)
+		this.targetLabel.place();
+	casePatternExpressionGenerateCode(currentScope, codeStream);
 	codeStream.recordPositionsFrom(pc, this.sourceStart);
 }
 
+private void casePatternExpressionGenerateCode(BlockScope currentScope, CodeStream codeStream) {
+	if (this.patternIndex != -1) {
+		LocalVariableBinding local = currentScope.findVariable(SwitchStatement.SecretPatternVariableName, null);
+		codeStream.load(local);
+		Pattern patternExpression = ((Pattern) this.constantExpressions[this.patternIndex]);
+		patternExpression.generateCode(currentScope, codeStream);
+	}
+}
+
 /**
  * No-op : should use resolveCase(...) instead.
  */
@@ -123,33 +164,115 @@
  */
 @Override
 public Constant[] resolveCase(BlockScope scope, TypeBinding switchExpressionType, SwitchStatement switchStatement) {
+	if (containsPatternVariable()) {
+		return resolveWithPatternVariablesInScope(this.patternVarsWhenTrue, scope, switchExpressionType, switchStatement);
+	}
+	return resolveCasePrivate(scope, switchExpressionType, switchStatement);
+}
+public Constant[] resolveWithPatternVariablesInScope(LocalVariableBinding[] patternVariablesInScope,
+		BlockScope scope,
+		TypeBinding switchExpressionType,
+		SwitchStatement switchStatement) {
+	if (patternVariablesInScope != null) {
+		for (LocalVariableBinding binding : patternVariablesInScope) {
+			binding.modifiers &= ~ExtraCompilerModifiers.AccPatternVariable;
+		}
+		Constant[] constants = resolveCasePrivate(scope, switchExpressionType, switchStatement);
+		for (LocalVariableBinding binding : patternVariablesInScope) {
+			binding.modifiers |= ExtraCompilerModifiers.AccPatternVariable;
+		}
+		return constants;
+	} else {
+		return resolveCasePrivate(scope, switchExpressionType, switchStatement);
+	}
+}
+private Expression getFirstValidExpression(BlockScope scope, SwitchStatement switchStatement) {
+	assert this.constantExpressions != null;
+	Expression ret = null;
+	int patternCaseLabelCount = 0;
+	int typePatternCount = 0;
+	int defaultCaseLabelCount = 0;
+	int nullCaseLabelCount = 0;
+
+	boolean patternSwitchAllowed = JavaFeature.PATTERN_MATCHING_IN_SWITCH.isSupported(scope.compilerOptions());
+	if (patternSwitchAllowed) {
+		for (Expression e : this.constantExpressions) {
+			 if (e instanceof FakeDefaultLiteral) {
+				 flagDuplicateDefault(scope, switchStatement);
+				 if (patternCaseLabelCount > 0) {
+					 scope.problemReporter().switchPatternBothPatternAndDefaultCaseLabelsNotAllowed(e);
+				 }
+				 ++defaultCaseLabelCount;
+				 continue;
+			}
+			if (e instanceof Pattern) {
+				if (patternCaseLabelCount++ > 0) {
+					scope.problemReporter().switchPatternOnlyOnePatternCaseLabelAllowed(e);
+				} else if (defaultCaseLabelCount > 0) {
+					scope.problemReporter().switchPatternBothPatternAndDefaultCaseLabelsNotAllowed(e);
+				}
+				if (e instanceof TypePattern) {
+					++typePatternCount;
+				} else if (nullCaseLabelCount > 0 ) {
+					scope.problemReporter().switchPatternBothNullAndNonTypePatternNotAllowed(e);
+				}
+			} else if (e instanceof NullLiteral) {
+				if (switchStatement.nullCase == null)
+					switchStatement.nullCase = this;
+
+				if (nullCaseLabelCount++ > 0) {
+					// TODO: Decide whether we need to have a more fine-grain element level error flagging for null specifically
+//					continue;
+				}
+				if ((patternCaseLabelCount - typePatternCount) > 0) {
+					scope.problemReporter().switchPatternBothNullAndNonTypePatternNotAllowed(e);
+				}
+			}
+			if (ret == null) ret = e;
+		}
+	} else {
+		for (Expression e : this.constantExpressions) {
+			if (e instanceof Pattern
+					|| e instanceof NullLiteral
+					|| e instanceof FakeDefaultLiteral) {
+				scope.problemReporter().validateJavaFeatureSupport(JavaFeature.PATTERN_MATCHING_IN_SWITCH,
+						e.sourceStart, e.sourceEnd);
+				continue;
+			}
+			if (ret == null) ret = e;
+		}
+	}
+	return ret;
+}
+private Constant[] resolveCasePrivate(BlockScope scope, TypeBinding switchExpressionType, SwitchStatement switchStatement) {
 	// switchExpressionType maybe null in error case
 	scope.enclosingCase = this; // record entering in a switch case block
-	Expression[] constExprs = this.constantExpressions;
-	Expression constExpr = constExprs != null && constExprs.length > 0 ? constExprs[0] : null;
-	if (constExpr == null) {
-		// remember the default case into the associated switch statement
-		if (switchStatement.defaultCase != null)
-			scope.problemReporter().duplicateDefaultCase(this);
-
-		// on error the last default will be the selected one ...
-		switchStatement.defaultCase = this;
+	if (this.constantExpressions == null) {
+		flagDuplicateDefault(scope, switchStatement);
 		return Constant.NotAConstantList;
 	}
+	Expression constExpr = getFirstValidExpression(scope, switchStatement);
+	if (constExpr == null) {
+		return Constant.NotAConstantList;
+	}
+
 	// add into the collection of cases of the associated switch statement
 	switchStatement.cases[switchStatement.caseCount++] = this;
 	if (switchExpressionType != null && switchExpressionType.isEnum() && (constExpr instanceof SingleNameReference)) {
 		((SingleNameReference) constExpr).setActualReceiverType((ReferenceBinding)switchExpressionType);
 	}
+
 	TypeBinding caseType = constExpr.resolveType(scope);
 	if (caseType == null || switchExpressionType == null) return Constant.NotAConstantList;
 	// tag constant name with enum type for privileged access to its members
 
 	List<Constant> cases = new ArrayList<>();
-	for (Expression e : constExprs) {
+	for (Expression e : this.constantExpressions) {
 		if (e != constExpr) {
 			if (switchExpressionType.isEnum() && (e instanceof SingleNameReference)) {
 				((SingleNameReference) e).setActualReceiverType((ReferenceBinding)switchExpressionType);
+			} else if (e instanceof FakeDefaultLiteral) {
+				continue; // already processed
 			}
 			e.resolveType(scope);
 		}
@@ -158,20 +281,81 @@
 			cases.add(con);
 		}
 	}
+	this.resolveWithPatternVariablesInScope(this.getPatternVariablesWhenTrue(), scope);
 	if (cases.size() > 0) {
 		return cases.toArray(new Constant[cases.size()]);
 	}
 
 	return Constant.NotAConstantList;
 }
+
+private void flagDuplicateDefault(BlockScope scope, SwitchStatement switchStatement) {
+	// remember the default case into the associated switch statement
+	if (switchStatement.defaultCase != null)
+		scope.problemReporter().duplicateDefaultCase(this);
+
+	// on error the last default will be the selected one ...
+	switchStatement.defaultCase = this;
+	if ((switchStatement.switchBits & SwitchStatement.TotalPattern) != 0) {
+		scope.problemReporter().illegalTotalPatternWithDefault(this);
+	}
+}
+public void collectPatternVariablesToScope(LocalVariableBinding[] variables, BlockScope scope) {
+	if (!containsPatternVariable()) {
+		return;
+	}
+	for (Expression e : this.constantExpressions) {
+		e.collectPatternVariablesToScope(variables, scope);
+		LocalVariableBinding[] patternVariables = e.getPatternVariablesWhenTrue();
+		addPatternVariablesWhenTrue(patternVariables);
+	}
+}
+private boolean testForMixedLabelKind(int kind) {
+	int kinds = this.caseLabelElements;
+	this.caseLabelElements |= kind;
+	return kinds != 0 && (kinds & kind) != kind;
+}
 public Constant resolveConstantExpression(BlockScope scope,
 											TypeBinding caseType,
 											TypeBinding switchExpressionType,
 											SwitchStatement switchStatement,
 											Expression expression) {
 
+	boolean patternSwitchAllowed = JavaFeature.PATTERN_MATCHING_IN_SWITCH.isSupported(scope.compilerOptions());
+	if (patternSwitchAllowed) {
+		if (expression instanceof Pattern) {
+			if (testForMixedLabelKind(CASE_PATTERN)) {
+				scope.problemReporter().switchPatternConstantWithPatternIncompatible(expression);
+			}
+			return resolveConstantExpression(scope, caseType, switchExpressionType,
+					switchStatement,(Pattern) expression);
+		} else if (expression instanceof NullLiteral) {
+			if (!(switchExpressionType instanceof ReferenceBinding)) {
+				scope.problemReporter().typeMismatchError(TypeBinding.NULL, switchExpressionType, expression, null);
+			}
+			switchStatement.switchBits |= SwitchStatement.NullCase;
+			return IntConstant.fromValue(-1);
+		} else if (expression instanceof FakeDefaultLiteral) {
+			// do nothing
+		} else {
+			if (testForMixedLabelKind(CASE_CONSTANT)) {
+				scope.problemReporter().switchPatternConstantWithPatternIncompatible(expression);
+				return Constant.NotAConstant;
+			}
+			if (switchStatement.isNonTraditional) {
+				if (!expression.isConstantValueOfTypeAssignableToType(caseType, switchExpressionType)) {
+					scope.problemReporter().switchPatternConstantCaseLabelIncompatible(expression, switchExpressionType);
+					return Constant.NotAConstant;
+				}
+			}
+		}
+	}
+	boolean boxing = !patternSwitchAllowed ||
+			switchStatement.isAllowedType(switchExpressionType);
+
 	if (expression.isConstantValueOfTypeAssignableToType(caseType, switchExpressionType)
-			|| caseType.isCompatibleWith(switchExpressionType)) {
+			||(caseType.isCompatibleWith(switchExpressionType)
+				&& !(expression instanceof StringLiteral))) {
 		if (caseType.isEnum()) {
 			if (((expression.bits & ASTNode.ParenthesizedMASK) >> ASTNode.ParenthesizedSHIFT) != 0) {
 				scope.problemReporter().enumConstantsCannotBeSurroundedByParenthesis(expression);
@@ -191,7 +375,7 @@
 		} else {
 			return expression.constant;
 		}
-	} else if (isBoxingCompatible(caseType, switchExpressionType, expression, scope)) {
+	} else if (boxing && isBoxingCompatible(caseType, switchExpressionType, expression, scope)) {
 		// constantExpression.computeConversion(scope, caseType, switchExpressionType); - do not report boxing/unboxing conversion
 		return expression.constant;
 	}
@@ -199,6 +383,67 @@
 	return Constant.NotAConstant;
 }
 
+private Constant resolveConstantExpression(BlockScope scope,
+		TypeBinding caseType,
+		TypeBinding switchExpressionType,
+		SwitchStatement switchStatement,
+		Pattern e) {
+	Constant constant = Constant.NotAConstant;
+	TypeBinding type = e.resolveType(scope);
+	if (type != null) {
+		constant = IntConstant.fromValue(switchStatement.caseLabelElements.size());
+		switchStatement.caseLabelElements.add(e);
+		if (e.resolvedType != null) {
+			// 14.30.2 at compile-time we "resolve" the pattern with respect to the (compile-time) type
+			// of the expression being pattern matched
+			TypeBinding pb = e.resolveAtType(scope, switchStatement.expression.resolvedType);
+			if (pb != null) switchStatement.caseLabelElementTypes.add(pb);
+			TypeBinding expressionType = switchStatement.expression.resolvedType;
+			LocalDeclaration patternVar = e.getPatternVariableIntroduced();
+			if (patternVar != null && !patternVar.type.isTypeNameVar(scope)) {
+				// The following code is copied from InstanceOfExpression#resolve()
+				// But there are several differences to warranty a copy
+				if (!pb.isReifiable()) {
+					if (expressionType != TypeBinding.NULL) {
+						boolean isLegal = e.checkCastTypesCompatibility(scope, pb, expressionType, e, false);
+						if (!isLegal || (e.bits & ASTNode.UnsafeCast) != 0) {
+							scope.problemReporter().unsafeCastInInstanceof(e, pb, expressionType);
+						}
+					}
+				} else if (pb.isValidBinding()) {
+					// if not a valid binding, an error has already been reported for unresolved type
+					if (pb.isBaseType()
+							|| !e.checkCastTypesCompatibility(scope, pb, expressionType, null, false)) {
+						scope.problemReporter().typeMismatchError(expressionType, pb, e, null);
+					}
+				}
+			}
+			if (e.isTotalForType(expressionType)) {
+				switchStatement.switchBits |= SwitchStatement.TotalPattern;
+				if (switchStatement.defaultCase != null)
+					scope.problemReporter().illegalTotalPatternWithDefault(this);
+			}
+		}
+
+	}
+	return constant;
+}
+
+/* package */ void patternCaseRemovePatternLocals(CodeStream codeStream) {
+	for (Expression e : this.constantExpressions) {
+		if (e instanceof Pattern) {
+			e.traverse(new ASTVisitor() {
+				@Override
+				public boolean visit(TypePattern typePattern, BlockScope scope) {
+					LocalDeclaration local = typePattern.getPatternVariableIntroduced();
+					if (local != null && local.binding != null)
+						codeStream.removeVariable(local.binding);
+					return false; // No deeper than this on this node
+				}
+			}, (BlockScope) null);
+		}
+	}
+}
 @Override
 public void traverse(ASTVisitor visitor, 	BlockScope blockScope) {
 	if (visitor.visit(this, blockScope)) {
@@ -211,4 +456,15 @@
 	}
 	visitor.endVisit(this, blockScope);
 }
+/**
+ * @noreference This method is not intended to be referenced by clients.
+ * To be used in SelectionParser/AssistParser only if containsPatternVariable is positive
+ * @return local declaration in the type pattern if any else null
+ */
+public LocalDeclaration getLocalDeclaration() {
+	Expression cexp = this.constantExpressions[this.patternIndex];
+	LocalDeclaration patternVariableIntroduced = cexp.getPatternVariableIntroduced();
+	return patternVariableIntroduced;
+}
+
 }
diff --git a/org.eclipse.jdt.core/compiler/org/eclipse/jdt/internal/compiler/ast/Expression.java b/org.eclipse.jdt.core/compiler/org/eclipse/jdt/internal/compiler/ast/Expression.java
index 497cc11..7db5fca 100644
--- a/org.eclipse.jdt.core/compiler/org/eclipse/jdt/internal/compiler/ast/Expression.java
+++ b/org.eclipse.jdt.core/compiler/org/eclipse/jdt/internal/compiler/ast/Expression.java
@@ -788,7 +788,7 @@
 public void addPatternVariables(BlockScope scope, CodeStream codeStream) {
 	// Nothing by default
 }
-protected LocalDeclaration getPatternVariableIntroduced() {
+public LocalDeclaration getPatternVariableIntroduced() {
 	return null;
 }
 public void collectPatternVariablesToScope(LocalVariableBinding[] variables, BlockScope scope) {
diff --git a/org.eclipse.jdt.core/compiler/org/eclipse/jdt/internal/compiler/ast/FakeDefaultLiteral.java b/org.eclipse.jdt.core/compiler/org/eclipse/jdt/internal/compiler/ast/FakeDefaultLiteral.java
new file mode 100644
index 0000000..93a2156
--- /dev/null
+++ b/org.eclipse.jdt.core/compiler/org/eclipse/jdt/internal/compiler/ast/FakeDefaultLiteral.java
@@ -0,0 +1,54 @@
+/*******************************************************************************
+ * Copyright (c) 2021 IBM Corporation and others.
+ *
+ * This program and the accompanying materials
+ * are made available under the terms of the Eclipse Public License 2.0
+ * which accompanies this distribution, and is available at
+ * https://www.eclipse.org/legal/epl-2.0/
+ *
+ * SPDX-License-Identifier: EPL-2.0
+ *
+ * This is an implementation of an early-draft specification developed under the Java
+ * Community Process (JCP) and is made available for testing and evaluation purposes
+ * only. The code is not compatible with any specification of the JCP.
+ *
+ * Contributors:
+ *     IBM Corporation - initial API and implementation
+ *******************************************************************************/
+package org.eclipse.jdt.internal.compiler.ast;
+
+import org.eclipse.jdt.internal.compiler.impl.Constant;
+import org.eclipse.jdt.internal.compiler.lookup.*;
+
+/**
+ * Sole purpose of {@link FakeDefaultLiteral} is to appear
+ * in case 'default' of switch patterns (JEP 406 at the time
+ * of writing this comment)
+ *
+ */
+public class FakeDefaultLiteral extends MagicLiteral {
+
+	static final char[] source = {'d' , 'e' , 'f' , 'a', 'u', 'l','t'};
+
+	public FakeDefaultLiteral(int s , int e) {
+
+		super(s,e);
+	}
+
+	@Override
+	public void computeConstant() {
+
+		this.constant = Constant.NotAConstant;
+	}
+
+	@Override
+	public TypeBinding literalType(BlockScope scope) {
+		// TODO Change this while implementing flow analysis
+		return TypeBinding.VOID;
+	}
+
+	@Override
+	public char[] source() {
+		return source;
+	}
+}
diff --git a/org.eclipse.jdt.core/compiler/org/eclipse/jdt/internal/compiler/ast/GuardedPattern.java b/org.eclipse.jdt.core/compiler/org/eclipse/jdt/internal/compiler/ast/GuardedPattern.java
new file mode 100644
index 0000000..acfb59b
--- /dev/null
+++ b/org.eclipse.jdt.core/compiler/org/eclipse/jdt/internal/compiler/ast/GuardedPattern.java
@@ -0,0 +1,140 @@
+/*******************************************************************************
+ * Copyright (c) 2021 IBM Corporation and others.
+ *
+ * This program and the accompanying materials
+ * are made available under the terms of the Eclipse Public License 2.0
+ * which accompanies this distribution, and is available at
+ * https://www.eclipse.org/legal/epl-2.0/
+ *
+ * SPDX-License-Identifier: EPL-2.0
+ *
+ * This is an implementation of an early-draft specification developed under the Java
+ * Community Process (JCP) and is made available for testing and evaluation purposes
+ * only. The code is not compatible with any specification of the JCP.
+ *
+ * Contributors:
+ *     IBM Corporation - initial API and implementation
+ *******************************************************************************/
+package org.eclipse.jdt.internal.compiler.ast;
+
+import org.eclipse.jdt.internal.compiler.ASTVisitor;
+import org.eclipse.jdt.internal.compiler.codegen.BranchLabel;
+import org.eclipse.jdt.internal.compiler.codegen.CodeStream;
+import org.eclipse.jdt.internal.compiler.flow.FlowContext;
+import org.eclipse.jdt.internal.compiler.flow.FlowInfo;
+import org.eclipse.jdt.internal.compiler.impl.Constant;
+import org.eclipse.jdt.internal.compiler.lookup.BlockScope;
+import org.eclipse.jdt.internal.compiler.lookup.LocalVariableBinding;
+import org.eclipse.jdt.internal.compiler.lookup.TypeBinding;
+
+public class GuardedPattern extends Pattern {
+
+	public Pattern primaryPattern;
+	public Expression condition;
+	/* package */ BranchLabel thenTarget;
+
+	public GuardedPattern(Pattern primaryPattern, Expression conditionalAndExpression) {
+		this.primaryPattern = primaryPattern;
+		this.condition = conditionalAndExpression;
+		this.sourceStart = primaryPattern.sourceStart;
+		this.sourceEnd = conditionalAndExpression.sourceEnd;
+	}
+	@Override
+	public void collectPatternVariablesToScope(LocalVariableBinding[] variables, BlockScope scope) {
+		this.primaryPattern.collectPatternVariablesToScope(variables, scope);
+		addPatternVariablesWhenTrue(this.primaryPattern.getPatternVariablesWhenTrue());
+		this.condition.collectPatternVariablesToScope(variables, scope);
+		addPatternVariablesWhenTrue(this.condition.getPatternVariablesWhenTrue());
+	}
+
+	@Override
+	public LocalDeclaration getPatternVariableIntroduced() {
+		return this.primaryPattern.getPatternVariableIntroduced();
+	}
+
+	@Override
+	public FlowInfo analyseCode(BlockScope currentScope, FlowContext flowContext, FlowInfo flowInfo) {
+		flowInfo = this.primaryPattern.analyseCode(currentScope, flowContext, flowInfo);
+		return this.condition.analyseCode(currentScope, flowContext, flowInfo);
+	}
+
+	@Override
+	public void generateCode(BlockScope currentScope, CodeStream codeStream) {
+ 		this.primaryPattern.generateCode(currentScope, codeStream);
+
+		Constant cst =  this.condition.optimizedBooleanConstant();
+		this.thenTarget = new BranchLabel(codeStream);
+
+		this.condition.generateOptimizedBoolean(
+				currentScope,
+				codeStream,
+				this.thenTarget,
+				null,
+				cst == Constant.NotAConstant);
+	}
+
+	@Override
+	public boolean isTotalForType(TypeBinding type) {
+		Constant cst = this.condition.optimizedBooleanConstant();
+		return this.primaryPattern.isTotalForType(type) && cst != Constant.NotAConstant && cst.booleanValue() == true;
+	}
+
+	@Override
+	public void resolve(BlockScope scope) {
+		this.resolveType(scope);
+	}
+
+	@Override
+	public boolean dominates(Pattern p) {
+		// Guarded pattern can never dominate another, even if the guards are identical
+		return false;
+	}
+
+	@Override
+	public TypeBinding resolveType(BlockScope scope) {
+		if (this.resolvedType != null || this.primaryPattern == null)
+			return this.resolvedType;
+		this.resolvedType = this.primaryPattern.resolveType(scope);
+		this.condition.resolveType(scope);
+		this.condition.traverse(new ASTVisitor() {
+			@Override
+			public boolean visit(
+					SingleNameReference ref,
+					BlockScope skope) {
+				LocalVariableBinding local = ref.localVariableBinding();
+				if (local != null) {
+					ref.bits |= ASTNode.IsUsedInPatternGuard;
+				}
+				return false;
+			}
+		}, scope);
+		return this.resolvedType = this.primaryPattern.resolvedType;
+	}
+
+	@Override
+	public TypeBinding resolveAtType(BlockScope scope, TypeBinding u) {
+		if (this.resolvedType == null || this.primaryPattern == null)
+			return null;
+		if (this.primaryPattern.isTotalForType(u))
+			return this.primaryPattern.resolveAtType(scope, u);
+
+		return this.resolvedType; //else leave the pattern untouched for now.
+	}
+
+	@Override
+	public StringBuffer printExpression(int indent, StringBuffer output) {
+		this.primaryPattern.print(indent, output).append(" && "); //$NON-NLS-1$
+		return this.condition.print(indent, output);
+	}
+
+	@Override
+	public void traverse(ASTVisitor visitor, BlockScope scope) {
+		if (visitor.visit(this, scope)) {
+			if (this.primaryPattern != null)
+				this.primaryPattern.traverse(visitor, scope);
+			if (this.condition != null)
+				this.condition.traverse(visitor, scope);
+		}
+		visitor.endVisit(this, scope);
+	}
+}
diff --git a/org.eclipse.jdt.core/compiler/org/eclipse/jdt/internal/compiler/ast/InstanceOfExpression.java b/org.eclipse.jdt.core/compiler/org/eclipse/jdt/internal/compiler/ast/InstanceOfExpression.java
index 22b6a66..9a162a3 100644
--- a/org.eclipse.jdt.core/compiler/org/eclipse/jdt/internal/compiler/ast/InstanceOfExpression.java
+++ b/org.eclipse.jdt.core/compiler/org/eclipse/jdt/internal/compiler/ast/InstanceOfExpression.java
@@ -51,15 +51,15 @@
 	this.sourceStart = expression.sourceStart;
 	this.sourceEnd = type.sourceEnd;
 }
-public InstanceOfExpression(Expression expression, LocalDeclaration local) {
+public InstanceOfExpression(Expression expression, Pattern pattern) {
 	this.expression = expression;
-	this.elementVariable = local;
+	// As of now, instanceof can only have a type pattern variable.
+	// So, extract the local variable definition and ignore the pattern
+	this.elementVariable = pattern.getPatternVariableIntroduced();
 	this.type = this.elementVariable.type;
 	this.bits |= INSTANCEOF << OperatorSHIFT;
-	this.elementVariable.sourceStart = local.sourceStart;
-	this.elementVariable.sourceEnd = local.sourceEnd;
 	this.sourceStart = expression.sourceStart;
-	this.sourceEnd = local.declarationSourceEnd;
+	this.sourceEnd = this.elementVariable.declarationSourceEnd;
 }
 
 @Override
@@ -293,7 +293,7 @@
 	return this.elementVariable != null;
 }
 @Override
-protected LocalDeclaration getPatternVariableIntroduced() {
+public LocalDeclaration getPatternVariableIntroduced() {
 	return this.elementVariable;
 }
 private void addSecretInstanceOfPatternExpressionValue(BlockScope scope1) {
diff --git a/org.eclipse.jdt.core/compiler/org/eclipse/jdt/internal/compiler/ast/LocalDeclaration.java b/org.eclipse.jdt.core/compiler/org/eclipse/jdt/internal/compiler/ast/LocalDeclaration.java
index 64c1c9a..d46fdf8 100644
--- a/org.eclipse.jdt.core/compiler/org/eclipse/jdt/internal/compiler/ast/LocalDeclaration.java
+++ b/org.eclipse.jdt.core/compiler/org/eclipse/jdt/internal/compiler/ast/LocalDeclaration.java
@@ -265,7 +265,7 @@
 		TypeBinding variableType = null;
 		boolean variableTypeInferenceError = false;
 		boolean isTypeNameVar = isTypeNameVar(scope);
-		if (isTypeNameVar) {
+		if (isTypeNameVar && !isPatternVariable) {
 			if ((this.bits & ASTNode.IsForeachElementVariable) == 0) {
 				// infer a type from the initializer
 				if (this.initialization != null) {
diff --git a/org.eclipse.jdt.core/compiler/org/eclipse/jdt/internal/compiler/ast/NameReference.java b/org.eclipse.jdt.core/compiler/org/eclipse/jdt/internal/compiler/ast/NameReference.java
index 0c5f5f8..d00eba3 100644
--- a/org.eclipse.jdt.core/compiler/org/eclipse/jdt/internal/compiler/ast/NameReference.java
+++ b/org.eclipse.jdt.core/compiler/org/eclipse/jdt/internal/compiler/ast/NameReference.java
@@ -1,5 +1,5 @@
 /*******************************************************************************
- * Copyright (c) 2000, 2020 IBM Corporation and others.
+ * Copyright (c) 2000, 2021 IBM Corporation and others.
  *
  * This program and the accompanying materials
  * are made available under the terms of the Eclipse Public License 2.0
@@ -8,6 +8,10 @@
  *
  * SPDX-License-Identifier: EPL-2.0
  *
+ * This is an implementation of an early-draft specification developed under the Java
+ * Community Process (JCP) and is made available for testing and evaluation purposes
+ * only. The code is not compatible with any specification of the JCP.
+ *
  * Contributors:
  *     IBM Corporation - initial API and implementation
  *     Stephan Herrmann - Contribution for
@@ -19,6 +23,8 @@
  *******************************************************************************/
 package org.eclipse.jdt.internal.compiler.ast;
 
+import java.util.function.Predicate;
+
 import org.eclipse.jdt.internal.compiler.lookup.*;
 import org.eclipse.jdt.internal.compiler.problem.AbortMethod;
 
@@ -105,14 +111,26 @@
 /* Called during code generation to ensure that outer locals's effectively finality is guaranteed.
    Aborts if constraints are violated. Due to various complexities, this check is not conveniently
    implementable in resolve/analyze phases.
+   Another quirk here is this method tells the clients whether the below condition is true
+     (this.bits & ASTNode.IsCapturedOuterLocal) != 0
 */
-public void checkEffectiveFinality(VariableBinding localBinding, Scope scope) {
+public boolean checkEffectiveFinality(VariableBinding localBinding, Scope scope) {
+	Predicate<VariableBinding> test = (local) -> {
+		return (!localBinding.isFinal() && !localBinding.isEffectivelyFinal());
+	};
 	if ((this.bits & ASTNode.IsCapturedOuterLocal) != 0) {
-		if (!localBinding.isFinal() && !localBinding.isEffectivelyFinal()) {
+		if (test.test(localBinding)) {
 			scope.problemReporter().cannotReferToNonEffectivelyFinalOuterLocal(localBinding, this);
 			throw new AbortMethod(scope.referenceCompilationUnit().compilationResult, null);
 		}
+		return true;
+	} else if ((this.bits & ASTNode.IsUsedInPatternGuard) != 0) {
+		if (test.test(localBinding)) {
+			scope.problemReporter().cannotReferToNonFinalLocalInGuard(localBinding, this);
+			throw new AbortMethod(scope.referenceCompilationUnit().compilationResult, null);
+		}
 	}
+	return false;
 }
 
 @Override
diff --git a/org.eclipse.jdt.core/compiler/org/eclipse/jdt/internal/compiler/ast/Pattern.java b/org.eclipse.jdt.core/compiler/org/eclipse/jdt/internal/compiler/ast/Pattern.java
new file mode 100644
index 0000000..ac4b862
--- /dev/null
+++ b/org.eclipse.jdt.core/compiler/org/eclipse/jdt/internal/compiler/ast/Pattern.java
@@ -0,0 +1,46 @@
+/*******************************************************************************
+ * Copyright (c) 2021 IBM Corporation and others.
+ *
+ * This program and the accompanying materials
+ * are made available under the terms of the Eclipse Public License 2.0
+ * which accompanies this distribution, and is available at
+ * https://www.eclipse.org/legal/epl-2.0/
+ *
+ * SPDX-License-Identifier: EPL-2.0
+ *
+ * This is an implementation of an early-draft specification developed under the Java
+ * Community Process (JCP) and is made available for testing and evaluation purposes
+ * only. The code is not compatible with any specification of the JCP.
+ *
+ * Contributors:
+ *     IBM Corporation - initial API and implementation
+ *******************************************************************************/
+package org.eclipse.jdt.internal.compiler.ast;
+
+import java.util.function.Supplier;
+
+import org.eclipse.jdt.internal.compiler.codegen.BranchLabel;
+import org.eclipse.jdt.internal.compiler.lookup.BlockScope;
+import org.eclipse.jdt.internal.compiler.lookup.TypeBinding;
+
+public abstract class Pattern extends Expression {
+
+	public boolean isTotalForType(TypeBinding type) {
+		return false;
+	}
+
+	public TypeBinding resolveAtType(BlockScope scope, TypeBinding type) {
+		return null;
+	}
+
+	public void setTargetSupplier(Supplier<BranchLabel> targetSupplier) {
+		// default implementation does nothing
+	}
+
+	public abstract boolean dominates(Pattern p);
+
+	@Override
+	public StringBuffer print(int indent, StringBuffer output) {
+		return this.printExpression(indent, output);
+	}
+}
diff --git a/org.eclipse.jdt.core/compiler/org/eclipse/jdt/internal/compiler/ast/QualifiedNameReference.java b/org.eclipse.jdt.core/compiler/org/eclipse/jdt/internal/compiler/ast/QualifiedNameReference.java
index b1bf2cd..c01359d 100644
--- a/org.eclipse.jdt.core/compiler/org/eclipse/jdt/internal/compiler/ast/QualifiedNameReference.java
+++ b/org.eclipse.jdt.core/compiler/org/eclipse/jdt/internal/compiler/ast/QualifiedNameReference.java
@@ -1,5 +1,5 @@
 /*******************************************************************************
- * Copyright (c) 2000, 2018 IBM Corporation and others.
+ * Copyright (c) 2000, 2021 IBM Corporation and others.
  *
  * This program and the accompanying materials
  * are made available under the terms of the Eclipse Public License 2.0
@@ -8,6 +8,10 @@
  *
  * SPDX-License-Identifier: EPL-2.0
  *
+ * This is an implementation of an early-draft specification developed under the Java
+ * Community Process (JCP) and is made available for testing and evaluation purposes
+ * only. The code is not compatible with any specification of the JCP.
+ *
  * Contributors:
  *     IBM Corporation - initial API and implementation
  *     Stephan Herrmann <stephan@cs.tu-berlin.de> - Contributions for
@@ -597,9 +601,8 @@
 				codeStream.generateConstant(localConstant, 0);
 				// no implicit conversion
 			} else {
-				// outer local?
-				if ((this.bits & ASTNode.IsCapturedOuterLocal) != 0) {
-					checkEffectiveFinality(localBinding, currentScope);
+				// checkEffectiveFinality() returns if it's outer local
+				if (checkEffectiveFinality(localBinding, currentScope)) {
 					// outer local can be reached either through a synthetic arg or a synthetic field
 					VariableBinding[] path = currentScope.getEmulationPath(localBinding);
 					codeStream.generateOuterAccess(path, this, localBinding, currentScope);
diff --git a/org.eclipse.jdt.core/compiler/org/eclipse/jdt/internal/compiler/ast/SingleNameReference.java b/org.eclipse.jdt.core/compiler/org/eclipse/jdt/internal/compiler/ast/SingleNameReference.java
index e1cc9a4..157233c 100644
--- a/org.eclipse.jdt.core/compiler/org/eclipse/jdt/internal/compiler/ast/SingleNameReference.java
+++ b/org.eclipse.jdt.core/compiler/org/eclipse/jdt/internal/compiler/ast/SingleNameReference.java
@@ -496,9 +496,8 @@
 					codeStream.recordPositionsFrom(pc, this.sourceStart);
 					return;
 				}
-				// outer local?
-				if ((this.bits & ASTNode.IsCapturedOuterLocal) != 0) {
-					checkEffectiveFinality(localBinding, currentScope);
+				// checkEffectiveFinality() returns if it's outer local
+				if (checkEffectiveFinality(localBinding, currentScope)) {
 					// outer local can be reached either through a synthetic arg or a synthetic field
 					VariableBinding[] path = currentScope.getEmulationPath(localBinding);
 					codeStream.generateOuterAccess(path, this, localBinding, currentScope);
diff --git a/org.eclipse.jdt.core/compiler/org/eclipse/jdt/internal/compiler/ast/Statement.java b/org.eclipse.jdt.core/compiler/org/eclipse/jdt/internal/compiler/ast/Statement.java
index 499df9b..d001590 100644
--- a/org.eclipse.jdt.core/compiler/org/eclipse/jdt/internal/compiler/ast/Statement.java
+++ b/org.eclipse.jdt.core/compiler/org/eclipse/jdt/internal/compiler/ast/Statement.java
@@ -125,8 +125,8 @@
 	public static final int NOT_COMPLAINED = 0;
 	public static final int COMPLAINED_FAKE_REACHABLE = 1;
 	public static final int COMPLAINED_UNREACHABLE = 2;
-	LocalVariableBinding[] patternVarsWhenTrue = null;
-	LocalVariableBinding[] patternVarsWhenFalse = null;
+	LocalVariableBinding[] patternVarsWhenTrue;
+	LocalVariableBinding[] patternVarsWhenFalse;
 
 
 /** Analysing arguments of MessageSend, ExplicitConstructorCall, AllocationExpression. */
diff --git a/org.eclipse.jdt.core/compiler/org/eclipse/jdt/internal/compiler/ast/SwitchExpression.java b/org.eclipse.jdt.core/compiler/org/eclipse/jdt/internal/compiler/ast/SwitchExpression.java
index cb5b8ff..806abac 100644
--- a/org.eclipse.jdt.core/compiler/org/eclipse/jdt/internal/compiler/ast/SwitchExpression.java
+++ b/org.eclipse.jdt.core/compiler/org/eclipse/jdt/internal/compiler/ast/SwitchExpression.java
@@ -99,7 +99,7 @@
 	protected int getFallThroughState(Statement stmt, BlockScope blockScope) {
 		if ((stmt instanceof Expression && ((Expression) stmt).isTrulyExpression())|| stmt instanceof ThrowStatement)
 			return BREAKING;
-		if (this.switchLabeledRules // do this check for every block if '->' (Switch Labeled Rules)
+		if ((this.switchBits & LabeledRules) != 0 // do this check for every block if '->' (Switch Labeled Rules)
 				&& stmt instanceof Block) {
 			Block block = (Block) stmt;
 			if (!block.canCompleteNormally()) {
@@ -146,7 +146,7 @@
 		/* JLS 12 15.28.1 Given a switch expression, if the switch block consists of switch labeled rules
 		 * then it is a compile-time error if any switch labeled block can complete normally.
 		 */
-		if (this.switchLabeledRules) {
+		if ((this.switchBits & LabeledRules) != 0) {
 			for (Statement stmt : this.statements) {
 				if (!(stmt instanceof Block))
 					continue;
@@ -184,7 +184,7 @@
 	}
 	@Override
 	protected boolean needToCheckFlowInAbsenceOfDefaultBranch() { // JLS 12 16.1.8
-		return !this.switchLabeledRules;
+		return (this.switchBits & LabeledRules) == 0;
 	}
 	@Override
 	public Expression[] getPolyExpressions() {
diff --git a/org.eclipse.jdt.core/compiler/org/eclipse/jdt/internal/compiler/ast/SwitchStatement.java b/org.eclipse.jdt.core/compiler/org/eclipse/jdt/internal/compiler/ast/SwitchStatement.java
index c5e181e..b1bf615 100644
--- a/org.eclipse.jdt.core/compiler/org/eclipse/jdt/internal/compiler/ast/SwitchStatement.java
+++ b/org.eclipse.jdt.core/compiler/org/eclipse/jdt/internal/compiler/ast/SwitchStatement.java
@@ -1,5 +1,5 @@
 /*******************************************************************************
- * Copyright (c) 2000, 2019 IBM Corporation and others.
+ * Copyright (c) 2000, 2021 IBM Corporation and others.
  *
  * This program and the accompanying materials
  * are made available under the terms of the Eclipse Public License 2.0
@@ -8,6 +8,10 @@
  *
  * SPDX-License-Identifier: EPL-2.0
  *
+ * This is an implementation of an early-draft specification developed under the Java
+ * Community Process (JCP) and is made available for testing and evaluation purposes
+ * only. The code is not compatible with any specification of the JCP.
+ *
  * Contributors:
  *     IBM Corporation - initial API and implementation
  *     Stephan Herrmann - Contributions for
@@ -19,7 +23,9 @@
  *******************************************************************************/
 package org.eclipse.jdt.internal.compiler.ast;
 
+import java.util.ArrayList;
 import java.util.Arrays;
+import java.util.List;
 import java.util.function.Function;
 
 import org.eclipse.jdt.internal.compiler.ASTVisitor;
@@ -33,6 +39,7 @@
 import org.eclipse.jdt.internal.compiler.flow.SwitchFlowContext;
 import org.eclipse.jdt.internal.compiler.impl.CompilerOptions;
 import org.eclipse.jdt.internal.compiler.impl.Constant;
+import org.eclipse.jdt.internal.compiler.impl.JavaFeature;
 import org.eclipse.jdt.internal.compiler.lookup.BlockScope;
 import org.eclipse.jdt.internal.compiler.lookup.FieldBinding;
 import org.eclipse.jdt.internal.compiler.lookup.LocalVariableBinding;
@@ -53,13 +60,17 @@
 	public BranchLabel breakLabel;
 	public CaseStatement[] cases;
 	public CaseStatement defaultCase;
+	public CaseStatement nullCase; // convenience pointer for pattern switches
 	public int blockStart;
 	public int caseCount;
 	int[] constants;
 	int[] constMapping;
 	String[] stringConstants;
-	public boolean switchLabeledRules = false; // true if case ->, false if case :
 	public int nConstants;
+	public int switchBits;
+
+	public boolean containsPatterns;
+	private BranchLabel switchPatternRestartTarget;
 
 	// fallthrough
 	public final static int CASE = 0;
@@ -67,9 +78,17 @@
 	public final static int ESCAPING = 2;
 	public final static int BREAKING  = 3;
 
+	// Other bits
+	public final static int LabeledRules = ASTNode.Bit1;
+	public final static int NullCase = ASTNode.Bit2;
+	public final static int TotalPattern = ASTNode.Bit3;
+
 	// for switch on strings
 	private static final char[] SecretStringVariableName = " switchDispatchString".toCharArray(); //$NON-NLS-1$
 
+	// for patterns in switch
+	/* package */ static final char[] SecretPatternVariableName = " switchDispatchPattern".toCharArray(); //$NON-NLS-1$
+	private static final char[] SecretPatternRestartIndexName = " switchPatternRestartIndex".toCharArray(); //$NON-NLS-1$
 
 	public SyntheticMethodBinding synthetic; // use for switch on enums types
 
@@ -80,9 +99,15 @@
 	CaseStatement[] duplicateCaseStatements = null;
 	int duplicateCaseStatementsCounter = 0;
 	private LocalVariableBinding dispatchStringCopy = null;
+	private LocalVariableBinding dispatchPatternCopy = null;
+	private LocalVariableBinding restartIndexLocal = null;
+
+	/* package */ boolean isNonTraditional = false;
+	/* package */ List<Pattern> caseLabelElements = new ArrayList<>(0);//TODO: can we remove this?
+	public List<TypeBinding> caseLabelElementTypes = new ArrayList<>(0);
 
 	protected int getFallThroughState(Statement stmt, BlockScope blockScope) {
-		if (this.switchLabeledRules) {
+		if ((this.switchBits & LabeledRules) != 0) {
 			if ((stmt instanceof Expression && ((Expression) stmt).isTrulyExpression()) || stmt instanceof ThrowStatement)
 				return BREAKING;
 			if (!stmt.canCompleteNormally())
@@ -143,13 +168,16 @@
 					if ((caseIndex < this.caseCount) && (statement == this.cases[caseIndex])) { // statement is a case
 						this.scope.enclosingCase = this.cases[caseIndex]; // record entering in a switch case block
 						caseIndex++;
-						if (fallThroughState == FALLTHROUGH
-								&& (statement.bits & ASTNode.DocumentedFallthrough) == 0) { // the case is not fall-through protected by a line comment
-							this.scope.problemReporter().possibleFallThroughCase(this.scope.enclosingCase);
+						if (fallThroughState == FALLTHROUGH) {
+							if (this.containsPatterns)
+								this.scope.problemReporter().IllegalFallThroughToPattern(this.scope.enclosingCase);
+							else if ((statement.bits & ASTNode.DocumentedFallthrough) == 0) { // the case is not fall-through protected by a line comment
+								this.scope.problemReporter().possibleFallThroughCase(this.scope.enclosingCase);
+							}
 						}
 						caseInits = caseInits.mergedWith(flowInfo.unconditionalInits());
 						complaintLevel = initialComplaintLevel; // reset complaint
-						fallThroughState = CASE;
+						fallThroughState = this.containsPatterns ? FALLTHROUGH : CASE;
 					} else if (statement == this.defaultCase) { // statement is the default case
 						this.scope.enclosingCase = this.defaultCase; // record entering in a switch case block
 						if (fallThroughState == FALLTHROUGH
@@ -158,7 +186,7 @@
 						}
 						caseInits = caseInits.mergedWith(flowInfo.unconditionalInits());
 						complaintLevel = initialComplaintLevel; // reset complaint
-						fallThroughState = CASE;
+						fallThroughState = this.containsPatterns ? FALLTHROUGH : CASE;
 					} else {
 						if (!(this instanceof SwitchExpression) &&
 							currentScope.compilerOptions().complianceLevel >= ClassFileConstants.JDK14 &&
@@ -407,11 +435,15 @@
 		for (int i = 0, j = 0, max = this.caseCount; i < max; i++) {
 			CaseStatement stmt = this.cases[i];
 			int l = stmt.constantExpressions.length;
-			stmt.targetLabels = new BranchLabel[l];
+			BranchLabel[] targetLabels = new BranchLabel[l];
+			int count = 0;
 			for (int k = 0; k < l; ++k) {
-				stmt.targetLabels[k] = (caseLabels[j] = newLabel.apply(codeStream));
+				Expression e = stmt.constantExpressions[k];
+				if (e instanceof FakeDefaultLiteral) continue;
+				targetLabels[count++] = (caseLabels[j] = newLabel.apply(codeStream));
 				caseLabels[j++].tagBits |= BranchLabel.USED;
 			}
+			System.arraycopy(targetLabels, 0, stmt.targetLabels = new BranchLabel[count], 0, count);
 		}
 		return caseLabels;
 	}
@@ -423,7 +455,7 @@
 	 */
 	@Override
 	public void generateCode(BlockScope currentScope, CodeStream codeStream) {
-		if (this.expression.resolvedType.id == TypeIds.T_JavaLangString) {
+		if (this.expression.resolvedType.id == TypeIds.T_JavaLangString && !this.isNonTraditional) {
 			generateCodeForStringSwitch(currentScope, codeStream);
 			return;
 		}
@@ -447,7 +479,10 @@
 
 			final TypeBinding resolvedType1 = this.expression.resolvedType;
 			boolean valueRequired = false;
-			if (resolvedType1.isEnum()) {
+			if (this.containsPatterns) {
+				generateCodeSwitchPatternPrologue(currentScope, codeStream);
+				valueRequired = true;
+			} else if (resolvedType1.isEnum()) {
 				// go through the translation table
 				codeStream.invoke(Opcodes.OPC_invokestatic, this.synthetic, null /* default declaringClass */);
 				this.expression.generateCode(currentScope, codeStream, true);
@@ -507,11 +542,14 @@
 			if (this.statements != null) {
 				for (int i = 0, maxCases = this.statements.length; i < maxCases; i++) {
 					Statement statement = this.statements[i];
+					CaseStatement caseStatement = null;
 					if ((caseIndex < constantCount) && (statement == this.cases[caseIndex])) { // statements[i] is a case
 						this.scope.enclosingCase = this.cases[caseIndex]; // record entering in a switch case block
 						if (this.preSwitchInitStateIndex != -1) {
 							codeStream.removeNotDefinitelyAssignedVariables(currentScope, this.preSwitchInitStateIndex);
 						}
+						caseStatement = (CaseStatement) statement;
+						patternCaseExitPreviousCaseScope(codeStream, caseIndex);
 						caseIndex++;
 					} else {
 						if (statement == this.defaultCase) { // statements[i] is a case or a default case
@@ -522,11 +560,21 @@
 						}
 					}
 					statementGenerateCode(currentScope, codeStream, statement);
+					generateCodePatternCaseEpilogue(codeStream, caseIndex, caseStatement);
 				}
 			}
 			boolean enumInSwitchExpression =  resolvedType1.isEnum() && this instanceof SwitchExpression;
 			boolean isEnumSwitchWithoutDefaultCase = this.defaultCase == null && enumInSwitchExpression;
-			if (isEnumSwitchWithoutDefaultCase) {
+			CompilerOptions compilerOptions = this.scope != null ? this.scope.compilerOptions() : null;
+			boolean isPatternSwitchSealedWithoutDefaultCase = this.defaultCase == null
+							&& compilerOptions != null
+							&& this.containsPatterns
+							&& JavaFeature.SEALED_CLASSES.isSupported(compilerOptions)
+							&& JavaFeature.PATTERN_MATCHING_IN_SWITCH.isSupported(compilerOptions)
+							&& this.expression.resolvedType instanceof ReferenceBinding
+							&& ((ReferenceBinding) this.expression.resolvedType).isSealed();
+
+			if (isEnumSwitchWithoutDefaultCase || isPatternSwitchSealedWithoutDefaultCase) {
 				// we want to force an line number entry to get an end position after the switch statement
 				if (this.preSwitchInitStateIndex != -1) {
 					codeStream.removeNotDefinitelyAssignedVariables(currentScope, this.preSwitchInitStateIndex);
@@ -550,12 +598,13 @@
 				codeStream.removeNotDefinitelyAssignedVariables(currentScope, this.mergedInitStateIndex);
 				codeStream.addDefinitelyAssignedVariables(currentScope, this.mergedInitStateIndex);
 			}
+			generateCodeSwitchPatternEpilogue(codeStream);
 			if (this.scope != currentScope) {
 				codeStream.exitUserScope(this.scope);
 			}
 			// place the trailing labels (for break and default case)
 			this.breakLabel.place();
-			if (this.defaultCase == null && !enumInSwitchExpression) {
+			if (this.defaultCase == null && !(enumInSwitchExpression || isPatternSwitchSealedWithoutDefaultCase)) {
 				// we want to force an line number entry to get an end position after the switch statement
 				codeStream.recordPositionsFrom(codeStream.position, this.sourceEnd, true);
 				defaultLabel.place();
@@ -575,6 +624,64 @@
 			if (this.scope != null) this.scope.enclosingCase = null; // no longer inside switch case block
 		}
 	}
+	private void generateCodeSwitchPatternEpilogue(CodeStream codeStream) {
+		if (this.containsPatterns && this.caseLabelElements.size() > 0) {
+			codeStream.removeVariable(this.dispatchPatternCopy);
+			codeStream.removeVariable(this.restartIndexLocal);
+		}
+	}
+	private void patternCaseExitPreviousCaseScope(CodeStream codeStream, int caseIndex) {
+		if (caseIndex > 0) {
+			CaseStatement caseStatement = this.cases[caseIndex];
+			if (caseStatement.containsPatternVariable()) {
+				caseStatement.patternCaseRemovePatternLocals(codeStream);
+			}
+		}
+	}
+	private void generateCodePatternCaseEpilogue(CodeStream codeStream, int caseIndex, CaseStatement caseStatement) {
+		if (this.switchPatternRestartTarget != null && caseStatement != null
+				&& caseStatement.patternIndex != -1 // for null
+				) {
+			Pattern pattern = (Pattern) caseStatement.constantExpressions[caseStatement.patternIndex];
+			if (pattern instanceof GuardedPattern) {
+				codeStream.loadInt(caseIndex);
+				codeStream.store(this.restartIndexLocal, false);
+				codeStream.goto_(this.switchPatternRestartTarget);
+				((GuardedPattern) pattern).thenTarget.place();
+			}
+		}
+	}
+	private void generateCodeSwitchPatternPrologue(BlockScope currentScope, CodeStream codeStream) {
+		this.expression.generateCode(currentScope, codeStream, true);
+		if ((this.switchBits & NullCase) == 0) {
+			codeStream.dup();
+			codeStream.invokeJavaUtilObjectsrequireNonNull();
+			codeStream.pop();
+
+		}
+
+		codeStream.store(this.dispatchPatternCopy, false);
+		codeStream.addVariable(this.dispatchPatternCopy);
+
+		int restartIndex = 0;
+		codeStream.loadInt(restartIndex);
+		codeStream.store(this.restartIndexLocal, false);
+		codeStream.addVariable(this.restartIndexLocal);
+
+		this.switchPatternRestartTarget = new BranchLabel(codeStream);
+		this.switchPatternRestartTarget.place();
+
+		codeStream.load(this.dispatchPatternCopy);
+		codeStream.load(this.restartIndexLocal);
+		int invokeDynamicNumber = codeStream.classFile.recordBootstrapMethod(this);
+		codeStream.invokeDynamic(invokeDynamicNumber,
+				2, // Object, restartIndex
+				1, // int
+				"typeSwitch".toCharArray(), //$NON-NLS-1$
+				"(Ljava/lang/Object;I)I".toCharArray(), //$NON-NLS-1$
+				TypeIds.T_int,
+				TypeBinding.INT);
+	}
 	protected void statementGenerateCode(BlockScope currentScope, CodeStream codeStream, Statement statement) {
 		statement.generateCode(this.scope, codeStream);
 	}
@@ -608,7 +715,14 @@
 			final Statement statement = this.statements[i];
 			if (statement instanceof CaseStatement)  {
 				Expression[] exprs = ((CaseStatement) statement).constantExpressions;
-				n += exprs != null ? exprs.length : 0;
+				int count = 0;
+				if (exprs != null) {
+					for (Expression e : exprs) {
+						if (e instanceof FakeDefaultLiteral) continue;
+						++count;
+					}
+				}
+				n += count;
 			}
 		}
 		return n;
@@ -616,6 +730,23 @@
 	protected void addSecretTryResultVariable() {
 		// do nothing
 	}
+	/* package */ boolean isAllowedType(TypeBinding type) {
+		if (type == null)
+			return false;
+		switch (type.id) {
+			case TypeIds.T_char:
+			case TypeIds.T_byte:
+			case TypeIds.T_short:
+			case TypeIds.T_int:
+			case TypeIds.T_JavaLangCharacter :
+			case TypeIds.T_JavaLangByte :
+			case TypeIds.T_JavaLangShort :
+			case TypeIds.T_JavaLangInteger :
+				return true;
+			default: break;
+		}
+		return false;
+	}
 	@Override
 	public void resolve(BlockScope upperScope) {
 		try {
@@ -644,11 +775,20 @@
 						this.expression.computeConversion(upperScope, TypeBinding.INT, expressionType);
 						break checkType;
 					} else if (compilerOptions.complianceLevel >= ClassFileConstants.JDK1_7 && expressionType.id == TypeIds.T_JavaLangString) {
+						if (this.containsPatterns) {
+							isStringSwitch = !JavaFeature.PATTERN_MATCHING_IN_SWITCH.isSupported(compilerOptions);
+							this.isNonTraditional = true;
+							break checkType;
+						}
 						isStringSwitch = true;
 						break checkType;
 					}
-					upperScope.problemReporter().incorrectSwitchType(this.expression, expressionType);
-					expressionType = null; // fault-tolerance: ignore type mismatch from constants from hereon
+					if (!JavaFeature.PATTERN_MATCHING_IN_SWITCH.isSupported(compilerOptions)) {
+						upperScope.problemReporter().incorrectSwitchType(this.expression, expressionType);
+						expressionType = null; // fault-tolerance: ignore type mismatch from constants from hereon
+					} else {
+						this.isNonTraditional = true;
+					}
 				}
 			}
 			if (isStringSwitch) {
@@ -660,9 +800,10 @@
 				this.dispatchStringCopy.setConstant(Constant.NotAConstant);
 				this.dispatchStringCopy.useFlag = LocalVariableBinding.USED;
 			}
+			addSecretPatternSwitchVariables(upperScope);
 			if (this.statements != null) {
-				this.scope = new BlockScope(upperScope);
-//				addSecretTryResultVariable();
+				if (this.scope == null)
+					this.scope = new BlockScope(upperScope);
 				int length;
 				// collection of cases is too big but we will only iterate until caseCount
 				this.cases = new CaseStatement[length = this.statements.length];
@@ -676,12 +817,23 @@
 				}
 				int counter = 0;
 				int caseCounter = 0;
+				LocalVariableBinding[] patternVariables = null;
 				for (int i = 0; i < length; i++) {
 					Constant[] constantsList;
 					int[] caseIndex = new int[this.nConstants];
 					final Statement statement = this.statements[i];
-					if (!(statement instanceof CaseStatement))  {
-						statement.resolve(this.scope);
+					// Let's first collect the pattern variables if any
+					// so that we can resolve all statements (including case statements)
+					// with the pattern variables in scope.
+					if (statement instanceof CaseStatement) {
+						if (statement.containsPatternVariable()) {
+							((CaseStatement) statement).collectPatternVariablesToScope(null, this.scope);
+							patternVariables = statement.getPatternVariablesWhenTrue();
+						} else {
+							patternVariables = null; // Probably redundant?
+						}
+					} else {
+						statement.resolveWithPatternVariablesInScope(patternVariables, this.scope);
 						continue;
 					}
 					if ((constantsList = statement.resolveCase(this.scope, expressionType, this)) != Constant.NotAConstantList) {
@@ -728,6 +880,23 @@
 				}
 			}
 			reportMixingCaseTypes();
+			if (this.caseLabelElements != null) {
+				for(int i = this.caseLabelElements.size() - 1; i > 0; i--) {
+					Pattern p1 = this.caseLabelElements.get(i);
+					for (int j = 0; j < i; j++) {
+						Pattern p2 = this.caseLabelElements.get(j);
+						if (p2.dominates(p1)) {
+							this.scope.problemReporter().patternDominatingAnother(p2);
+						}
+					}
+				}
+			}
+
+			boolean checkSealed = this.containsPatterns
+					&& JavaFeature.SEALED_CLASSES.isSupported(compilerOptions)
+					&& JavaFeature.PATTERN_MATCHING_IN_SWITCH.isSupported(compilerOptions)
+					&& this.expression.resolvedType instanceof ReferenceBinding
+					&& ((ReferenceBinding) this.expression.resolvedType).isSealed();
 			// check default case for all kinds of switch:
 			if (this.defaultCase == null) {
 				if (ignoreMissingDefaultCase(compilerOptions, isEnumSwitch)) {
@@ -735,7 +904,8 @@
 						upperScope.methodScope().hasMissingSwitchDefault = true;
 					}
 				} else {
-					upperScope.problemReporter().missingDefaultCase(this, isEnumSwitch, expressionType);
+					if (!checkSealed)
+						upperScope.problemReporter().missingDefaultCase(this, isEnumSwitch, expressionType);
 				}
 			}
 			// for enum switch, check if all constants are accounted for (perhaps depending on existence of a default case)
@@ -762,11 +932,39 @@
 						}
 					}
 				}
+			} else if (checkSealed) {
+				checkAndFlagDefaultSealed(upperScope);
 			}
 		} finally {
 			if (this.scope != null) this.scope.enclosingCase = null; // no longer inside switch case block
 		}
 	}
+	private void checkAndFlagDefaultSealed(BlockScope skope) {
+		if (this.defaultCase != null) return;
+		ReferenceBinding ref = (ReferenceBinding) this.expression.resolvedType;
+		assert ref.isSealed();
+		List<TypeBinding> permittedTypes = Arrays.asList(ref.permittedTypes());
+		for (TypeBinding pt : permittedTypes) {
+			if (!this.caseLabelElementTypes.contains(pt)) {
+				skope.problemReporter().missingDefaultCase(this, false, ref);
+				return;
+			}
+		}
+	}
+	private void addSecretPatternSwitchVariables(BlockScope upperScope) {
+		if (this.containsPatterns) {
+			this.scope = new BlockScope(upperScope);
+			this.dispatchPatternCopy  = new LocalVariableBinding(SecretPatternVariableName, upperScope.getJavaLangObject(), ClassFileConstants.AccDefault, false);
+			this.scope.addLocalVariable(this.dispatchPatternCopy);
+			this.dispatchPatternCopy.setConstant(Constant.NotAConstant);
+			this.dispatchPatternCopy.useFlag = LocalVariableBinding.USED;
+
+			this.restartIndexLocal  = new LocalVariableBinding(SecretPatternRestartIndexName, TypeBinding.INT, ClassFileConstants.AccDefault, false);
+			this.scope.addLocalVariable(this.restartIndexLocal);
+			this.restartIndexLocal.setConstant(Constant.NotAConstant);
+			this.restartIndexLocal.useFlag = LocalVariableBinding.USED;
+		}
+	}
 	protected void reportMissingEnumConstantCase(BlockScope upperScope, FieldBinding enumConstant) {
 		upperScope.problemReporter().missingEnumConstantCase(this, enumConstant);
 	}
@@ -779,10 +977,12 @@
 	}
 	private void reportMixingCaseTypes() {
 		if (this.caseCount == 0) {
-			this.switchLabeledRules = this.defaultCase != null ? this.defaultCase.isExpr : this.switchLabeledRules;
+			if (this.defaultCase != null && this.defaultCase.isExpr)
+				this.switchBits |= LabeledRules;
 			return;
 		}
-		boolean isExpr = this.switchLabeledRules = this.cases[0].isExpr;
+		boolean isExpr = this.cases[0].isExpr;
+		if (isExpr) this.switchBits |= LabeledRules;
 		for (int i = 1, l = this.caseCount; i < l; ++i) {
 			if (this.cases[i].isExpr != isExpr) {
 				this.scope.problemReporter().switchExpressionMixedCase(this.cases[i]);
@@ -875,7 +1075,7 @@
 	public boolean canCompleteNormally() {
 		if (this.statements == null || this.statements.length == 0)
 			return true;
-		if (!this.switchLabeledRules) { // switch labeled statement group
+		if ((this.switchBits & LabeledRules) == 0) { // switch labeled statement group
 			if (this.statements[this.statements.length - 1].canCompleteNormally())
 				return true; // last statement as well as last switch label after blocks if exists.
 			if (this.defaultCase == null)
diff --git a/org.eclipse.jdt.core/compiler/org/eclipse/jdt/internal/compiler/ast/TypePattern.java b/org.eclipse.jdt.core/compiler/org/eclipse/jdt/internal/compiler/ast/TypePattern.java
new file mode 100644
index 0000000..def9ad4
--- /dev/null
+++ b/org.eclipse.jdt.core/compiler/org/eclipse/jdt/internal/compiler/ast/TypePattern.java
@@ -0,0 +1,138 @@
+/*******************************************************************************
+ * Copyright (c) 2021 IBM Corporation and others.
+ *
+ * This program and the accompanying materials
+ * are made available under the terms of the Eclipse Public License 2.0
+ * which accompanies this distribution, and is available at
+ * https://www.eclipse.org/legal/epl-2.0/
+ *
+ * SPDX-License-Identifier: EPL-2.0
+ *
+ * This is an implementation of an early-draft specification developed under the Java
+ * Community Process (JCP) and is made available for testing and evaluation purposes
+ * only. The code is not compatible with any specification of the JCP.
+ *
+ * Contributors:
+ *     IBM Corporation - initial API and implementation
+ *******************************************************************************/
+package org.eclipse.jdt.internal.compiler.ast;
+
+import org.eclipse.jdt.internal.compiler.ASTVisitor;
+import org.eclipse.jdt.internal.compiler.codegen.CodeStream;
+import org.eclipse.jdt.internal.compiler.flow.FlowContext;
+import org.eclipse.jdt.internal.compiler.flow.FlowInfo;
+import org.eclipse.jdt.internal.compiler.lookup.BlockScope;
+import org.eclipse.jdt.internal.compiler.lookup.ExtraCompilerModifiers;
+import org.eclipse.jdt.internal.compiler.lookup.LocalVariableBinding;
+import org.eclipse.jdt.internal.compiler.lookup.Scope;
+import org.eclipse.jdt.internal.compiler.lookup.TypeBinding;
+
+public class TypePattern extends Pattern {
+
+	public LocalDeclaration local;
+
+	public TypePattern(LocalDeclaration local) {
+		this.local = local;
+	}
+
+	@Override
+	public void collectPatternVariablesToScope(LocalVariableBinding[] variables, BlockScope scope) {
+		if (this.resolvedType == null) {
+			this.resolveType(scope);
+		}
+		if (this.local != null && this.local.binding != null) {
+			if (this.patternVarsWhenTrue == null) {
+				this.patternVarsWhenTrue = new LocalVariableBinding[1];
+				this.patternVarsWhenTrue[0] = this.local.binding;
+			} else {
+				this.addPatternVariablesWhenTrue(new LocalVariableBinding[] {this.local.binding});
+			}
+		}
+	}
+	@Override
+	public boolean checkUnsafeCast(Scope scope, TypeBinding castType, TypeBinding expressionType, TypeBinding match, boolean isNarrowing) {
+		if (!castType.isReifiable())
+			return CastExpression.checkUnsafeCast(this, scope, castType, expressionType, match, isNarrowing);
+		else
+			return super.checkUnsafeCast(scope, castType, expressionType, match, isNarrowing);
+	}
+
+	@Override
+	public FlowInfo analyseCode(BlockScope currentScope, FlowContext flowContext, FlowInfo flowInfo) {
+		flowInfo.markAsDefinitelyAssigned(this.local.binding);
+		return flowInfo;
+	}
+
+	@Override
+	public void generateCode(BlockScope currentScope, CodeStream codeStream) {
+		if (this.local != null) {
+			LocalVariableBinding localBinding = this.local.binding;
+			codeStream.checkcast(localBinding.type);
+			this.local.generateCode(currentScope, codeStream);
+			codeStream.store(localBinding, false);
+			localBinding.recordInitializationStartPC(codeStream.position);
+		}
+	}
+
+	@Override
+	public LocalDeclaration getPatternVariableIntroduced() {
+		return this.local;
+	}
+
+	@Override
+	public void resolve(BlockScope scope) {
+		this.resolveType(scope);
+	}
+	@Override
+	public boolean isTotalForType(TypeBinding type) {
+		if (type == null || this.resolvedType == null)
+			return false;
+		return (type.erasure().isSubtypeOf(this.resolvedType.erasure(), false));
+	}
+	@Override
+	public boolean dominates(Pattern p) {
+		return isTotalForType(p.resolvedType);
+	}
+
+	/*
+	 * A type pattern, p, declaring a pattern variable x of type T, that is total for U,
+	 * is resolved to an any pattern that declares x of type T;
+	 * otherwise it is resolved to p.
+	 */
+	@Override
+	public TypeBinding resolveAtType(BlockScope scope, TypeBinding u) {
+		if (this.resolvedType == null) {
+			this.resolvedType = this.local.binding.type;
+		}
+		return this.resolvedType;
+	}
+
+	@Override
+	public TypeBinding resolveType(BlockScope scope) {
+		if (this.resolvedType != null || this.local == null)
+			return this.resolvedType;
+
+		this.local.modifiers |= ExtraCompilerModifiers.AccPatternVariable;
+		this.local.resolve(scope, true);
+		if (this.local.binding != null) {
+			this.local.binding.modifiers |= ExtraCompilerModifiers.AccPatternVariable;
+			this.local.binding.useFlag = LocalVariableBinding.USED;
+			this.resolvedType = this.local.binding.type;
+		}
+		return this.resolvedType;
+	}
+
+	@Override
+	public void traverse(ASTVisitor visitor, BlockScope scope) {
+		if (visitor.visit(this, scope)) {
+			if (this.local != null)
+				this.local.traverse(visitor, scope);
+		}
+		visitor.endVisit(this, scope);
+	}
+
+	@Override
+	public StringBuffer printExpression(int indent, StringBuffer output) {
+		return this.local != null ? this.local.printAsExpression(indent, output) : output;
+	}
+}
diff --git a/org.eclipse.jdt.core/compiler/org/eclipse/jdt/internal/compiler/ast/UnaryExpression.java b/org.eclipse.jdt.core/compiler/org/eclipse/jdt/internal/compiler/ast/UnaryExpression.java
index eceb778..b74ad0c 100644
--- a/org.eclipse.jdt.core/compiler/org/eclipse/jdt/internal/compiler/ast/UnaryExpression.java
+++ b/org.eclipse.jdt.core/compiler/org/eclipse/jdt/internal/compiler/ast/UnaryExpression.java
@@ -338,7 +338,7 @@
 		return this.expression.containsPatternVariable();
 	}
 	@Override
-	protected LocalDeclaration getPatternVariableIntroduced() {
+	public LocalDeclaration getPatternVariableIntroduced() {
 		return this.expression.getPatternVariableIntroduced();
 	}
 
diff --git a/org.eclipse.jdt.core/compiler/org/eclipse/jdt/internal/compiler/classfmt/ClassFileConstants.java b/org.eclipse.jdt.core/compiler/org/eclipse/jdt/internal/compiler/classfmt/ClassFileConstants.java
index d9218d2..c2e02a5 100644
--- a/org.eclipse.jdt.core/compiler/org/eclipse/jdt/internal/compiler/classfmt/ClassFileConstants.java
+++ b/org.eclipse.jdt.core/compiler/org/eclipse/jdt/internal/compiler/classfmt/ClassFileConstants.java
@@ -1,5 +1,5 @@
 /*******************************************************************************
- * Copyright (c) 2000, 2020 IBM Corporation and others.
+ * Copyright (c) 2000, 2021 IBM Corporation and others.
  *
  * This program and the accompanying materials
  * are made available under the terms of the Eclipse Public License 2.0
@@ -8,6 +8,10 @@
  *
  * SPDX-License-Identifier: EPL-2.0
  *
+ * This is an implementation of an early-draft specification developed under the Java
+ * Community Process (JCP) and is made available for testing and evaluation purposes
+ * only. The code is not compatible with any specification of the JCP.
+ *
  * Contributors:
  *     IBM Corporation - initial API and implementation
  *     Jesper S Moller - Contributions for
@@ -133,9 +137,10 @@
 	int MAJOR_VERSION_14 = 58;
 	int MAJOR_VERSION_15 = 59;
 	int MAJOR_VERSION_16 = 60;
+	int MAJOR_VERSION_17 = 61;
 
 	int MAJOR_VERSION_0 = 44;
-	int MAJOR_LATEST_VERSION = MAJOR_VERSION_16;
+	int MAJOR_LATEST_VERSION = MAJOR_VERSION_17;
 
 	int MINOR_VERSION_0 = 0;
 	int MINOR_VERSION_1 = 1;
@@ -162,6 +167,7 @@
 	long JDK14 = ((long)ClassFileConstants.MAJOR_VERSION_14 << 16) + ClassFileConstants.MINOR_VERSION_0;
 	long JDK15 = ((long)ClassFileConstants.MAJOR_VERSION_15 << 16) + ClassFileConstants.MINOR_VERSION_0;
 	long JDK16 = ((long)ClassFileConstants.MAJOR_VERSION_16 << 16) + ClassFileConstants.MINOR_VERSION_0;
+	long JDK17 = ((long)ClassFileConstants.MAJOR_VERSION_17 << 16) + ClassFileConstants.MINOR_VERSION_0;
 
 	public static long getLatestJDKLevel() {
 		return ((long)ClassFileConstants.MAJOR_LATEST_VERSION << 16) + ClassFileConstants.MINOR_VERSION_0;
diff --git a/org.eclipse.jdt.core/compiler/org/eclipse/jdt/internal/compiler/codegen/CodeStream.java b/org.eclipse.jdt.core/compiler/org/eclipse/jdt/internal/compiler/codegen/CodeStream.java
index 32aa86e..4fd483c 100644
--- a/org.eclipse.jdt.core/compiler/org/eclipse/jdt/internal/compiler/codegen/CodeStream.java
+++ b/org.eclipse.jdt.core/compiler/org/eclipse/jdt/internal/compiler/codegen/CodeStream.java
@@ -1,5 +1,5 @@
 /*******************************************************************************
- * Copyright (c) 2000, 2020 IBM Corporation and others.
+ * Copyright (c) 2000, 2021 IBM Corporation and others.
  *
  * This program and the accompanying materials
  * are made available under the terms of the Eclipse Public License 2.0
@@ -8,6 +8,10 @@
  *
  * SPDX-License-Identifier: EPL-2.0
  *
+ * This is an implementation of an early-draft specification developed under the Java
+ * Community Process (JCP) and is made available for testing and evaluation purposes
+ * only. The code is not compatible with any specification of the JCP.
+ *
  * Contributors:
  *     IBM Corporation - initial API and implementation
  *     Stephan Herrmann - Contribution for
@@ -5257,6 +5261,18 @@
 			getPopularBinding(ConstantPool.JavaLangObjectSignature));
 }
 
+public void invokeJavaUtilObjectsrequireNonNull() {
+	// invokestatic: java.util.Objects.requireNonNull(Ljava.lang.Object;)Ljava.lang.Object;
+	invoke(
+		Opcodes.OPC_invokestatic,
+		1, // receiverAndArgsSize
+		1, // return type size
+		ConstantPool.JavaUtilObjectsConstantPoolName,
+		ConstantPool.RequireNonNull,
+		ConstantPool.RequireNonNullSignature,
+		getPopularBinding(ConstantPool.JavaLangObjectSignature));
+}
+
 public void invokeNoClassDefFoundErrorStringConstructor() {
 	// invokespecial: java.lang.NoClassDefFoundError.<init>(Ljava.lang.String;)V
 	invoke(
diff --git a/org.eclipse.jdt.core/compiler/org/eclipse/jdt/internal/compiler/codegen/ConstantPool.java b/org.eclipse.jdt.core/compiler/org/eclipse/jdt/internal/compiler/codegen/ConstantPool.java
index e0a2e44..131fe38 100644
--- a/org.eclipse.jdt.core/compiler/org/eclipse/jdt/internal/compiler/codegen/ConstantPool.java
+++ b/org.eclipse.jdt.core/compiler/org/eclipse/jdt/internal/compiler/codegen/ConstantPool.java
@@ -8,6 +8,10 @@
  *
  * SPDX-License-Identifier: EPL-2.0
  *
+ * This is an implementation of an early-draft specification developed under the Java
+ * Community Process (JCP) and is made available for testing and evaluation purposes
+ * only. The code is not compatible with any specification of the JCP.
+ *
  * Contributors:
  *     IBM Corporation - initial API and implementation
  *     Jesper S Moller - Contributions for
@@ -192,6 +196,7 @@
 	public static final char[] JavaLangIllegalArgumentExceptionConstantPoolName = "java/lang/IllegalArgumentException".toCharArray(); //$NON-NLS-1$
 	public static final char[] JavaLangVoidConstantPoolName = "java/lang/Void".toCharArray(); //$NON-NLS-1$
 	public static final char[] JavaUtilIteratorConstantPoolName = "java/util/Iterator".toCharArray(); //$NON-NLS-1$
+	public static final char[] JavaUtilObjectsConstantPoolName = "java/util/Objects".toCharArray(); //$NON-NLS-1$
 	public static final char[] LongConstrSignature = "(J)V".toCharArray(); //$NON-NLS-1$
 	public static final char[] longLongSignature = "(J)Ljava/lang/Long;".toCharArray(); //$NON-NLS-1$
 	public static final char[] LONGVALUE_LONG_METHOD_NAME = "longValue".toCharArray(); //$NON-NLS-1$
@@ -206,6 +211,8 @@
 	public static final char[] Ordinal = "ordinal".toCharArray(); //$NON-NLS-1$
 	public static final char[] OrdinalSignature = "()I".toCharArray(); //$NON-NLS-1$
 	public static final char[] Out = "out".toCharArray(); //$NON-NLS-1$
+	public static final char[] RequireNonNull = "requireNonNull".toCharArray();//$NON-NLS-1$
+	public static final char[] RequireNonNullSignature = "(Ljava/lang/Object;)Ljava/lang/Object;".toCharArray();//$NON-NLS-1$
 	public static final char[] SET_BOOLEAN_METHOD_NAME = "setBoolean".toCharArray(); //$NON-NLS-1$
 	public static final char[] SET_BOOLEAN_METHOD_SIGNATURE = "(Ljava/lang/Object;Z)V".toCharArray(); //$NON-NLS-1$
 	public static final char[] SET_BYTE_METHOD_NAME = "setByte".toCharArray(); //$NON-NLS-1$
@@ -308,7 +315,9 @@
 	public static final char[] CloneSignature = "()Ljava/lang/Object;".toCharArray(); //$NON-NLS-1$
 	public static final char[] BOOTSTRAP = "bootstrap".toCharArray(); //$NON-NLS-1$
 	public static final char[] JAVA_LANG_RUNTIME_OBJECTMETHOD_BOOTSTRAP_SIGNATURE = "(Ljava/lang/invoke/MethodHandles$Lookup;Ljava/lang/String;Ljava/lang/invoke/TypeDescriptor;Ljava/lang/Class;Ljava/lang/String;[Ljava/lang/invoke/MethodHandle;)Ljava/lang/Object;".toCharArray(); //$NON-NLS-1$
-	public static final char[] JDK_INTERNAL_PREVIEW_FEATURE = "Ljdk/internal/PreviewFeature;".toCharArray(); //$NON-NLS-1$
+	public static final char[] PREVIEW_FEATURE = "/PreviewFeature;".toCharArray(); //$NON-NLS-1$
+	public static final char[] TYPESWITCH = "typeSwitch".toCharArray(); //$NON-NLS-1$
+	public static final char[] JAVA_LANG_RUNTIME_SWITCHBOOTSTRAPS_TYPESWITCH_SIGNATURE = "(Ljava/lang/invoke/MethodHandles$Lookup;Ljava/lang/String;Ljava/lang/invoke/MethodType;[Ljava/lang/Object;)Ljava/lang/invoke/CallSite;".toCharArray(); //$NON-NLS-1$
 
 	/**
 	 * ConstantPool constructor comment.
diff --git a/org.eclipse.jdt.core/compiler/org/eclipse/jdt/internal/compiler/impl/CompilerOptions.java b/org.eclipse.jdt.core/compiler/org/eclipse/jdt/internal/compiler/impl/CompilerOptions.java
index 0367ddc..dc1b134 100644
--- a/org.eclipse.jdt.core/compiler/org/eclipse/jdt/internal/compiler/impl/CompilerOptions.java
+++ b/org.eclipse.jdt.core/compiler/org/eclipse/jdt/internal/compiler/impl/CompilerOptions.java
@@ -1,5 +1,5 @@
 /*******************************************************************************
- * Copyright (c) 2000, 2020 IBM Corporation and others.
+ * Copyright (c) 2000, 2021 IBM Corporation and others.
  *
  * This program and the accompanying materials
  * are made available under the terms of the Eclipse Public License 2.0
@@ -8,6 +8,10 @@
  *
  * SPDX-License-Identifier: EPL-2.0
  *
+ * This is an implementation of an early-draft specification developed under the Java
+ * Community Process (JCP) and is made available for testing and evaluation purposes
+ * only. The code is not compatible with any specification of the JCP.
+ *
  * Contributors:
  *     IBM Corporation - initial API and implementation
  *     Benjamin Muskalla - Contribution for bug 239066
@@ -236,6 +240,7 @@
 	public static final String VERSION_14 = "14"; //$NON-NLS-1$
 	public static final String VERSION_15 = "15"; //$NON-NLS-1$
 	public static final String VERSION_16 = "16"; //$NON-NLS-1$
+	public static final String VERSION_17 = "17"; //$NON-NLS-1$
 	/*
 	 * Note: Whenever a new version is added, make sure getLatestVersion()
 	 * is updated with it.
@@ -606,7 +611,7 @@
 	 * Return the latest Java language version supported by the Eclipse compiler
 	 */
 	public static String getLatestVersion() {
-		return VERSION_16;
+		return VERSION_17;
 	}
 	/**
 	 * Return the most specific option key controlling this irritant. Note that in some case, some irritant is controlled by
diff --git a/org.eclipse.jdt.core/compiler/org/eclipse/jdt/internal/compiler/impl/JavaFeature.java b/org.eclipse.jdt.core/compiler/org/eclipse/jdt/internal/compiler/impl/JavaFeature.java
index 89c0ccf..a1571e2 100644
--- a/org.eclipse.jdt.core/compiler/org/eclipse/jdt/internal/compiler/impl/JavaFeature.java
+++ b/org.eclipse.jdt.core/compiler/org/eclipse/jdt/internal/compiler/impl/JavaFeature.java
@@ -1,5 +1,5 @@
 /*******************************************************************************
- * Copyright (c) 2020 IBM Corporation and others.
+ * Copyright (c) 2020, 2021 IBM Corporation and others.
  * All rights reserved. This program and the accompanying materials
  * are made available under the terms of the Eclipse Public License v1.0
  * which accompanies this distribution, and is available at
@@ -7,6 +7,10 @@
  *
  * SPDX-License-Identifier: EPL-2.0
  *
+ * This is an implementation of an early-draft specification developed under the Java
+ * Community Process (JCP) and is made available for testing and evaluation purposes
+ * only. The code is not compatible with any specification of the JCP.
+ *
  * Contributors:
  *     IBM Corporation - initial API and implementation
  *******************************************************************************/
@@ -53,9 +57,13 @@
 			new char[][] {TypeConstants.RECORD_RESTRICTED_IDENTIFIER},
 			false),
 
-	SEALED_CLASSES(ClassFileConstants.JDK16,
+	SEALED_CLASSES(ClassFileConstants.JDK17,
 			Messages.bind(Messages.sealed_types),
 			new char[][] {TypeConstants.SEALED, TypeConstants.PERMITS},
+			false),
+	PATTERN_MATCHING_IN_SWITCH(ClassFileConstants.JDK17,
+			Messages.bind(Messages.pattern_matching_switch),
+			new char[][] {},
 			true),
     ;
 
diff --git a/org.eclipse.jdt.core/compiler/org/eclipse/jdt/internal/compiler/lookup/BinaryTypeBinding.java b/org.eclipse.jdt.core/compiler/org/eclipse/jdt/internal/compiler/lookup/BinaryTypeBinding.java
index fe3b286..16f8a8d 100644
--- a/org.eclipse.jdt.core/compiler/org/eclipse/jdt/internal/compiler/lookup/BinaryTypeBinding.java
+++ b/org.eclipse.jdt.core/compiler/org/eclipse/jdt/internal/compiler/lookup/BinaryTypeBinding.java
@@ -8,6 +8,10 @@
  *
  * SPDX-License-Identifier: EPL-2.0
  *
+ * This is an implementation of an early-draft specification developed under the Java
+ * Community Process (JCP) and is made available for testing and evaluation purposes
+ * only. The code is not compatible with any specification of the JCP.
+ *
  * Contributors:
  *     IBM Corporation - initial API and implementation
  *     Stephan Herrmann - Contributions for
@@ -663,7 +667,7 @@
 			}
 			for (IBinaryAnnotation annotation : declAnnotations) {
 				char[] typeName = annotation.getTypeName();
-				if (CharOperation.equals(typeName, ConstantPool.JDK_INTERNAL_PREVIEW_FEATURE)) {
+				if (CharOperation.endsWith(typeName, ConstantPool.PREVIEW_FEATURE)) {
 					this.tagBits |= TagBits.AnnotationPreviewFeature;
 					break;
 				}
@@ -813,7 +817,7 @@
 					if (declAnnotations != null) {
 						for (IBinaryAnnotation annotation : declAnnotations) {
 							char[] typeName = annotation.getTypeName();
-							if (CharOperation.equals(typeName, ConstantPool.JDK_INTERNAL_PREVIEW_FEATURE)) {
+							if (CharOperation.endsWith(typeName, ConstantPool.PREVIEW_FEATURE)) {
 								field.tagBits |= TagBits.AnnotationPreviewFeature;
 								break;
 							}
@@ -1037,7 +1041,7 @@
 	if (declAnnotations != null) {
 		for (IBinaryAnnotation annotation : declAnnotations) {
 			char[] typeName = annotation.getTypeName();
-			if (CharOperation.equals(typeName, ConstantPool.JDK_INTERNAL_PREVIEW_FEATURE)) {
+			if (CharOperation.endsWith(typeName, ConstantPool.PREVIEW_FEATURE)) {
 				result.tagBits |= TagBits.AnnotationPreviewFeature;
 				break;
 			}
diff --git a/org.eclipse.jdt.core/compiler/org/eclipse/jdt/internal/compiler/lookup/Binding.java b/org.eclipse.jdt.core/compiler/org/eclipse/jdt/internal/compiler/lookup/Binding.java
index be075cc..5a067bc 100644
--- a/org.eclipse.jdt.core/compiler/org/eclipse/jdt/internal/compiler/lookup/Binding.java
+++ b/org.eclipse.jdt.core/compiler/org/eclipse/jdt/internal/compiler/lookup/Binding.java
@@ -1,5 +1,5 @@
 /*******************************************************************************
- * Copyright (c) 2000, 2020 IBM Corporation and others.
+ * Copyright (c) 2000, 2021 IBM Corporation and others.
  *
  * This program and the accompanying materials
  * are made available under the terms of the Eclipse Public License 2.0
@@ -8,6 +8,10 @@
  *
  * SPDX-License-Identifier: EPL-2.0
  *
+ * This is an implementation of an early-draft specification developed under the Java
+ * Community Process (JCP) and is made available for testing and evaluation purposes
+ * only. The code is not compatible with any specification of the JCP.
+ *
  * Contributors:
  *     IBM Corporation - initial API and implementation
  *     Stephan Herrmann - Contribution for
@@ -47,6 +51,7 @@
 	// Java 14 - Records - preview
 	public static final int RECORD_COMPONENT = ASTNode.Bit18;
 //	public static final int VARIABLE = FIELD | LOCAL | RECORD_COMPONENT;
+	public static final int PATTERN = ASTNode.Bit19;
 
 	// In the unlikely event you add a new type binding, remember to update TypeBindingVisitor and Scope.substitute methods.
 
diff --git a/org.eclipse.jdt.core/compiler/org/eclipse/jdt/internal/compiler/lookup/ClassScope.java b/org.eclipse.jdt.core/compiler/org/eclipse/jdt/internal/compiler/lookup/ClassScope.java
index 7c95409..cad0bbc 100644
--- a/org.eclipse.jdt.core/compiler/org/eclipse/jdt/internal/compiler/lookup/ClassScope.java
+++ b/org.eclipse.jdt.core/compiler/org/eclipse/jdt/internal/compiler/lookup/ClassScope.java
@@ -53,6 +53,8 @@
 import org.eclipse.jdt.internal.compiler.classfmt.ClassFileConstants;
 import org.eclipse.jdt.internal.compiler.env.AccessRestriction;
 import org.eclipse.jdt.internal.compiler.env.ICompilationUnit;
+import org.eclipse.jdt.internal.compiler.impl.CompilerOptions;
+import org.eclipse.jdt.internal.compiler.impl.JavaFeature;
 import org.eclipse.jdt.internal.compiler.problem.AbortCompilation;
 import org.eclipse.jdt.internal.compiler.problem.ProblemReporter;
 import org.eclipse.jdt.internal.compiler.util.HashtableOfObject;
@@ -143,8 +145,7 @@
 	}
 
 	private void checkForEnumSealedPreview(ReferenceBinding supertype, LocalTypeBinding anonymousType) {
-		if (compilerOptions().sourceLevel < ClassFileConstants.JDK15
-				|| !compilerOptions().enablePreviewFeatures
+		if (!JavaFeature.SEALED_CLASSES.isSupported(compilerOptions())
 				|| !supertype.isEnum()
 				|| !(supertype instanceof SourceTypeBinding))
 			return;
@@ -585,10 +586,10 @@
 	private void checkAndSetModifiers() {
 		SourceTypeBinding sourceType = this.referenceContext.binding;
 		int modifiers = sourceType.modifiers;
-		boolean isPreviewEnabled = compilerOptions().sourceLevel == ClassFileConstants.getLatestJDKLevel() &&
-				compilerOptions().enablePreviewFeatures;
+		CompilerOptions options = compilerOptions();
 		boolean is16Plus = compilerOptions().sourceLevel >= ClassFileConstants.JDK16;
-		boolean flagSealedNonModifiers = isPreviewEnabled &&
+		boolean isSealedSupported = JavaFeature.SEALED_CLASSES.isSupported(options);
+		boolean flagSealedNonModifiers = isSealedSupported &&
 				(modifiers & (ExtraCompilerModifiers.AccSealed | ExtraCompilerModifiers.AccNonSealed)) != 0;
 		if (sourceType.isRecord()) {
 			/* JLS 14 Records Sec 8.10 - A record declaration is implicitly final. */
@@ -725,7 +726,7 @@
 						| ClassFileConstants.AccStrictfp | ClassFileConstants.AccAnnotation
 						| ((is16Plus && this.parent instanceof ClassScope) ? ClassFileConstants.AccStatic : 0));
 				if ((realModifiers & UNEXPECTED_MODIFIERS) != 0
-						|| (isPreviewEnabled && flagSealedNonModifiers))
+						|| flagSealedNonModifiers)
 					problemReporter().localStaticsIllegalVisibilityModifierForInterfaceLocalType(sourceType);
 //				if ((modifiers & ClassFileConstants.AccStatic) != 0) {
 //					problemReporter().recordIllegalStaticModifierForLocalClassOrInterface(sourceType);
@@ -820,7 +821,7 @@
 					}
 					modifiers |= ClassFileConstants.AccFinal;
 				}
-				if (isPreviewEnabled && (modifiers & ClassFileConstants.AccFinal) == 0)
+				if (isSealedSupported && (modifiers & ClassFileConstants.AccFinal) == 0)
 					modifiers |= ExtraCompilerModifiers.AccSealed;
 			}
 		} else if (sourceType.isRecord()) {
diff --git a/org.eclipse.jdt.core/compiler/org/eclipse/jdt/internal/compiler/lookup/ModuleBinding.java b/org.eclipse.jdt.core/compiler/org/eclipse/jdt/internal/compiler/lookup/ModuleBinding.java
index 70c46c4..e3b00fb 100644
--- a/org.eclipse.jdt.core/compiler/org/eclipse/jdt/internal/compiler/lookup/ModuleBinding.java
+++ b/org.eclipse.jdt.core/compiler/org/eclipse/jdt/internal/compiler/lookup/ModuleBinding.java
@@ -1,5 +1,5 @@
 /*******************************************************************************
- * Copyright (c) 2016, 2019 IBM Corporation and others.
+ * Copyright (c) 2016, 2021 IBM Corporation and others.
  *
  * This program and the accompanying materials
  * are made available under the terms of the Eclipse Public License 2.0
@@ -8,6 +8,10 @@
  *
  * SPDX-License-Identifier: EPL-2.0
  *
+ * This is an implementation of an early-draft specification developed under the Java
+ * Community Process (JCP) and is made available for testing and evaluation purposes
+ * only. The code is not compatible with any specification of the JCP.
+ *
  * Contributors:
  *     IBM Corporation - initial API and implementation
  *
@@ -833,6 +837,9 @@
 	public boolean isUnnamed() {
 		return false;
 	}
+	public boolean isAutomatic() {
+		return this.isAuto;
+	}
 	public boolean isOpen() {
 		return (this.modifiers & ClassFileConstants.ACC_OPEN) != 0;
 	}
diff --git a/org.eclipse.jdt.core/compiler/org/eclipse/jdt/internal/compiler/lookup/ReferenceBinding.java b/org.eclipse.jdt.core/compiler/org/eclipse/jdt/internal/compiler/lookup/ReferenceBinding.java
index 6eedcbc..7aef4e8 100644
--- a/org.eclipse.jdt.core/compiler/org/eclipse/jdt/internal/compiler/lookup/ReferenceBinding.java
+++ b/org.eclipse.jdt.core/compiler/org/eclipse/jdt/internal/compiler/lookup/ReferenceBinding.java
@@ -8,6 +8,10 @@
  *
  * SPDX-License-Identifier: EPL-2.0
  *
+ * This is an implementation of an early-draft specification developed under the Java
+ * Community Process (JCP) and is made available for testing and evaluation purposes
+ * only. The code is not compatible with any specification of the JCP.
+ *
  * Contributors:
  *     IBM Corporation - initial API and implementation
  *     Stephan Herrmann - Contributions for
@@ -62,6 +66,7 @@
 import org.eclipse.jdt.internal.compiler.ast.NullAnnotationMatching;
 import org.eclipse.jdt.internal.compiler.classfmt.ClassFileConstants;
 import org.eclipse.jdt.internal.compiler.impl.CompilerOptions;
+import org.eclipse.jdt.internal.compiler.impl.JavaFeature;
 import org.eclipse.jdt.internal.compiler.impl.ReferenceContext;
 import org.eclipse.jdt.internal.compiler.util.SimpleLookupTable;
 
@@ -489,7 +494,8 @@
 				case 3: // only one type in this group, yet:
 					if (CharOperation.equals(TypeConstants.ORG_JUNIT_ASSERT, this.compoundName))
 						this.id = TypeIds.T_OrgJunitAssert;
-					else if (CharOperation.equals(TypeConstants.JDK_INTERNAL_PREVIEW_FEATURE, this.compoundName))
+					else if (CharOperation.equals(TypeConstants.JDK_INTERNAL_PREVIEW_FEATURE, this.compoundName)
+							|| CharOperation.equals(TypeConstants.JDK_INTERNAL_JAVAC_PREVIEW_FEATURE, this.compoundName))
 						this.id = TypeIds.T_JdkInternalPreviewFeature;
 					return;
 				case 4:
@@ -2285,9 +2291,7 @@
 	} else {
 		this.singleAbstractMethod = new MethodBinding[2];
 		// Sec 9.8 of sealed preview - A functional interface is an interface that is not declared sealed...
-		CompilerOptions options = scope.compilerOptions();
-		if (options.complianceLevel == ClassFileConstants.JDK16
-				&& options.enablePreviewFeatures
+		if (JavaFeature.SEALED_CLASSES.isSupported(scope.compilerOptions())
 				&& this.isSealed())
 			return this.singleAbstractMethod[index] = samProblemBinding;
 	}
diff --git a/org.eclipse.jdt.core/compiler/org/eclipse/jdt/internal/compiler/lookup/Scope.java b/org.eclipse.jdt.core/compiler/org/eclipse/jdt/internal/compiler/lookup/Scope.java
index 5f3a1c5..faed011 100644
--- a/org.eclipse.jdt.core/compiler/org/eclipse/jdt/internal/compiler/lookup/Scope.java
+++ b/org.eclipse.jdt.core/compiler/org/eclipse/jdt/internal/compiler/lookup/Scope.java
@@ -8,6 +8,10 @@
  *
  * SPDX-License-Identifier: EPL-2.0
  *
+ * This is an implementation of an early-draft specification developed under the Java
+ * Community Process (JCP) and is made available for testing and evaluation purposes
+ * only. The code is not compatible with any specification of the JCP.
+ *
  * Contributors:
  *     IBM Corporation - initial API and implementation
  *     Stephan Herrmann - Contributions for
@@ -2914,6 +2918,11 @@
 		unitScope.recordQualifiedReference(TypeConstants.JAVA_LANG_RUNTIME_OBJECTMETHODS);
 		return unitScope.environment.getResolvedJavaBaseType(TypeConstants.JAVA_LANG_RUNTIME_OBJECTMETHODS, this);
 	}
+	public final ReferenceBinding getJavaLangRuntimeSwitchBootstraps() {
+		CompilationUnitScope unitScope = compilationUnitScope();
+		unitScope.recordQualifiedReference(TypeConstants.JAVA_LANG_RUNTIME_SWITCHBOOTSTRAPS);
+		return unitScope.environment.getResolvedJavaBaseType(TypeConstants.JAVA_LANG_RUNTIME_SWITCHBOOTSTRAPS, this);
+	}
 	public final ReferenceBinding getJavaLangInvokeLambdaMetafactory() {
 		CompilationUnitScope unitScope = compilationUnitScope();
 		unitScope.recordQualifiedReference(TypeConstants.JAVA_LANG_INVOKE_LAMBDAMETAFACTORY);
diff --git a/org.eclipse.jdt.core/compiler/org/eclipse/jdt/internal/compiler/lookup/TypeConstants.java b/org.eclipse.jdt.core/compiler/org/eclipse/jdt/internal/compiler/lookup/TypeConstants.java
index 440e95c..1398680 100644
--- a/org.eclipse.jdt.core/compiler/org/eclipse/jdt/internal/compiler/lookup/TypeConstants.java
+++ b/org.eclipse.jdt.core/compiler/org/eclipse/jdt/internal/compiler/lookup/TypeConstants.java
@@ -8,6 +8,10 @@
  *
  * SPDX-License-Identifier: EPL-2.0
  *
+ * This is an implementation of an early-draft specification developed under the Java
+ * Community Process (JCP) and is made available for testing and evaluation purposes
+ * only. The code is not compatible with any specification of the JCP.
+ *
  * Contributors:
  *     IBM Corporation - initial API and implementation
  *     Stephan Herrmann - Contributions for
@@ -40,6 +44,7 @@
 public interface TypeConstants {
 
 	char[] JAVA = "java".toCharArray(); //$NON-NLS-1$
+	char[] JAVAC = "javac".toCharArray(); //$NON-NLS-1$
 	char[] JAVAX = "javax".toCharArray(); //$NON-NLS-1$
 	char[] LANG = "lang".toCharArray(); //$NON-NLS-1$
 	char[] IO = "io".toCharArray(); //$NON-NLS-1$
@@ -208,6 +213,7 @@
 	char[][] JAVA_LANG_ANNOTATION_RETENTIONPOLICY = {JAVA, LANG, ANNOTATION, "RetentionPolicy".toCharArray()}; //$NON-NLS-1$
 	char[][] JAVA_LANG_ANNOTATION_ELEMENTTYPE = {JAVA, LANG, ANNOTATION, "ElementType".toCharArray()}; //$NON-NLS-1$
 	char[][] JDK_INTERNAL_PREVIEW_FEATURE = {JDK, INTERNAL, "PreviewFeature".toCharArray()}; //$NON-NLS-1$
+	char[][] JDK_INTERNAL_JAVAC_PREVIEW_FEATURE = {JDK, INTERNAL, JAVAC, "PreviewFeature".toCharArray()}; //$NON-NLS-1$
 	char[][] JAVA_LANG_REFLECT_FIELD = new char[][] {JAVA, LANG, REFLECT, "Field".toCharArray()}; //$NON-NLS-1$
 	char[][] JAVA_LANG_REFLECT_METHOD = new char[][] {JAVA, LANG, REFLECT, "Method".toCharArray()}; //$NON-NLS-1$
 	char[][] JAVA_IO_CLOSEABLE = new char[][] { JAVA, IO, "Closeable".toCharArray()};//$NON-NLS-1$
@@ -245,6 +251,7 @@
 	char[][] JAVA_LANG_AUTOCLOSEABLE =  {JAVA, LANG, "AutoCloseable".toCharArray()}; //$NON-NLS-1$
 	char[] CLOSE = "close".toCharArray(); //$NON-NLS-1$
 	char[][] JAVA_LANG_RUNTIME_OBJECTMETHODS = {JAVA, LANG, RUNTIME, "ObjectMethods".toCharArray()}; //$NON-NLS-1$
+	char[][] JAVA_LANG_RUNTIME_SWITCHBOOTSTRAPS = {JAVA, LANG, RUNTIME, "SwitchBootstraps".toCharArray()}; //$NON-NLS-1$
 	// known helper functions for closing a Closeable (all receive a Closeable as their first argument):
 	public static class CloseMethodRecord {
 		public char[][] typeName;
diff --git a/org.eclipse.jdt.core/compiler/org/eclipse/jdt/internal/compiler/messages.properties b/org.eclipse.jdt.core/compiler/org/eclipse/jdt/internal/compiler/messages.properties
index c64f2ad..72e1c14 100644
--- a/org.eclipse.jdt.core/compiler/org/eclipse/jdt/internal/compiler/messages.properties
+++ b/org.eclipse.jdt.core/compiler/org/eclipse/jdt/internal/compiler/messages.properties
@@ -72,3 +72,4 @@
 pattern_matching_instanceof = Pattern Matching in instanceof Expressions
 records = Records
 sealed_types = Sealed Types
+pattern_matching_switch = Pattern Matching in Switch
diff --git a/org.eclipse.jdt.core/compiler/org/eclipse/jdt/internal/compiler/parser/JavadocTagConstants.java b/org.eclipse.jdt.core/compiler/org/eclipse/jdt/internal/compiler/parser/JavadocTagConstants.java
index 9b26925..7828585 100644
--- a/org.eclipse.jdt.core/compiler/org/eclipse/jdt/internal/compiler/parser/JavadocTagConstants.java
+++ b/org.eclipse.jdt.core/compiler/org/eclipse/jdt/internal/compiler/parser/JavadocTagConstants.java
@@ -202,7 +202,9 @@
 		//since 15
 		{},
 		//since 16
-		{}
+		{},
+		// since 17
+		{},
 	};
 	public static final char[][][] INLINE_TAGS = {
 		// since 1.0
@@ -238,6 +240,8 @@
 		//since 15
 		{},
 		//since 16
+		{},
+		//since 17
 		{}
 	};
 	public final static int INLINE_TAGS_LENGTH = INLINE_TAGS.length;
diff --git a/org.eclipse.jdt.core/compiler/org/eclipse/jdt/internal/compiler/parser/Parser.java b/org.eclipse.jdt.core/compiler/org/eclipse/jdt/internal/compiler/parser/Parser.java
index f3ce834..2bae73e 100644
--- a/org.eclipse.jdt.core/compiler/org/eclipse/jdt/internal/compiler/parser/Parser.java
+++ b/org.eclipse.jdt.core/compiler/org/eclipse/jdt/internal/compiler/parser/Parser.java
@@ -8,6 +8,10 @@
  *
  * SPDX-License-Identifier: EPL-2.0
  *
+ * This is an implementation of an early-draft specification developed under the Java
+ * Community Process (JCP) and is made available for testing and evaluation purposes
+ * only. The code is not compatible with any specification of the JCP.
+ *
  * Contributors:
  *     IBM Corporation - initial API and implementation
  *     Tom Tromey - patch for readTable(String) as described in http://bugs.eclipse.org/bugs/show_bug.cgi?id=32196
@@ -154,12 +158,18 @@
 		LAMBDA,
 	}
 
+	protected enum CaseLabelKind {
+		CASE_EXPRESSION,
+		CASE_NULL,
+		CASE_DEFAULT,
+		CASE_PATTERN
+	}
 	// resumeOnSyntaxError codes:
 	protected static final int HALT = 0;     // halt and throw up hands.
 	protected static final int RESTART = 1;  // stacks adjusted, alternate goal from check point.
 	protected static final int RESUME = 2;   // stacks untouched, just continue from where left off.
-	private static final short TYPE_CLASS =1;
-	private static final short TYPE_RECORD =2;
+	private static final short TYPE_CLASS = 1;
+	private static final short TYPE_RECORD = 2;
 
 	public Scanner scanner;
 	public int currentToken;
@@ -237,6 +247,8 @@
 						compliance = ClassFileConstants.JDK15;
 					}  else if("16".equals(token)) { //$NON-NLS-1$
 						compliance = ClassFileConstants.JDK16;
+					}  else if("17".equals(token)) { //$NON-NLS-1$
+						compliance = ClassFileConstants.JDK17;
 					} else if("recovery".equals(token)) { //$NON-NLS-1$
 						compliance = ClassFileConstants.JDK_DEFERRED;
 					}
@@ -975,6 +987,7 @@
 protected boolean parsingJava9Plus;
 protected boolean parsingJava14Plus;
 protected boolean parsingJava15Plus;
+protected boolean parsingJava17Plus;
 protected boolean previewEnabled;
 protected boolean parsingJava11Plus;
 protected int unstackedAct = ERROR_ACTION;
@@ -985,6 +998,7 @@
 private boolean reparsingLambdaExpression = false;
 
 private Map<TypeDeclaration, Integer[]> recordNestedMethodLevels;
+private Map<Integer, Boolean> recordPatternSwitches;
 
 public Parser () {
 	// Caveat Emptor: For inheritance purposes and then only in very special needs. Only minimal state is initialized !
@@ -1000,6 +1014,7 @@
 	this.parsingJava11Plus = this.options.sourceLevel >= ClassFileConstants.JDK11;
 	this.parsingJava14Plus = this.options.sourceLevel >= ClassFileConstants.JDK14;
 	this.parsingJava15Plus = this.options.sourceLevel >= ClassFileConstants.JDK15;
+	this.parsingJava17Plus = this.options.sourceLevel >= ClassFileConstants.JDK17;
 	this.previewEnabled = this.options.sourceLevel == ClassFileConstants.getLatestJDKLevel() && this.options.enablePreviewFeatures;
 	this.astLengthStack = new int[50];
 	this.patternLengthStack = new int[20];
@@ -1015,6 +1030,7 @@
 	this.variablesCounter = new int[30];
 
 	this.recordNestedMethodLevels = new HashMap<>();
+	this.recordPatternSwitches = new HashMap<>();
 
 	// javadoc support
 	this.javadocParser = createJavadocParser();
@@ -1217,6 +1233,9 @@
 	of a list of several modifiers. The startPosition
 	is zeroed when a copy of modifiers-buffer is push
 	onto the this.astStack. */
+	if (flag == ClassFileConstants.AccStrictfp && this.parsingJava17Plus) {
+		problemReporter().StrictfpNotRequired(this.scanner.startPosition, this.scanner.currentPosition - 1);
+	}
 
 	if ((this.modifiers & flag) != 0){ // duplicate modifier
 		this.modifiers |= ExtraCompilerModifiers.AccAlternateModifierProblem;
@@ -4550,39 +4569,17 @@
 protected void consumeInsideCastExpressionWithQualifiedGenerics() {
 	// InsideCastExpressionWithQualifiedGenerics ::= $empty
 }
-private LocalDeclaration getInstanceOfVar(TypeReference type) {
-	char[] identifierName = this.identifierStack[this.identifierPtr];
-	long namePosition = this.identifierPositionStack[this.identifierPtr];
-
-	LocalDeclaration local = createLocalDeclaration(identifierName, (int) (namePosition >>> 32), (int) namePosition);
-	local.declarationSourceEnd = local.declarationEnd;
-
-	this.identifierPtr--;
-	this.identifierLengthPtr--;
-
-	local.declarationSourceStart = type.sourceStart;
-	// Move annotations from type reference to LocalDeclaration
-	local.annotations = type.annotations != null && type.annotations.length > 0 ? type.annotations[0] : null;
-	type.annotations = null;
-	local.type = type;
-	problemReporter().validateJavaFeatureSupport(JavaFeature.PATTERN_MATCHING_IN_INSTANCEOF, type.sourceStart, local.declarationEnd);
-	local.modifiers |= ClassFileConstants.AccFinal;
-	return local;
-}
-
 protected void consumeInstanceOfExpression() {
 	int length = this.patternLengthPtr >= 0 ?
 			this.patternLengthStack[this.patternLengthPtr--] : 0;
 	Expression exp;
 	// consume annotations
 	if (length > 0) {
-		LocalDeclaration typeDecl = (LocalDeclaration) this.patternStack[this.patternPtr--];
+		Pattern pattern = (Pattern) this.patternStack[this.patternPtr--];
 		this.expressionStack[this.expressionPtr] = exp =
 				new InstanceOfExpression(
 					this.expressionStack[this.expressionPtr],
-					typeDecl);
-		typeDecl.modifiersSourceStart = this.intStack[this.intPtr--];
-		typeDecl.modifiers = this.intStack[this.intPtr--];
+					pattern);
 	} else {
 		TypeReference typeRef = (TypeReference) this.expressionStack[this.expressionPtr--];
 		this.expressionLengthPtr--;
@@ -4599,7 +4596,7 @@
 		exp.sourceEnd = this.scanner.startPosition - 1;
 	}
 }
-protected void consumeInstanceOfExpressionHelper() {
+protected void consumeTypeReferenceWithModifiersAndAnnotations() {
 	// RelationalExpression ::= RelationalExpression 'instanceof' ReferenceType
 	//optimize the push/pop
 
@@ -4634,13 +4631,34 @@
 	// do nothing
 }
 protected void consumeInstanceOfClassic() {
-	consumeInstanceOfExpressionHelper();
+	consumeTypeReferenceWithModifiersAndAnnotations();
+}
+protected void consumeInstanceofPrimaryTypePattern() {
+	consumeTypePattern();
+	consumeInstanceofPattern();
+}
+protected void consumeInstanceofPrimaryParenPattern() {
+	 // TODO - check if parenthesis to be used for source position adjustment
+	consumeInstanceofPattern();
+}
+protected void consumePrimaryPattern() {
+ // TODO - check if parenthesis to be used for source position adjustment
+}
+protected void consumeParenthesizedPattern() {
+	final Pattern pattern = (Pattern) this.astStack[this.astPtr];
+
+	// parenthesisSourceEnd
+	this.intPtr--;
+	// parenthesisSourceStart
+	this.intPtr--;
+	int numberOfParenthesis = (pattern.bits & ASTNode.ParenthesizedMASK) >> ASTNode.ParenthesizedSHIFT;
+	pattern.bits &= ~ASTNode.ParenthesizedMASK;
+	pattern.bits |= (numberOfParenthesis + 1) << ASTNode.ParenthesizedSHIFT;
 }
 protected void consumeInstanceofPattern() {
-	TypeReference typeRef = (TypeReference) this.expressionStack[this.expressionPtr--];
-	this.expressionLengthPtr--;
-	LocalDeclaration local = getInstanceOfVar(typeRef);
-	pushOnPatternStack(local);
+	this.astLengthPtr--;
+	Pattern pattern = (Pattern) this.astStack[this.astPtr--];
+	pushOnPatternStack(pattern);
 	// Only if we are not inside a block
 	if (this.realBlockPtr != -1)
 		blockReal();
@@ -4653,14 +4671,12 @@
 			this.patternLengthStack[this.patternLengthPtr--] : 0;
 	Expression exp;
 	if (length != 0) {
-		LocalDeclaration typeDecl = (LocalDeclaration) this.patternStack[this.patternPtr--];
+		Pattern pattern = (Pattern) this.patternStack[this.patternPtr--];
 		pushOnExpressionStack(getUnspecifiedReferenceOptimized());
 		this.expressionStack[this.expressionPtr] = exp =
 				new InstanceOfExpression(
 					this.expressionStack[this.expressionPtr],
-					typeDecl);
-		typeDecl.modifiersSourceStart = this.intStack[this.intPtr--];
-		typeDecl.modifiers = this.intStack[this.intPtr--];
+					pattern);
 	} else {
 	//by construction, no base type may be used in getTypeReference
 		TypeReference typeRef = (TypeReference) this.expressionStack[this.expressionPtr--];
@@ -6725,2218 +6741,2250 @@
 // This method is part of an automatic generation : do NOT edit-modify
 protected void consumeRule(int act) {
   switch ( act ) {
-    case 41 : if (DEBUG) { System.out.println("Type ::= PrimitiveType"); }  //$NON-NLS-1$
+    case 42 : if (DEBUG) { System.out.println("Type ::= PrimitiveType"); }  //$NON-NLS-1$
 		    consumePrimitiveType();
 			break;
 
-    case 55 : if (DEBUG) { System.out.println("ReferenceType ::= ClassOrInterfaceType"); }  //$NON-NLS-1$
+    case 56 : if (DEBUG) { System.out.println("ReferenceType ::= ClassOrInterfaceType"); }  //$NON-NLS-1$
 		    consumeReferenceType();
 			break;
 
-    case 59 : if (DEBUG) { System.out.println("ClassOrInterface ::= Name"); }  //$NON-NLS-1$
+    case 60 : if (DEBUG) { System.out.println("ClassOrInterface ::= Name"); }  //$NON-NLS-1$
 		    consumeClassOrInterfaceName();
 			break;
 
-    case 60 : if (DEBUG) { System.out.println("ClassOrInterface ::= GenericType DOT Name"); }  //$NON-NLS-1$
+    case 61 : if (DEBUG) { System.out.println("ClassOrInterface ::= GenericType DOT Name"); }  //$NON-NLS-1$
 		    consumeClassOrInterface();
 			break;
 
-    case 61 : if (DEBUG) { System.out.println("GenericType ::= ClassOrInterface TypeArguments"); }  //$NON-NLS-1$
+    case 62 : if (DEBUG) { System.out.println("GenericType ::= ClassOrInterface TypeArguments"); }  //$NON-NLS-1$
 		    consumeGenericType();
 			break;
 
-    case 62 : if (DEBUG) { System.out.println("GenericType ::= ClassOrInterface LESS GREATER"); }  //$NON-NLS-1$
+    case 63 : if (DEBUG) { System.out.println("GenericType ::= ClassOrInterface LESS GREATER"); }  //$NON-NLS-1$
 		    consumeGenericTypeWithDiamond();
 			break;
 
-    case 63 : if (DEBUG) { System.out.println("ArrayTypeWithTypeArgumentsName ::= GenericType DOT Name"); }  //$NON-NLS-1$
+    case 64 : if (DEBUG) { System.out.println("ArrayTypeWithTypeArgumentsName ::= GenericType DOT Name"); }  //$NON-NLS-1$
 		    consumeArrayTypeWithTypeArgumentsName();
 			break;
 
-    case 64 : if (DEBUG) { System.out.println("ArrayType ::= PrimitiveType Dims"); }  //$NON-NLS-1$
+    case 65 : if (DEBUG) { System.out.println("ArrayType ::= PrimitiveType Dims"); }  //$NON-NLS-1$
 		    consumePrimitiveArrayType();
 			break;
 
-    case 65 : if (DEBUG) { System.out.println("ArrayType ::= Name Dims"); }  //$NON-NLS-1$
+    case 66 : if (DEBUG) { System.out.println("ArrayType ::= Name Dims"); }  //$NON-NLS-1$
 		    consumeNameArrayType();
 			break;
 
-    case 66 : if (DEBUG) { System.out.println("ArrayType ::= ArrayTypeWithTypeArgumentsName Dims"); }  //$NON-NLS-1$
+    case 67 : if (DEBUG) { System.out.println("ArrayType ::= ArrayTypeWithTypeArgumentsName Dims"); }  //$NON-NLS-1$
 		    consumeGenericTypeNameArrayType();
 			break;
 
-    case 67 : if (DEBUG) { System.out.println("ArrayType ::= GenericType Dims"); }  //$NON-NLS-1$
+    case 68 : if (DEBUG) { System.out.println("ArrayType ::= GenericType Dims"); }  //$NON-NLS-1$
 		    consumeGenericTypeArrayType();
 			break;
 
-    case 69 : if (DEBUG) { System.out.println("Name ::= SimpleName"); }  //$NON-NLS-1$
+    case 70 : if (DEBUG) { System.out.println("Name ::= SimpleName"); }  //$NON-NLS-1$
 		    consumeZeroTypeAnnotations();
 			break;
 
-    case 74 : if (DEBUG) { System.out.println("UnannotatableName ::= UnannotatableName DOT SimpleName"); }  //$NON-NLS-1$
+    case 75 : if (DEBUG) { System.out.println("UnannotatableName ::= UnannotatableName DOT SimpleName"); }  //$NON-NLS-1$
 		    consumeUnannotatableQualifiedName();
 			break;
 
-    case 75 : if (DEBUG) { System.out.println("QualifiedName ::= Name DOT SimpleName"); }  //$NON-NLS-1$
+    case 76 : if (DEBUG) { System.out.println("QualifiedName ::= Name DOT SimpleName"); }  //$NON-NLS-1$
 		    consumeQualifiedName(false);
 			break;
 
-    case 76 : if (DEBUG) { System.out.println("QualifiedName ::= Name DOT TypeAnnotations SimpleName"); }  //$NON-NLS-1$
+    case 77 : if (DEBUG) { System.out.println("QualifiedName ::= Name DOT TypeAnnotations SimpleName"); }  //$NON-NLS-1$
 		    consumeQualifiedName(true);
 			break;
 
-    case 77 : if (DEBUG) { System.out.println("TypeAnnotationsopt ::="); }  //$NON-NLS-1$
+    case 78 : if (DEBUG) { System.out.println("TypeAnnotationsopt ::="); }  //$NON-NLS-1$
 		    consumeZeroTypeAnnotations();
 			break;
 
-     case 81 : if (DEBUG) { System.out.println("TypeAnnotations0 ::= TypeAnnotations0 TypeAnnotation"); }  //$NON-NLS-1$
+     case 82 : if (DEBUG) { System.out.println("TypeAnnotations0 ::= TypeAnnotations0 TypeAnnotation"); }  //$NON-NLS-1$
 		    consumeOneMoreTypeAnnotation();
 			break;
 
-     case 82 : if (DEBUG) { System.out.println("TypeAnnotation ::= NormalTypeAnnotation"); }  //$NON-NLS-1$
+     case 83 : if (DEBUG) { System.out.println("TypeAnnotation ::= NormalTypeAnnotation"); }  //$NON-NLS-1$
 		    consumeTypeAnnotation();
 			break;
 
-     case 83 : if (DEBUG) { System.out.println("TypeAnnotation ::= MarkerTypeAnnotation"); }  //$NON-NLS-1$
+     case 84 : if (DEBUG) { System.out.println("TypeAnnotation ::= MarkerTypeAnnotation"); }  //$NON-NLS-1$
 		    consumeTypeAnnotation();
 			break;
 
-     case 84 : if (DEBUG) { System.out.println("TypeAnnotation ::= SingleMemberTypeAnnotation"); }  //$NON-NLS-1$
+     case 85 : if (DEBUG) { System.out.println("TypeAnnotation ::= SingleMemberTypeAnnotation"); }  //$NON-NLS-1$
 		    consumeTypeAnnotation();
 			break;
 
-    case 85 : if (DEBUG) { System.out.println("TypeAnnotationName ::= AT308 UnannotatableName"); }  //$NON-NLS-1$
+    case 86 : if (DEBUG) { System.out.println("TypeAnnotationName ::= AT308 UnannotatableName"); }  //$NON-NLS-1$
 		    consumeAnnotationName() ;
 			break;
 
-    case 86 : if (DEBUG) { System.out.println("NormalTypeAnnotation ::= TypeAnnotationName LPAREN..."); }  //$NON-NLS-1$
+    case 87 : if (DEBUG) { System.out.println("NormalTypeAnnotation ::= TypeAnnotationName LPAREN..."); }  //$NON-NLS-1$
 		    consumeNormalAnnotation(true) ;
 			break;
 
-    case 87 : if (DEBUG) { System.out.println("MarkerTypeAnnotation ::= TypeAnnotationName"); }  //$NON-NLS-1$
+    case 88 : if (DEBUG) { System.out.println("MarkerTypeAnnotation ::= TypeAnnotationName"); }  //$NON-NLS-1$
 		    consumeMarkerAnnotation(true) ;
 			break;
 
-    case 88 : if (DEBUG) { System.out.println("SingleMemberTypeAnnotation ::= TypeAnnotationName LPAREN"); }  //$NON-NLS-1$
+    case 89 : if (DEBUG) { System.out.println("SingleMemberTypeAnnotation ::= TypeAnnotationName LPAREN"); }  //$NON-NLS-1$
 		    consumeSingleMemberAnnotation(true) ;
 			break;
 
-    case 89 : if (DEBUG) { System.out.println("RejectTypeAnnotations ::="); }  //$NON-NLS-1$
+    case 90 : if (DEBUG) { System.out.println("RejectTypeAnnotations ::="); }  //$NON-NLS-1$
 		    consumeNonTypeUseName();
 			break;
 
-    case 90 : if (DEBUG) { System.out.println("PushZeroTypeAnnotations ::="); }  //$NON-NLS-1$
+    case 91 : if (DEBUG) { System.out.println("PushZeroTypeAnnotations ::="); }  //$NON-NLS-1$
 		    consumeZeroTypeAnnotations();
 			break;
 
-    case 91 : if (DEBUG) { System.out.println("VariableDeclaratorIdOrThis ::= this"); }  //$NON-NLS-1$
+    case 92 : if (DEBUG) { System.out.println("VariableDeclaratorIdOrThis ::= this"); }  //$NON-NLS-1$
 		    consumeExplicitThisParameter(false);
 			break;
 
-    case 92 : if (DEBUG) { System.out.println("VariableDeclaratorIdOrThis ::= UnannotatableName DOT this"); }  //$NON-NLS-1$
+    case 93 : if (DEBUG) { System.out.println("VariableDeclaratorIdOrThis ::= UnannotatableName DOT this"); }  //$NON-NLS-1$
 		    consumeExplicitThisParameter(true);
 			break;
 
-    case 93 : if (DEBUG) { System.out.println("VariableDeclaratorIdOrThis ::= VariableDeclaratorId"); }  //$NON-NLS-1$
+    case 94 : if (DEBUG) { System.out.println("VariableDeclaratorIdOrThis ::= VariableDeclaratorId"); }  //$NON-NLS-1$
 		    consumeVariableDeclaratorIdParameter();
 			break;
 
-    case 94 : if (DEBUG) { System.out.println("CompilationUnit ::= EnterCompilationUnit..."); }  //$NON-NLS-1$
+    case 95 : if (DEBUG) { System.out.println("CompilationUnit ::= EnterCompilationUnit..."); }  //$NON-NLS-1$
 		    consumeCompilationUnit();
 			break;
 
-    case 95 : if (DEBUG) { System.out.println("InternalCompilationUnit ::= PackageDeclaration"); }  //$NON-NLS-1$
-		    consumeInternalCompilationUnit();
-			break;
-
-    case 96 : if (DEBUG) { System.out.println("InternalCompilationUnit ::= PackageDeclaration..."); }  //$NON-NLS-1$
+    case 96 : if (DEBUG) { System.out.println("InternalCompilationUnit ::= PackageDeclaration"); }  //$NON-NLS-1$
 		    consumeInternalCompilationUnit();
 			break;
 
     case 97 : if (DEBUG) { System.out.println("InternalCompilationUnit ::= PackageDeclaration..."); }  //$NON-NLS-1$
-		    consumeInternalCompilationUnitWithTypes();
+		    consumeInternalCompilationUnit();
 			break;
 
     case 98 : if (DEBUG) { System.out.println("InternalCompilationUnit ::= PackageDeclaration..."); }  //$NON-NLS-1$
 		    consumeInternalCompilationUnitWithTypes();
 			break;
 
-    case 99 : if (DEBUG) { System.out.println("InternalCompilationUnit ::= ImportDeclarations..."); }  //$NON-NLS-1$
+    case 99 : if (DEBUG) { System.out.println("InternalCompilationUnit ::= PackageDeclaration..."); }  //$NON-NLS-1$
+		    consumeInternalCompilationUnitWithTypes();
+			break;
+
+    case 100 : if (DEBUG) { System.out.println("InternalCompilationUnit ::= ImportDeclarations..."); }  //$NON-NLS-1$
 		    consumeInternalCompilationUnit();
 			break;
 
-    case 100 : if (DEBUG) { System.out.println("InternalCompilationUnit ::= TypeDeclarations"); }  //$NON-NLS-1$
+    case 101 : if (DEBUG) { System.out.println("InternalCompilationUnit ::= TypeDeclarations"); }  //$NON-NLS-1$
 		    consumeInternalCompilationUnitWithTypes();
 			break;
 
-    case 101 : if (DEBUG) { System.out.println("InternalCompilationUnit ::= ImportDeclarations..."); }  //$NON-NLS-1$
+    case 102 : if (DEBUG) { System.out.println("InternalCompilationUnit ::= ImportDeclarations..."); }  //$NON-NLS-1$
 		    consumeInternalCompilationUnitWithTypes();
 			break;
 
-    case 102 : if (DEBUG) { System.out.println("InternalCompilationUnit ::="); }  //$NON-NLS-1$
+    case 103 : if (DEBUG) { System.out.println("InternalCompilationUnit ::="); }  //$NON-NLS-1$
 		    consumeEmptyInternalCompilationUnit();
 			break;
 
-    case 103 : if (DEBUG) { System.out.println("InternalCompilationUnit ::= ImportDeclarations..."); }  //$NON-NLS-1$
+    case 104 : if (DEBUG) { System.out.println("InternalCompilationUnit ::= ImportDeclarations..."); }  //$NON-NLS-1$
 		    consumeInternalCompilationUnitWithModuleDeclaration();
 			break;
 
-    case 104 : if (DEBUG) { System.out.println("InternalCompilationUnit ::= ModuleDeclaration"); }  //$NON-NLS-1$
+    case 105 : if (DEBUG) { System.out.println("InternalCompilationUnit ::= ModuleDeclaration"); }  //$NON-NLS-1$
 		    consumeInternalCompilationUnitWithModuleDeclaration();
 			break;
 
-    case 105 : if (DEBUG) { System.out.println("ModuleDeclaration ::= ModuleHeader ModuleBody"); }  //$NON-NLS-1$
+    case 106 : if (DEBUG) { System.out.println("ModuleDeclaration ::= ModuleHeader ModuleBody"); }  //$NON-NLS-1$
 		    consumeModuleDeclaration();
 			break;
 
-    case 106 : if (DEBUG) { System.out.println("ModuleHeader ::= Modifiersopt ModuleModifieropt module"); }  //$NON-NLS-1$
+    case 107 : if (DEBUG) { System.out.println("ModuleHeader ::= Modifiersopt ModuleModifieropt module"); }  //$NON-NLS-1$
 		    consumeModuleHeader();
 			break;
 
-    case 108 : if (DEBUG) { System.out.println("ModuleModifieropt ::= ModuleModifier"); }  //$NON-NLS-1$
+    case 109 : if (DEBUG) { System.out.println("ModuleModifieropt ::= ModuleModifier"); }  //$NON-NLS-1$
 		    consumeModuleModifiers();
 			break;
 
-    case 111 : if (DEBUG) { System.out.println("ModuleStatementsOpt ::="); }  //$NON-NLS-1$
+    case 112 : if (DEBUG) { System.out.println("ModuleStatementsOpt ::="); }  //$NON-NLS-1$
 		    consumeEmptyModuleStatementsOpt();
 			break;
 
-    case 114 : if (DEBUG) { System.out.println("ModuleStatements ::= ModuleStatements ModuleStatement"); }  //$NON-NLS-1$
+    case 115 : if (DEBUG) { System.out.println("ModuleStatements ::= ModuleStatements ModuleStatement"); }  //$NON-NLS-1$
 		    consumeModuleStatements();
 			break;
 
-    case 120 : if (DEBUG) { System.out.println("RequiresStatement ::= SingleRequiresModuleName SEMICOLON"); }  //$NON-NLS-1$
+    case 121 : if (DEBUG) { System.out.println("RequiresStatement ::= SingleRequiresModuleName SEMICOLON"); }  //$NON-NLS-1$
 		    consumeRequiresStatement();
 			break;
 
-    case 121 : if (DEBUG) { System.out.println("SingleRequiresModuleName ::= requires..."); }  //$NON-NLS-1$
+    case 122 : if (DEBUG) { System.out.println("SingleRequiresModuleName ::= requires..."); }  //$NON-NLS-1$
 		    consumeSingleRequiresModuleName();
 			break;
 
-    case 122 : if (DEBUG) { System.out.println("RequiresModifiersopt ::= RequiresModifiers"); }  //$NON-NLS-1$
+    case 123 : if (DEBUG) { System.out.println("RequiresModifiersopt ::= RequiresModifiers"); }  //$NON-NLS-1$
 		    consumeModifiers();
 			break;
 
-    case 123 : if (DEBUG) { System.out.println("RequiresModifiersopt ::="); }  //$NON-NLS-1$
+    case 124 : if (DEBUG) { System.out.println("RequiresModifiersopt ::="); }  //$NON-NLS-1$
 		    consumeDefaultModifiers();
 			break;
 
-    case 125 : if (DEBUG) { System.out.println("RequiresModifiers ::= RequiresModifiers RequiresModifier"); }  //$NON-NLS-1$
+    case 126 : if (DEBUG) { System.out.println("RequiresModifiers ::= RequiresModifiers RequiresModifier"); }  //$NON-NLS-1$
 		    consumeModifiers2();
 			break;
 
-    case 128 : if (DEBUG) { System.out.println("ExportsStatement ::= ExportsHeader TargetModuleListopt"); }  //$NON-NLS-1$
+    case 129 : if (DEBUG) { System.out.println("ExportsStatement ::= ExportsHeader TargetModuleListopt"); }  //$NON-NLS-1$
 		    consumeExportsStatement();
 			break;
 
-    case 129 : if (DEBUG) { System.out.println("ExportsHeader ::= exports SinglePkgName"); }  //$NON-NLS-1$
+    case 130 : if (DEBUG) { System.out.println("ExportsHeader ::= exports SinglePkgName"); }  //$NON-NLS-1$
 		    consumeExportsHeader();
 			break;
 
-    case 131 : if (DEBUG) { System.out.println("TargetModuleListopt ::= to TargetModuleNameList"); }  //$NON-NLS-1$
+    case 132 : if (DEBUG) { System.out.println("TargetModuleListopt ::= to TargetModuleNameList"); }  //$NON-NLS-1$
 		    consumeTargetModuleList();
 			break;
 
-    case 132 : if (DEBUG) { System.out.println("TargetModuleName ::= UnannotatableName"); }  //$NON-NLS-1$
+    case 133 : if (DEBUG) { System.out.println("TargetModuleName ::= UnannotatableName"); }  //$NON-NLS-1$
 		    consumeSingleTargetModuleName();
 			break;
 
-    case 134 : if (DEBUG) { System.out.println("TargetModuleNameList ::= TargetModuleNameList COMMA..."); }  //$NON-NLS-1$
+    case 135 : if (DEBUG) { System.out.println("TargetModuleNameList ::= TargetModuleNameList COMMA..."); }  //$NON-NLS-1$
 		    consumeTargetModuleNameList();
 			break;
 
-    case 135 : if (DEBUG) { System.out.println("SinglePkgName ::= UnannotatableName"); }  //$NON-NLS-1$
+    case 136 : if (DEBUG) { System.out.println("SinglePkgName ::= UnannotatableName"); }  //$NON-NLS-1$
 		    consumeSinglePkgName();
 			break;
 
-    case 136 : if (DEBUG) { System.out.println("OpensStatement ::= OpensHeader TargetModuleListopt..."); }  //$NON-NLS-1$
+    case 137 : if (DEBUG) { System.out.println("OpensStatement ::= OpensHeader TargetModuleListopt..."); }  //$NON-NLS-1$
 		    consumeOpensStatement();
 			break;
 
-    case 137 : if (DEBUG) { System.out.println("OpensHeader ::= opens SinglePkgName"); }  //$NON-NLS-1$
+    case 138 : if (DEBUG) { System.out.println("OpensHeader ::= opens SinglePkgName"); }  //$NON-NLS-1$
 		    consumeOpensHeader();
 			break;
 
-    case 138 : if (DEBUG) { System.out.println("UsesStatement ::= UsesHeader SEMICOLON"); }  //$NON-NLS-1$
+    case 139 : if (DEBUG) { System.out.println("UsesStatement ::= UsesHeader SEMICOLON"); }  //$NON-NLS-1$
 		    consumeUsesStatement();
 			break;
 
-    case 139 : if (DEBUG) { System.out.println("UsesHeader ::= uses Name"); }  //$NON-NLS-1$
+    case 140 : if (DEBUG) { System.out.println("UsesHeader ::= uses Name"); }  //$NON-NLS-1$
 		    consumeUsesHeader();
 			break;
 
-    case 140 : if (DEBUG) { System.out.println("ProvidesStatement ::= ProvidesInterface WithClause..."); }  //$NON-NLS-1$
+    case 141 : if (DEBUG) { System.out.println("ProvidesStatement ::= ProvidesInterface WithClause..."); }  //$NON-NLS-1$
 		    consumeProvidesStatement();
 			break;
 
-    case 141 : if (DEBUG) { System.out.println("ProvidesInterface ::= provides Name"); }  //$NON-NLS-1$
+    case 142 : if (DEBUG) { System.out.println("ProvidesInterface ::= provides Name"); }  //$NON-NLS-1$
 		    consumeProvidesInterface();
 			break;
 
-    case 142 : if (DEBUG) { System.out.println("ServiceImplName ::= Name"); }  //$NON-NLS-1$
+    case 143 : if (DEBUG) { System.out.println("ServiceImplName ::= Name"); }  //$NON-NLS-1$
 		    consumeSingleServiceImplName();
 			break;
 
-    case 144 : if (DEBUG) { System.out.println("ServiceImplNameList ::= ServiceImplNameList COMMA..."); }  //$NON-NLS-1$
+    case 145 : if (DEBUG) { System.out.println("ServiceImplNameList ::= ServiceImplNameList COMMA..."); }  //$NON-NLS-1$
 		    consumeServiceImplNameList();
 			break;
 
-    case 145 : if (DEBUG) { System.out.println("WithClause ::= with ServiceImplNameList"); }  //$NON-NLS-1$
+    case 146 : if (DEBUG) { System.out.println("WithClause ::= with ServiceImplNameList"); }  //$NON-NLS-1$
 		    consumeWithClause();
 			break;
 
-    case 146 : if (DEBUG) { System.out.println("ReduceImports ::="); }  //$NON-NLS-1$
+    case 147 : if (DEBUG) { System.out.println("ReduceImports ::="); }  //$NON-NLS-1$
 		    consumeReduceImports();
 			break;
 
-    case 147 : if (DEBUG) { System.out.println("EnterCompilationUnit ::="); }  //$NON-NLS-1$
+    case 148 : if (DEBUG) { System.out.println("EnterCompilationUnit ::="); }  //$NON-NLS-1$
 		    consumeEnterCompilationUnit();
 			break;
 
-    case 170 : if (DEBUG) { System.out.println("CatchHeader ::= catch LPAREN CatchFormalParameter RPAREN"); }  //$NON-NLS-1$
+    case 171 : if (DEBUG) { System.out.println("CatchHeader ::= catch LPAREN CatchFormalParameter RPAREN"); }  //$NON-NLS-1$
 		    consumeCatchHeader();
 			break;
 
-    case 172 : if (DEBUG) { System.out.println("ImportDeclarations ::= ImportDeclarations..."); }  //$NON-NLS-1$
+    case 173 : if (DEBUG) { System.out.println("ImportDeclarations ::= ImportDeclarations..."); }  //$NON-NLS-1$
 		    consumeImportDeclarations();
 			break;
 
-    case 174 : if (DEBUG) { System.out.println("TypeDeclarations ::= TypeDeclarations TypeDeclaration"); }  //$NON-NLS-1$
+    case 175 : if (DEBUG) { System.out.println("TypeDeclarations ::= TypeDeclarations TypeDeclaration"); }  //$NON-NLS-1$
 		    consumeTypeDeclarations();
 			break;
 
-    case 175 : if (DEBUG) { System.out.println("PackageDeclaration ::= PackageDeclarationName SEMICOLON"); }  //$NON-NLS-1$
+    case 176 : if (DEBUG) { System.out.println("PackageDeclaration ::= PackageDeclarationName SEMICOLON"); }  //$NON-NLS-1$
 		    consumePackageDeclaration();
 			break;
 
-    case 176 : if (DEBUG) { System.out.println("PackageDeclarationName ::= Modifiers package..."); }  //$NON-NLS-1$
+    case 177 : if (DEBUG) { System.out.println("PackageDeclarationName ::= Modifiers package..."); }  //$NON-NLS-1$
 		    consumePackageDeclarationNameWithModifiers();
 			break;
 
-    case 177 : if (DEBUG) { System.out.println("PackageDeclarationName ::= PackageComment package Name"); }  //$NON-NLS-1$
+    case 178 : if (DEBUG) { System.out.println("PackageDeclarationName ::= PackageComment package Name"); }  //$NON-NLS-1$
 		    consumePackageDeclarationName();
 			break;
 
-    case 178 : if (DEBUG) { System.out.println("PackageComment ::="); }  //$NON-NLS-1$
+    case 179 : if (DEBUG) { System.out.println("PackageComment ::="); }  //$NON-NLS-1$
 		    consumePackageComment();
 			break;
 
-    case 183 : if (DEBUG) { System.out.println("SingleTypeImportDeclaration ::=..."); }  //$NON-NLS-1$
+    case 184 : if (DEBUG) { System.out.println("SingleTypeImportDeclaration ::=..."); }  //$NON-NLS-1$
 		    consumeImportDeclaration();
 			break;
 
-    case 184 : if (DEBUG) { System.out.println("SingleTypeImportDeclarationName ::= import Name..."); }  //$NON-NLS-1$
+    case 185 : if (DEBUG) { System.out.println("SingleTypeImportDeclarationName ::= import Name..."); }  //$NON-NLS-1$
 		    consumeSingleTypeImportDeclarationName();
 			break;
 
-    case 185 : if (DEBUG) { System.out.println("TypeImportOnDemandDeclaration ::=..."); }  //$NON-NLS-1$
+    case 186 : if (DEBUG) { System.out.println("TypeImportOnDemandDeclaration ::=..."); }  //$NON-NLS-1$
 		    consumeImportDeclaration();
 			break;
 
-    case 186 : if (DEBUG) { System.out.println("TypeImportOnDemandDeclarationName ::= import Name DOT..."); }  //$NON-NLS-1$
+    case 187 : if (DEBUG) { System.out.println("TypeImportOnDemandDeclarationName ::= import Name DOT..."); }  //$NON-NLS-1$
 		    consumeTypeImportOnDemandDeclarationName();
 			break;
 
-     case 189 : if (DEBUG) { System.out.println("TypeDeclaration ::= SEMICOLON"); }  //$NON-NLS-1$
+     case 190 : if (DEBUG) { System.out.println("TypeDeclaration ::= SEMICOLON"); }  //$NON-NLS-1$
 		    consumeEmptyTypeDeclaration();
 			break;
 
-    case 194 : if (DEBUG) { System.out.println("Modifiers ::= Modifiers Modifier"); }  //$NON-NLS-1$
+    case 195 : if (DEBUG) { System.out.println("Modifiers ::= Modifiers Modifier"); }  //$NON-NLS-1$
 		    consumeModifiers2();
 			break;
 
-    case 208 : if (DEBUG) { System.out.println("Modifier ::= Annotation"); }  //$NON-NLS-1$
+    case 209 : if (DEBUG) { System.out.println("Modifier ::= Annotation"); }  //$NON-NLS-1$
 		    consumeAnnotationAsModifier();
 			break;
 
-    case 209 : if (DEBUG) { System.out.println("ClassDeclaration ::= ClassHeader ClassBody"); }  //$NON-NLS-1$
+    case 210 : if (DEBUG) { System.out.println("ClassDeclaration ::= ClassHeader ClassBody"); }  //$NON-NLS-1$
 		    consumeClassDeclaration();
 			break;
 
-    case 210 : if (DEBUG) { System.out.println("ClassHeader ::= ClassHeaderName ClassHeaderExtendsopt..."); }  //$NON-NLS-1$
+    case 211 : if (DEBUG) { System.out.println("ClassHeader ::= ClassHeaderName ClassHeaderExtendsopt..."); }  //$NON-NLS-1$
 		    consumeClassHeader();
 			break;
 
-    case 211 : if (DEBUG) { System.out.println("ClassHeaderName ::= ClassHeaderName1 TypeParameters"); }  //$NON-NLS-1$
+    case 212 : if (DEBUG) { System.out.println("ClassHeaderName ::= ClassHeaderName1 TypeParameters"); }  //$NON-NLS-1$
 		    consumeTypeHeaderNameWithTypeParameters();
 			break;
 
-    case 213 : if (DEBUG) { System.out.println("ClassHeaderName1 ::= Modifiersopt class Identifier"); }  //$NON-NLS-1$
+    case 214 : if (DEBUG) { System.out.println("ClassHeaderName1 ::= Modifiersopt class Identifier"); }  //$NON-NLS-1$
 		    consumeClassHeaderName1();
 			break;
 
-    case 214 : if (DEBUG) { System.out.println("ClassHeaderExtends ::= extends ClassType"); }  //$NON-NLS-1$
+    case 215 : if (DEBUG) { System.out.println("ClassHeaderExtends ::= extends ClassType"); }  //$NON-NLS-1$
 		    consumeClassHeaderExtends();
 			break;
 
-    case 215 : if (DEBUG) { System.out.println("ClassHeaderImplements ::= implements InterfaceTypeList"); }  //$NON-NLS-1$
+    case 216 : if (DEBUG) { System.out.println("ClassHeaderImplements ::= implements InterfaceTypeList"); }  //$NON-NLS-1$
 		    consumeClassHeaderImplements();
 			break;
 
-    case 217 : if (DEBUG) { System.out.println("InterfaceTypeList ::= InterfaceTypeList COMMA..."); }  //$NON-NLS-1$
+    case 218 : if (DEBUG) { System.out.println("InterfaceTypeList ::= InterfaceTypeList COMMA..."); }  //$NON-NLS-1$
 		    consumeInterfaceTypeList();
 			break;
 
-    case 218 : if (DEBUG) { System.out.println("InterfaceType ::= ClassOrInterfaceType"); }  //$NON-NLS-1$
+    case 219 : if (DEBUG) { System.out.println("InterfaceType ::= ClassOrInterfaceType"); }  //$NON-NLS-1$
 		    consumeInterfaceType();
 			break;
 
-    case 221 : if (DEBUG) { System.out.println("ClassBodyDeclarations ::= ClassBodyDeclarations..."); }  //$NON-NLS-1$
+    case 222 : if (DEBUG) { System.out.println("ClassBodyDeclarations ::= ClassBodyDeclarations..."); }  //$NON-NLS-1$
 		    consumeClassBodyDeclarations();
 			break;
 
-    case 225 : if (DEBUG) { System.out.println("ClassBodyDeclaration ::= Diet NestedMethod..."); }  //$NON-NLS-1$
+    case 226 : if (DEBUG) { System.out.println("ClassBodyDeclaration ::= Diet NestedMethod..."); }  //$NON-NLS-1$
 		    consumeClassBodyDeclaration();
 			break;
 
-    case 226 : if (DEBUG) { System.out.println("Diet ::="); }  //$NON-NLS-1$
+    case 227 : if (DEBUG) { System.out.println("Diet ::="); }  //$NON-NLS-1$
 		    consumeDiet();
 			break;
 
-    case 227 : if (DEBUG) { System.out.println("Initializer ::= Diet NestedMethod CreateInitializer..."); }  //$NON-NLS-1$
+    case 228 : if (DEBUG) { System.out.println("Initializer ::= Diet NestedMethod CreateInitializer..."); }  //$NON-NLS-1$
 		    consumeClassBodyDeclaration();
 			break;
 
-    case 228 : if (DEBUG) { System.out.println("CreateInitializer ::="); }  //$NON-NLS-1$
+    case 229 : if (DEBUG) { System.out.println("CreateInitializer ::="); }  //$NON-NLS-1$
 		    consumeCreateInitializer();
 			break;
 
-    case 236 : if (DEBUG) { System.out.println("ClassMemberDeclaration ::= SEMICOLON"); }  //$NON-NLS-1$
+    case 237 : if (DEBUG) { System.out.println("ClassMemberDeclaration ::= SEMICOLON"); }  //$NON-NLS-1$
 		    consumeEmptyTypeDeclaration();
 			break;
 
-    case 239 : if (DEBUG) { System.out.println("FieldDeclaration ::= Modifiersopt Type..."); }  //$NON-NLS-1$
+    case 240 : if (DEBUG) { System.out.println("FieldDeclaration ::= Modifiersopt Type..."); }  //$NON-NLS-1$
 		    consumeFieldDeclaration();
 			break;
 
-    case 241 : if (DEBUG) { System.out.println("VariableDeclarators ::= VariableDeclarators COMMA..."); }  //$NON-NLS-1$
+    case 242 : if (DEBUG) { System.out.println("VariableDeclarators ::= VariableDeclarators COMMA..."); }  //$NON-NLS-1$
 		    consumeVariableDeclarators();
 			break;
 
-    case 244 : if (DEBUG) { System.out.println("EnterVariable ::="); }  //$NON-NLS-1$
+    case 245 : if (DEBUG) { System.out.println("EnterVariable ::="); }  //$NON-NLS-1$
 		    consumeEnterVariable();
 			break;
 
-    case 245 : if (DEBUG) { System.out.println("ExitVariableWithInitialization ::="); }  //$NON-NLS-1$
+    case 246 : if (DEBUG) { System.out.println("ExitVariableWithInitialization ::="); }  //$NON-NLS-1$
 		    consumeExitVariableWithInitialization();
 			break;
 
-    case 246 : if (DEBUG) { System.out.println("ExitVariableWithoutInitialization ::="); }  //$NON-NLS-1$
+    case 247 : if (DEBUG) { System.out.println("ExitVariableWithoutInitialization ::="); }  //$NON-NLS-1$
 		    consumeExitVariableWithoutInitialization();
 			break;
 
-    case 247 : if (DEBUG) { System.out.println("ForceNoDiet ::="); }  //$NON-NLS-1$
+    case 248 : if (DEBUG) { System.out.println("ForceNoDiet ::="); }  //$NON-NLS-1$
 		    consumeForceNoDiet();
 			break;
 
-    case 248 : if (DEBUG) { System.out.println("RestoreDiet ::="); }  //$NON-NLS-1$
+    case 249 : if (DEBUG) { System.out.println("RestoreDiet ::="); }  //$NON-NLS-1$
 		    consumeRestoreDiet();
 			break;
 
-    case 253 : if (DEBUG) { System.out.println("MethodDeclaration ::= MethodHeader MethodBody"); }  //$NON-NLS-1$
+    case 254 : if (DEBUG) { System.out.println("MethodDeclaration ::= MethodHeader MethodBody"); }  //$NON-NLS-1$
 		    // set to true to consume a method with a body
  consumeMethodDeclaration(true, false);
 			break;
 
-    case 254 : if (DEBUG) { System.out.println("MethodDeclaration ::= DefaultMethodHeader MethodBody"); }  //$NON-NLS-1$
+    case 255 : if (DEBUG) { System.out.println("MethodDeclaration ::= DefaultMethodHeader MethodBody"); }  //$NON-NLS-1$
 		    // set to true to consume a method with a body
  consumeMethodDeclaration(true, true);
 			break;
 
-    case 255 : if (DEBUG) { System.out.println("AbstractMethodDeclaration ::= MethodHeader SEMICOLON"); }  //$NON-NLS-1$
+    case 256 : if (DEBUG) { System.out.println("AbstractMethodDeclaration ::= MethodHeader SEMICOLON"); }  //$NON-NLS-1$
 		    // set to false to consume a method without body
  consumeMethodDeclaration(false, false);
 			break;
 
-    case 256 : if (DEBUG) { System.out.println("MethodHeader ::= MethodHeaderName FormalParameterListopt"); }  //$NON-NLS-1$
+    case 257 : if (DEBUG) { System.out.println("MethodHeader ::= MethodHeaderName FormalParameterListopt"); }  //$NON-NLS-1$
 		    consumeMethodHeader();
 			break;
 
-    case 257 : if (DEBUG) { System.out.println("DefaultMethodHeader ::= DefaultMethodHeaderName..."); }  //$NON-NLS-1$
+    case 258 : if (DEBUG) { System.out.println("DefaultMethodHeader ::= DefaultMethodHeaderName..."); }  //$NON-NLS-1$
 		    consumeMethodHeader();
 			break;
 
-    case 258 : if (DEBUG) { System.out.println("MethodHeaderName ::= Modifiersopt TypeParameters Type..."); }  //$NON-NLS-1$
+    case 259 : if (DEBUG) { System.out.println("MethodHeaderName ::= Modifiersopt TypeParameters Type..."); }  //$NON-NLS-1$
 		    consumeMethodHeaderNameWithTypeParameters(false);
 			break;
 
-    case 259 : if (DEBUG) { System.out.println("MethodHeaderName ::= Modifiersopt Type Identifier LPAREN"); }  //$NON-NLS-1$
+    case 260 : if (DEBUG) { System.out.println("MethodHeaderName ::= Modifiersopt Type Identifier LPAREN"); }  //$NON-NLS-1$
 		    consumeMethodHeaderName(false);
 			break;
 
-    case 260 : if (DEBUG) { System.out.println("DefaultMethodHeaderName ::= ModifiersWithDefault..."); }  //$NON-NLS-1$
+    case 261 : if (DEBUG) { System.out.println("DefaultMethodHeaderName ::= ModifiersWithDefault..."); }  //$NON-NLS-1$
 		    consumeMethodHeaderNameWithTypeParameters(false);
 			break;
 
-    case 261 : if (DEBUG) { System.out.println("DefaultMethodHeaderName ::= ModifiersWithDefault Type..."); }  //$NON-NLS-1$
+    case 262 : if (DEBUG) { System.out.println("DefaultMethodHeaderName ::= ModifiersWithDefault Type..."); }  //$NON-NLS-1$
 		    consumeMethodHeaderName(false);
 			break;
 
-    case 262 : if (DEBUG) { System.out.println("ModifiersWithDefault ::= Modifiersopt default..."); }  //$NON-NLS-1$
+    case 263 : if (DEBUG) { System.out.println("ModifiersWithDefault ::= Modifiersopt default..."); }  //$NON-NLS-1$
 		    consumePushCombineModifiers();
 			break;
 
-    case 263 : if (DEBUG) { System.out.println("MethodHeaderRightParen ::= RPAREN"); }  //$NON-NLS-1$
+    case 264 : if (DEBUG) { System.out.println("MethodHeaderRightParen ::= RPAREN"); }  //$NON-NLS-1$
 		    consumeMethodHeaderRightParen();
 			break;
 
-    case 264 : if (DEBUG) { System.out.println("MethodHeaderExtendedDims ::= Dimsopt"); }  //$NON-NLS-1$
+    case 265 : if (DEBUG) { System.out.println("MethodHeaderExtendedDims ::= Dimsopt"); }  //$NON-NLS-1$
 		    consumeMethodHeaderExtendedDims();
 			break;
 
-    case 265 : if (DEBUG) { System.out.println("MethodHeaderThrowsClause ::= throws ClassTypeList"); }  //$NON-NLS-1$
+    case 266 : if (DEBUG) { System.out.println("MethodHeaderThrowsClause ::= throws ClassTypeList"); }  //$NON-NLS-1$
 		    consumeMethodHeaderThrowsClause();
 			break;
 
-    case 266 : if (DEBUG) { System.out.println("ConstructorHeader ::= ConstructorHeaderName..."); }  //$NON-NLS-1$
+    case 267 : if (DEBUG) { System.out.println("ConstructorHeader ::= ConstructorHeaderName..."); }  //$NON-NLS-1$
 		    consumeConstructorHeader();
 			break;
 
-    case 267 : if (DEBUG) { System.out.println("ConstructorHeaderName ::= Modifiersopt TypeParameters..."); }  //$NON-NLS-1$
+    case 268 : if (DEBUG) { System.out.println("ConstructorHeaderName ::= Modifiersopt TypeParameters..."); }  //$NON-NLS-1$
 		    consumeConstructorHeaderNameWithTypeParameters();
 			break;
 
-    case 268 : if (DEBUG) { System.out.println("ConstructorHeaderName ::= Modifiersopt Identifier LPAREN"); }  //$NON-NLS-1$
+    case 269 : if (DEBUG) { System.out.println("ConstructorHeaderName ::= Modifiersopt Identifier LPAREN"); }  //$NON-NLS-1$
 		    consumeConstructorHeaderName();
 			break;
 
-    case 270 : if (DEBUG) { System.out.println("FormalParameterList ::= FormalParameterList COMMA..."); }  //$NON-NLS-1$
+    case 271 : if (DEBUG) { System.out.println("FormalParameterList ::= FormalParameterList COMMA..."); }  //$NON-NLS-1$
 		    consumeFormalParameterList();
 			break;
 
-    case 271 : if (DEBUG) { System.out.println("FormalParameter ::= Modifiersopt Type..."); }  //$NON-NLS-1$
+    case 272 : if (DEBUG) { System.out.println("FormalParameter ::= Modifiersopt Type..."); }  //$NON-NLS-1$
 		    consumeFormalParameter(false);
 			break;
 
-    case 272 : if (DEBUG) { System.out.println("FormalParameter ::= Modifiersopt Type..."); }  //$NON-NLS-1$
+    case 273 : if (DEBUG) { System.out.println("FormalParameter ::= Modifiersopt Type..."); }  //$NON-NLS-1$
 		    consumeFormalParameter(true);
 			break;
 
-    case 273 : if (DEBUG) { System.out.println("FormalParameter ::= Modifiersopt Type AT308DOTDOTDOT..."); }  //$NON-NLS-1$
+    case 274 : if (DEBUG) { System.out.println("FormalParameter ::= Modifiersopt Type AT308DOTDOTDOT..."); }  //$NON-NLS-1$
 		    consumeFormalParameter(true);
 			break;
 
-    case 274 : if (DEBUG) { System.out.println("CatchFormalParameter ::= Modifiersopt CatchType..."); }  //$NON-NLS-1$
+    case 275 : if (DEBUG) { System.out.println("CatchFormalParameter ::= Modifiersopt CatchType..."); }  //$NON-NLS-1$
 		    consumeCatchFormalParameter();
 			break;
 
-    case 275 : if (DEBUG) { System.out.println("CatchType ::= UnionType"); }  //$NON-NLS-1$
+    case 276 : if (DEBUG) { System.out.println("CatchType ::= UnionType"); }  //$NON-NLS-1$
 		    consumeCatchType();
 			break;
 
-    case 276 : if (DEBUG) { System.out.println("UnionType ::= Type"); }  //$NON-NLS-1$
+    case 277 : if (DEBUG) { System.out.println("UnionType ::= Type"); }  //$NON-NLS-1$
 		    consumeUnionTypeAsClassType();
 			break;
 
-    case 277 : if (DEBUG) { System.out.println("UnionType ::= UnionType OR Type"); }  //$NON-NLS-1$
+    case 278 : if (DEBUG) { System.out.println("UnionType ::= UnionType OR Type"); }  //$NON-NLS-1$
 		    consumeUnionType();
 			break;
 
-    case 279 : if (DEBUG) { System.out.println("ClassTypeList ::= ClassTypeList COMMA ClassTypeElt"); }  //$NON-NLS-1$
+    case 280 : if (DEBUG) { System.out.println("ClassTypeList ::= ClassTypeList COMMA ClassTypeElt"); }  //$NON-NLS-1$
 		    consumeClassTypeList();
 			break;
 
-    case 280 : if (DEBUG) { System.out.println("ClassTypeElt ::= ClassType"); }  //$NON-NLS-1$
+    case 281 : if (DEBUG) { System.out.println("ClassTypeElt ::= ClassType"); }  //$NON-NLS-1$
 		    consumeClassTypeElt();
 			break;
 
-    case 281 : if (DEBUG) { System.out.println("MethodBody ::= NestedMethod LBRACE BlockStatementsopt..."); }  //$NON-NLS-1$
+    case 282 : if (DEBUG) { System.out.println("MethodBody ::= NestedMethod LBRACE BlockStatementsopt..."); }  //$NON-NLS-1$
 		    consumeMethodBody();
 			break;
 
-    case 282 : if (DEBUG) { System.out.println("NestedMethod ::="); }  //$NON-NLS-1$
+    case 283 : if (DEBUG) { System.out.println("NestedMethod ::="); }  //$NON-NLS-1$
 		    consumeNestedMethod();
 			break;
 
-    case 283 : if (DEBUG) { System.out.println("StaticInitializer ::= StaticOnly Block"); }  //$NON-NLS-1$
+    case 284 : if (DEBUG) { System.out.println("StaticInitializer ::= StaticOnly Block"); }  //$NON-NLS-1$
 		    consumeStaticInitializer();
 			break;
 
-    case 284 : if (DEBUG) { System.out.println("StaticOnly ::= static"); }  //$NON-NLS-1$
+    case 285 : if (DEBUG) { System.out.println("StaticOnly ::= static"); }  //$NON-NLS-1$
 		    consumeStaticOnly();
 			break;
 
-    case 285 : if (DEBUG) { System.out.println("ConstructorDeclaration ::= ConstructorHeader MethodBody"); }  //$NON-NLS-1$
+    case 286 : if (DEBUG) { System.out.println("ConstructorDeclaration ::= ConstructorHeader MethodBody"); }  //$NON-NLS-1$
 		    consumeConstructorDeclaration() ;
 			break;
 
-    case 286 : if (DEBUG) { System.out.println("ConstructorDeclaration ::= ConstructorHeader SEMICOLON"); }  //$NON-NLS-1$
+    case 287 : if (DEBUG) { System.out.println("ConstructorDeclaration ::= ConstructorHeader SEMICOLON"); }  //$NON-NLS-1$
 		    consumeInvalidConstructorDeclaration() ;
 			break;
 
-    case 287 : if (DEBUG) { System.out.println("ExplicitConstructorInvocation ::= this LPAREN..."); }  //$NON-NLS-1$
+    case 288 : if (DEBUG) { System.out.println("ExplicitConstructorInvocation ::= this LPAREN..."); }  //$NON-NLS-1$
 		    consumeExplicitConstructorInvocation(0, THIS_CALL);
 			break;
 
-    case 288 : if (DEBUG) { System.out.println("ExplicitConstructorInvocation ::= OnlyTypeArguments this"); }  //$NON-NLS-1$
+    case 289 : if (DEBUG) { System.out.println("ExplicitConstructorInvocation ::= OnlyTypeArguments this"); }  //$NON-NLS-1$
 		    consumeExplicitConstructorInvocationWithTypeArguments(0,THIS_CALL);
 			break;
 
-    case 289 : if (DEBUG) { System.out.println("ExplicitConstructorInvocation ::= super LPAREN..."); }  //$NON-NLS-1$
+    case 290 : if (DEBUG) { System.out.println("ExplicitConstructorInvocation ::= super LPAREN..."); }  //$NON-NLS-1$
 		    consumeExplicitConstructorInvocation(0,SUPER_CALL);
 			break;
 
-    case 290 : if (DEBUG) { System.out.println("ExplicitConstructorInvocation ::= OnlyTypeArguments..."); }  //$NON-NLS-1$
+    case 291 : if (DEBUG) { System.out.println("ExplicitConstructorInvocation ::= OnlyTypeArguments..."); }  //$NON-NLS-1$
 		    consumeExplicitConstructorInvocationWithTypeArguments(0,SUPER_CALL);
 			break;
 
-    case 291 : if (DEBUG) { System.out.println("ExplicitConstructorInvocation ::= Primary DOT super..."); }  //$NON-NLS-1$
+    case 292 : if (DEBUG) { System.out.println("ExplicitConstructorInvocation ::= Primary DOT super..."); }  //$NON-NLS-1$
 		    consumeExplicitConstructorInvocation(1, SUPER_CALL);
 			break;
 
-    case 292 : if (DEBUG) { System.out.println("ExplicitConstructorInvocation ::= Primary DOT..."); }  //$NON-NLS-1$
+    case 293 : if (DEBUG) { System.out.println("ExplicitConstructorInvocation ::= Primary DOT..."); }  //$NON-NLS-1$
 		    consumeExplicitConstructorInvocationWithTypeArguments(1, SUPER_CALL);
 			break;
 
-    case 293 : if (DEBUG) { System.out.println("ExplicitConstructorInvocation ::= Name DOT super LPAREN"); }  //$NON-NLS-1$
+    case 294 : if (DEBUG) { System.out.println("ExplicitConstructorInvocation ::= Name DOT super LPAREN"); }  //$NON-NLS-1$
 		    consumeExplicitConstructorInvocation(2, SUPER_CALL);
 			break;
 
-    case 294 : if (DEBUG) { System.out.println("ExplicitConstructorInvocation ::= Name DOT..."); }  //$NON-NLS-1$
+    case 295 : if (DEBUG) { System.out.println("ExplicitConstructorInvocation ::= Name DOT..."); }  //$NON-NLS-1$
 		    consumeExplicitConstructorInvocationWithTypeArguments(2, SUPER_CALL);
 			break;
 
-    case 295 : if (DEBUG) { System.out.println("ExplicitConstructorInvocation ::= Primary DOT this..."); }  //$NON-NLS-1$
+    case 296 : if (DEBUG) { System.out.println("ExplicitConstructorInvocation ::= Primary DOT this..."); }  //$NON-NLS-1$
 		    consumeExplicitConstructorInvocation(1, THIS_CALL);
 			break;
 
-    case 296 : if (DEBUG) { System.out.println("ExplicitConstructorInvocation ::= Primary DOT..."); }  //$NON-NLS-1$
+    case 297 : if (DEBUG) { System.out.println("ExplicitConstructorInvocation ::= Primary DOT..."); }  //$NON-NLS-1$
 		    consumeExplicitConstructorInvocationWithTypeArguments(1, THIS_CALL);
 			break;
 
-    case 297 : if (DEBUG) { System.out.println("ExplicitConstructorInvocation ::= Name DOT this LPAREN"); }  //$NON-NLS-1$
+    case 298 : if (DEBUG) { System.out.println("ExplicitConstructorInvocation ::= Name DOT this LPAREN"); }  //$NON-NLS-1$
 		    consumeExplicitConstructorInvocation(2, THIS_CALL);
 			break;
 
-    case 298 : if (DEBUG) { System.out.println("ExplicitConstructorInvocation ::= Name DOT..."); }  //$NON-NLS-1$
+    case 299 : if (DEBUG) { System.out.println("ExplicitConstructorInvocation ::= Name DOT..."); }  //$NON-NLS-1$
 		    consumeExplicitConstructorInvocationWithTypeArguments(2, THIS_CALL);
 			break;
 
-    case 299 : if (DEBUG) { System.out.println("InterfaceDeclaration ::= InterfaceHeader InterfaceBody"); }  //$NON-NLS-1$
+    case 300 : if (DEBUG) { System.out.println("InterfaceDeclaration ::= InterfaceHeader InterfaceBody"); }  //$NON-NLS-1$
 		    consumeInterfaceDeclaration();
 			break;
 
-    case 300 : if (DEBUG) { System.out.println("InterfaceHeader ::= InterfaceHeaderName..."); }  //$NON-NLS-1$
+    case 301 : if (DEBUG) { System.out.println("InterfaceHeader ::= InterfaceHeaderName..."); }  //$NON-NLS-1$
 		    consumeInterfaceHeader();
 			break;
 
-    case 301 : if (DEBUG) { System.out.println("InterfaceHeaderName ::= InterfaceHeaderName1..."); }  //$NON-NLS-1$
+    case 302 : if (DEBUG) { System.out.println("InterfaceHeaderName ::= InterfaceHeaderName1..."); }  //$NON-NLS-1$
 		    consumeTypeHeaderNameWithTypeParameters();
 			break;
 
-    case 303 : if (DEBUG) { System.out.println("InterfaceHeaderName1 ::= Modifiersopt interface..."); }  //$NON-NLS-1$
+    case 304 : if (DEBUG) { System.out.println("InterfaceHeaderName1 ::= Modifiersopt interface..."); }  //$NON-NLS-1$
 		    consumeInterfaceHeaderName1();
 			break;
 
-    case 304 : if (DEBUG) { System.out.println("InterfaceHeaderExtends ::= extends InterfaceTypeList"); }  //$NON-NLS-1$
+    case 305 : if (DEBUG) { System.out.println("InterfaceHeaderExtends ::= extends InterfaceTypeList"); }  //$NON-NLS-1$
 		    consumeInterfaceHeaderExtends();
 			break;
 
-    case 307 : if (DEBUG) { System.out.println("InterfaceMemberDeclarations ::=..."); }  //$NON-NLS-1$
+    case 308 : if (DEBUG) { System.out.println("InterfaceMemberDeclarations ::=..."); }  //$NON-NLS-1$
 		    consumeInterfaceMemberDeclarations();
 			break;
 
-    case 308 : if (DEBUG) { System.out.println("InterfaceMemberDeclaration ::= SEMICOLON"); }  //$NON-NLS-1$
+    case 309 : if (DEBUG) { System.out.println("InterfaceMemberDeclaration ::= SEMICOLON"); }  //$NON-NLS-1$
 		    consumeEmptyTypeDeclaration();
 			break;
 
-    case 310 : if (DEBUG) { System.out.println("InterfaceMemberDeclaration ::= DefaultMethodHeader..."); }  //$NON-NLS-1$
+    case 311 : if (DEBUG) { System.out.println("InterfaceMemberDeclaration ::= DefaultMethodHeader..."); }  //$NON-NLS-1$
 		    consumeInterfaceMethodDeclaration(false);
 			break;
 
-    case 311 : if (DEBUG) { System.out.println("InterfaceMemberDeclaration ::= MethodHeader MethodBody"); }  //$NON-NLS-1$
+    case 312 : if (DEBUG) { System.out.println("InterfaceMemberDeclaration ::= MethodHeader MethodBody"); }  //$NON-NLS-1$
 		    consumeInterfaceMethodDeclaration(false);
 			break;
 
-    case 312 : if (DEBUG) { System.out.println("InterfaceMemberDeclaration ::= DefaultMethodHeader..."); }  //$NON-NLS-1$
+    case 313 : if (DEBUG) { System.out.println("InterfaceMemberDeclaration ::= DefaultMethodHeader..."); }  //$NON-NLS-1$
 		    consumeInterfaceMethodDeclaration(true);
 			break;
 
-    case 313 : if (DEBUG) { System.out.println("InvalidConstructorDeclaration ::= ConstructorHeader..."); }  //$NON-NLS-1$
+    case 314 : if (DEBUG) { System.out.println("InvalidConstructorDeclaration ::= ConstructorHeader..."); }  //$NON-NLS-1$
 		    consumeInvalidConstructorDeclaration(true);
 			break;
 
-    case 314 : if (DEBUG) { System.out.println("InvalidConstructorDeclaration ::= ConstructorHeader..."); }  //$NON-NLS-1$
+    case 315 : if (DEBUG) { System.out.println("InvalidConstructorDeclaration ::= ConstructorHeader..."); }  //$NON-NLS-1$
 		    consumeInvalidConstructorDeclaration(false);
 			break;
 
-    case 325 : if (DEBUG) { System.out.println("RecordDeclaration ::= RecordHeaderPart RecordBody"); }  //$NON-NLS-1$
+    case 326 : if (DEBUG) { System.out.println("RecordDeclaration ::= RecordHeaderPart RecordBody"); }  //$NON-NLS-1$
 		    consumeRecordDeclaration();
 			break;
 
-    case 326 : if (DEBUG) { System.out.println("RecordHeaderPart ::= RecordHeaderName RecordHeader..."); }  //$NON-NLS-1$
+    case 327 : if (DEBUG) { System.out.println("RecordHeaderPart ::= RecordHeaderName RecordHeader..."); }  //$NON-NLS-1$
 		    consumeRecordHeaderPart();
 			break;
 
-    case 327 : if (DEBUG) { System.out.println("RecordHeaderName ::= RecordHeaderName1 TypeParameters"); }  //$NON-NLS-1$
+    case 328 : if (DEBUG) { System.out.println("RecordHeaderName ::= RecordHeaderName1 TypeParameters"); }  //$NON-NLS-1$
 		    consumeRecordHeaderNameWithTypeParameters();
 			break;
 
-    case 329 : if (DEBUG) { System.out.println("RecordHeaderName1 ::= Modifiersopt..."); }  //$NON-NLS-1$
+    case 330 : if (DEBUG) { System.out.println("RecordHeaderName1 ::= Modifiersopt..."); }  //$NON-NLS-1$
 		    consumeRecordHeaderName1();
 			break;
 
-    case 330 : if (DEBUG) { System.out.println("RecordComponentHeaderRightParen ::= RPAREN"); }  //$NON-NLS-1$
+    case 331 : if (DEBUG) { System.out.println("RecordComponentHeaderRightParen ::= RPAREN"); }  //$NON-NLS-1$
 		    consumeRecordComponentHeaderRightParen();
 			break;
 
-    case 331 : if (DEBUG) { System.out.println("RecordHeader ::= LPAREN RecordComponentsopt..."); }  //$NON-NLS-1$
+    case 332 : if (DEBUG) { System.out.println("RecordHeader ::= LPAREN RecordComponentsopt..."); }  //$NON-NLS-1$
 		    consumeRecordHeader();
 			break;
 
-    case 332 : if (DEBUG) { System.out.println("RecordComponentsopt ::="); }  //$NON-NLS-1$
+    case 333 : if (DEBUG) { System.out.println("RecordComponentsopt ::="); }  //$NON-NLS-1$
 		    consumeRecordComponentsopt();
 			break;
 
-    case 335 : if (DEBUG) { System.out.println("RecordComponents ::= RecordComponents COMMA..."); }  //$NON-NLS-1$
+    case 336 : if (DEBUG) { System.out.println("RecordComponents ::= RecordComponents COMMA..."); }  //$NON-NLS-1$
 		    consumeRecordComponents();
 			break;
 
-    case 337 : if (DEBUG) { System.out.println("RecordComponent ::= Modifiersopt Type..."); }  //$NON-NLS-1$
+    case 338 : if (DEBUG) { System.out.println("RecordComponent ::= Modifiersopt Type..."); }  //$NON-NLS-1$
 		    consumeRecordComponent(false);
 			break;
 
-    case 338 : if (DEBUG) { System.out.println("VariableArityRecordComponent ::= Modifiersopt Type..."); }  //$NON-NLS-1$
-		    consumeRecordComponent(true);
-			break;
-
     case 339 : if (DEBUG) { System.out.println("VariableArityRecordComponent ::= Modifiersopt Type..."); }  //$NON-NLS-1$
 		    consumeRecordComponent(true);
 			break;
 
-    case 340 : if (DEBUG) { System.out.println("RecordBody ::= LBRACE RecordBodyDeclarationopt RBRACE"); }  //$NON-NLS-1$
+    case 340 : if (DEBUG) { System.out.println("VariableArityRecordComponent ::= Modifiersopt Type..."); }  //$NON-NLS-1$
+		    consumeRecordComponent(true);
+			break;
+
+    case 341 : if (DEBUG) { System.out.println("RecordBody ::= LBRACE RecordBodyDeclarationopt RBRACE"); }  //$NON-NLS-1$
 		    consumeRecordBody();
 			break;
 
-    case 341 : if (DEBUG) { System.out.println("RecordBodyDeclarationopt ::="); }  //$NON-NLS-1$
+    case 342 : if (DEBUG) { System.out.println("RecordBodyDeclarationopt ::="); }  //$NON-NLS-1$
 		    consumeEmptyRecordBodyDeclaration();
 			break;
 
-    case 344 : if (DEBUG) { System.out.println("RecordBodyDeclarations ::= RecordBodyDeclarations..."); }  //$NON-NLS-1$
+    case 345 : if (DEBUG) { System.out.println("RecordBodyDeclarations ::= RecordBodyDeclarations..."); }  //$NON-NLS-1$
 		    consumeRecordBodyDeclarations();
 			break;
 
-    case 345 : if (DEBUG) { System.out.println("RecordBodyDeclaration ::= ClassBodyDeclaration"); }  //$NON-NLS-1$
+    case 346 : if (DEBUG) { System.out.println("RecordBodyDeclaration ::= ClassBodyDeclaration"); }  //$NON-NLS-1$
 		    consumeRecordBodyDeclaration();
 			break;
 
-    case 346 : if (DEBUG) { System.out.println("RecordBodyDeclaration ::= CompactConstructorDeclaration"); }  //$NON-NLS-1$
+    case 347 : if (DEBUG) { System.out.println("RecordBodyDeclaration ::= CompactConstructorDeclaration"); }  //$NON-NLS-1$
 		    consumeRecordBodyDeclaration();
 			break;
 
-    case 347 : if (DEBUG) { System.out.println("CompactConstructorDeclaration ::=..."); }  //$NON-NLS-1$
+    case 348 : if (DEBUG) { System.out.println("CompactConstructorDeclaration ::=..."); }  //$NON-NLS-1$
 		    consumeCompactConstructorDeclaration();
 			break;
 
-    case 348 : if (DEBUG) { System.out.println("CompactConstructorHeader ::=..."); }  //$NON-NLS-1$
+    case 349 : if (DEBUG) { System.out.println("CompactConstructorHeader ::=..."); }  //$NON-NLS-1$
 		    consumeCompactConstructorHeader();
 			break;
 
-    case 349 : if (DEBUG) { System.out.println("CompactConstructorHeaderName ::= Modifiersopt Identifier"); }  //$NON-NLS-1$
+    case 350 : if (DEBUG) { System.out.println("CompactConstructorHeaderName ::= Modifiersopt Identifier"); }  //$NON-NLS-1$
 		    consumeCompactConstructorHeaderName();
 			break;
 
-    case 350 : if (DEBUG) { System.out.println("CompactConstructorHeaderName ::= Modifiersopt..."); }  //$NON-NLS-1$
+    case 351 : if (DEBUG) { System.out.println("CompactConstructorHeaderName ::= Modifiersopt..."); }  //$NON-NLS-1$
 		    consumeCompactConstructorHeaderNameWithTypeParameters();
 			break;
 
-    case 352 : if (DEBUG) { System.out.println("InstanceofExpression ::= InstanceofExpression..."); }  //$NON-NLS-1$
+    case 353 : if (DEBUG) { System.out.println("InstanceofExpression ::= InstanceofExpression..."); }  //$NON-NLS-1$
 		    consumeInstanceOfExpression();
 			break;
 
-    case 354 : if (DEBUG) { System.out.println("InstanceofRHS -> InstanceofPattern"); }  //$NON-NLS-1$
+    case 356 : if (DEBUG) { System.out.println("InstanceofRHS -> InstanceofPrimaryParenPattern"); }  //$NON-NLS-1$
 		    consumeInstanceOfRHS();
 			break;
 
-    case 355 : if (DEBUG) { System.out.println("InstanceofClassic ::= instanceof Modifiersopt Type"); }  //$NON-NLS-1$
+    case 357 : if (DEBUG) { System.out.println("InstanceofClassic ::= instanceof Modifiersopt Type"); }  //$NON-NLS-1$
 		    consumeInstanceOfClassic();
 			break;
 
-    case 356 : if (DEBUG) { System.out.println("InstanceofPattern ::= InstanceofClassic Identifier"); }  //$NON-NLS-1$
-		    consumeInstanceofPattern();
+    case 358 : if (DEBUG) { System.out.println("InstanceofPrimaryTypePattern ::= instanceof Modifiersopt"); }  //$NON-NLS-1$
+		    consumeInstanceofPrimaryTypePattern();
 			break;
 
-    case 358 : if (DEBUG) { System.out.println("PushLeftBrace ::="); }  //$NON-NLS-1$
+    case 359 : if (DEBUG) { System.out.println("InstanceofPrimaryParenPattern ::= instanceof..."); }  //$NON-NLS-1$
+		    consumeInstanceofPrimaryParenPattern();
+			break;
+
+    case 363 : if (DEBUG) { System.out.println("PrimaryPattern -> ParenthesizedPattern"); }  //$NON-NLS-1$
+		    consumePrimaryPattern();
+			break;
+
+    case 364 : if (DEBUG) { System.out.println("ParenthesizedPattern ::= PushLPAREN Pattern PushRPAREN"); }  //$NON-NLS-1$
+		    consumeParenthesizedPattern();
+			break;
+
+    case 365 : if (DEBUG) { System.out.println("TypePattern ::= Modifiersopt Type Identifier"); }  //$NON-NLS-1$
+		    consumeTypePattern();
+			break;
+
+    case 366 : if (DEBUG) { System.out.println("GuardedPattern ::= PrimaryPattern AND_AND..."); }  //$NON-NLS-1$
+		    consumeGuardedPattern();
+			break;
+
+    case 368 : if (DEBUG) { System.out.println("PushLeftBrace ::="); }  //$NON-NLS-1$
 		    consumePushLeftBrace();
 			break;
 
-    case 359 : if (DEBUG) { System.out.println("ArrayInitializer ::= LBRACE PushLeftBrace ,opt RBRACE"); }  //$NON-NLS-1$
+    case 369 : if (DEBUG) { System.out.println("ArrayInitializer ::= LBRACE PushLeftBrace ,opt RBRACE"); }  //$NON-NLS-1$
 		    consumeEmptyArrayInitializer();
 			break;
 
-    case 360 : if (DEBUG) { System.out.println("ArrayInitializer ::= LBRACE PushLeftBrace..."); }  //$NON-NLS-1$
+    case 370 : if (DEBUG) { System.out.println("ArrayInitializer ::= LBRACE PushLeftBrace..."); }  //$NON-NLS-1$
 		    consumeArrayInitializer();
 			break;
 
-    case 361 : if (DEBUG) { System.out.println("ArrayInitializer ::= LBRACE PushLeftBrace..."); }  //$NON-NLS-1$
+    case 371 : if (DEBUG) { System.out.println("ArrayInitializer ::= LBRACE PushLeftBrace..."); }  //$NON-NLS-1$
 		    consumeArrayInitializer();
 			break;
 
-    case 363 : if (DEBUG) { System.out.println("VariableInitializers ::= VariableInitializers COMMA..."); }  //$NON-NLS-1$
+    case 373 : if (DEBUG) { System.out.println("VariableInitializers ::= VariableInitializers COMMA..."); }  //$NON-NLS-1$
 		    consumeVariableInitializers();
 			break;
 
-    case 364 : if (DEBUG) { System.out.println("Block ::= OpenBlock LBRACE BlockStatementsopt RBRACE"); }  //$NON-NLS-1$
+    case 374 : if (DEBUG) { System.out.println("Block ::= OpenBlock LBRACE BlockStatementsopt RBRACE"); }  //$NON-NLS-1$
 		    consumeBlock();
 			break;
 
-    case 365 : if (DEBUG) { System.out.println("OpenBlock ::="); }  //$NON-NLS-1$
+    case 375 : if (DEBUG) { System.out.println("OpenBlock ::="); }  //$NON-NLS-1$
 		    consumeOpenBlock() ;
 			break;
 
-    case 366 : if (DEBUG) { System.out.println("BlockStatements ::= BlockStatement"); }  //$NON-NLS-1$
+    case 376 : if (DEBUG) { System.out.println("BlockStatements ::= BlockStatement"); }  //$NON-NLS-1$
 		    consumeBlockStatement() ;
 			break;
 
-    case 367 : if (DEBUG) { System.out.println("BlockStatements ::= BlockStatements BlockStatement"); }  //$NON-NLS-1$
+    case 377 : if (DEBUG) { System.out.println("BlockStatements ::= BlockStatements BlockStatement"); }  //$NON-NLS-1$
 		    consumeBlockStatements() ;
 			break;
 
-    case 375 : if (DEBUG) { System.out.println("BlockStatement ::= InterfaceDeclaration"); }  //$NON-NLS-1$
+    case 385 : if (DEBUG) { System.out.println("BlockStatement ::= InterfaceDeclaration"); }  //$NON-NLS-1$
 		    consumeInvalidInterfaceDeclaration();
 			break;
 
-    case 376 : if (DEBUG) { System.out.println("BlockStatement ::= AnnotationTypeDeclaration"); }  //$NON-NLS-1$
+    case 386 : if (DEBUG) { System.out.println("BlockStatement ::= AnnotationTypeDeclaration"); }  //$NON-NLS-1$
 		    consumeInvalidAnnotationTypeDeclaration();
 			break;
 
-    case 377 : if (DEBUG) { System.out.println("BlockStatement ::= EnumDeclaration"); }  //$NON-NLS-1$
+    case 387 : if (DEBUG) { System.out.println("BlockStatement ::= EnumDeclaration"); }  //$NON-NLS-1$
 		    consumeInvalidEnumDeclaration();
 			break;
 
-    case 378 : if (DEBUG) { System.out.println("LocalVariableDeclarationStatement ::=..."); }  //$NON-NLS-1$
+    case 388 : if (DEBUG) { System.out.println("LocalVariableDeclarationStatement ::=..."); }  //$NON-NLS-1$
 		    consumeLocalVariableDeclarationStatement();
 			break;
 
-    case 379 : if (DEBUG) { System.out.println("LocalVariableDeclaration ::= Type PushModifiers..."); }  //$NON-NLS-1$
+    case 389 : if (DEBUG) { System.out.println("LocalVariableDeclaration ::= Type PushModifiers..."); }  //$NON-NLS-1$
 		    consumeLocalVariableDeclaration();
 			break;
 
-    case 380 : if (DEBUG) { System.out.println("LocalVariableDeclaration ::= Modifiers Type..."); }  //$NON-NLS-1$
+    case 390 : if (DEBUG) { System.out.println("LocalVariableDeclaration ::= Modifiers Type..."); }  //$NON-NLS-1$
 		    consumeLocalVariableDeclaration();
 			break;
 
-    case 381 : if (DEBUG) { System.out.println("PushModifiers ::="); }  //$NON-NLS-1$
+    case 391 : if (DEBUG) { System.out.println("PushModifiers ::="); }  //$NON-NLS-1$
 		    consumePushModifiers();
 			break;
 
-    case 382 : if (DEBUG) { System.out.println("PushModifiersForHeader ::="); }  //$NON-NLS-1$
+    case 392 : if (DEBUG) { System.out.println("PushModifiersForHeader ::="); }  //$NON-NLS-1$
 		    consumePushModifiersForHeader();
 			break;
 
-    case 383 : if (DEBUG) { System.out.println("PushRealModifiers ::="); }  //$NON-NLS-1$
+    case 393 : if (DEBUG) { System.out.println("PushRealModifiers ::="); }  //$NON-NLS-1$
 		    consumePushRealModifiers();
 			break;
 
-    case 411 : if (DEBUG) { System.out.println("EmptyStatement ::= SEMICOLON"); }  //$NON-NLS-1$
+    case 421 : if (DEBUG) { System.out.println("EmptyStatement ::= SEMICOLON"); }  //$NON-NLS-1$
 		    consumeEmptyStatement();
 			break;
 
-    case 412 : if (DEBUG) { System.out.println("LabeledStatement ::= Label COLON Statement"); }  //$NON-NLS-1$
+    case 422 : if (DEBUG) { System.out.println("LabeledStatement ::= Label COLON Statement"); }  //$NON-NLS-1$
 		    consumeStatementLabel() ;
 			break;
 
-    case 413 : if (DEBUG) { System.out.println("LabeledStatementNoShortIf ::= Label COLON..."); }  //$NON-NLS-1$
+    case 423 : if (DEBUG) { System.out.println("LabeledStatementNoShortIf ::= Label COLON..."); }  //$NON-NLS-1$
 		    consumeStatementLabel() ;
 			break;
 
-    case 414 : if (DEBUG) { System.out.println("Label ::= Identifier"); }  //$NON-NLS-1$
+    case 424 : if (DEBUG) { System.out.println("Label ::= Identifier"); }  //$NON-NLS-1$
 		    consumeLabel() ;
 			break;
 
-     case 415 : if (DEBUG) { System.out.println("ExpressionStatement ::= StatementExpression SEMICOLON"); }  //$NON-NLS-1$
+     case 425 : if (DEBUG) { System.out.println("ExpressionStatement ::= StatementExpression SEMICOLON"); }  //$NON-NLS-1$
 		    consumeExpressionStatement();
 			break;
 
-    case 424 : if (DEBUG) { System.out.println("IfThenStatement ::= if LPAREN Expression RPAREN..."); }  //$NON-NLS-1$
+    case 434 : if (DEBUG) { System.out.println("IfThenStatement ::= if LPAREN Expression RPAREN..."); }  //$NON-NLS-1$
 		    consumeStatementIfNoElse();
 			break;
 
-    case 425 : if (DEBUG) { System.out.println("IfThenElseStatement ::= if LPAREN Expression RPAREN..."); }  //$NON-NLS-1$
+    case 435 : if (DEBUG) { System.out.println("IfThenElseStatement ::= if LPAREN Expression RPAREN..."); }  //$NON-NLS-1$
 		    consumeStatementIfWithElse();
 			break;
 
-    case 426 : if (DEBUG) { System.out.println("IfThenElseStatementNoShortIf ::= if LPAREN Expression..."); }  //$NON-NLS-1$
+    case 436 : if (DEBUG) { System.out.println("IfThenElseStatementNoShortIf ::= if LPAREN Expression..."); }  //$NON-NLS-1$
 		    consumeStatementIfWithElse();
 			break;
 
-    case 427 : if (DEBUG) { System.out.println("SwitchStatement ::= switch LPAREN Expression RPAREN..."); }  //$NON-NLS-1$
+    case 437 : if (DEBUG) { System.out.println("SwitchStatement ::= switch LPAREN Expression RPAREN..."); }  //$NON-NLS-1$
 		    consumeStatementSwitch() ;
 			break;
 
-    case 428 : if (DEBUG) { System.out.println("SwitchBlock ::= LBRACE RBRACE"); }  //$NON-NLS-1$
+    case 438 : if (DEBUG) { System.out.println("SwitchBlock ::= LBRACE RBRACE"); }  //$NON-NLS-1$
 		    consumeEmptySwitchBlock() ;
 			break;
 
-    case 431 : if (DEBUG) { System.out.println("SwitchBlock ::= LBRACE SwitchBlockStatements..."); }  //$NON-NLS-1$
+    case 441 : if (DEBUG) { System.out.println("SwitchBlock ::= LBRACE SwitchBlockStatements..."); }  //$NON-NLS-1$
 		    consumeSwitchBlock() ;
 			break;
 
-    case 433 : if (DEBUG) { System.out.println("SwitchBlockStatements ::= SwitchBlockStatements..."); }  //$NON-NLS-1$
+    case 443 : if (DEBUG) { System.out.println("SwitchBlockStatements ::= SwitchBlockStatements..."); }  //$NON-NLS-1$
 		    consumeSwitchBlockStatements() ;
 			break;
 
-    case 435 : if (DEBUG) { System.out.println("SwitchBlockStatement ::= SwitchLabels BlockStatements"); }  //$NON-NLS-1$
+    case 445 : if (DEBUG) { System.out.println("SwitchBlockStatement ::= SwitchLabels BlockStatements"); }  //$NON-NLS-1$
 		    consumeSwitchBlockStatement() ;
 			break;
 
-    case 437 : if (DEBUG) { System.out.println("SwitchLabels ::= SwitchLabels SwitchLabel"); }  //$NON-NLS-1$
+    case 447 : if (DEBUG) { System.out.println("SwitchLabels ::= SwitchLabels SwitchLabel"); }  //$NON-NLS-1$
 		    consumeSwitchLabels() ;
 			break;
 
-     case 438 : if (DEBUG) { System.out.println("SwitchLabel ::= SwitchLabelCaseLhs COLON"); }  //$NON-NLS-1$
+     case 448 : if (DEBUG) { System.out.println("SwitchLabel ::= SwitchLabelCaseLhs COLON"); }  //$NON-NLS-1$
 		    consumeCaseLabel();
 			break;
 
-     case 439 : if (DEBUG) { System.out.println("SwitchLabel ::= default COLON"); }  //$NON-NLS-1$
+     case 449 : if (DEBUG) { System.out.println("SwitchLabel ::= default COLON"); }  //$NON-NLS-1$
 		    consumeDefaultLabel();
 			break;
 
-    case 442 : if (DEBUG) { System.out.println("SwitchExpression ::= switch LPAREN Expression RPAREN..."); }  //$NON-NLS-1$
+    case 452 : if (DEBUG) { System.out.println("SwitchExpression ::= switch LPAREN Expression RPAREN..."); }  //$NON-NLS-1$
 		    consumeSwitchExpression() ;
 			break;
 
-     case 445 : if (DEBUG) { System.out.println("SwitchLabeledRule ::= SwitchLabeledThrowStatement"); }  //$NON-NLS-1$
+     case 455 : if (DEBUG) { System.out.println("SwitchLabeledRule ::= SwitchLabeledThrowStatement"); }  //$NON-NLS-1$
 		    consumeSwitchLabeledRule();
 			break;
 
-     case 446 : if (DEBUG) { System.out.println("SwitchLabeledExpression ::= SwitchLabelExpr Expression"); }  //$NON-NLS-1$
+     case 456 : if (DEBUG) { System.out.println("SwitchLabeledExpression ::= SwitchLabelExpr Expression"); }  //$NON-NLS-1$
 		    consumeSwitchLabeledExpression();
 			break;
 
-     case 447 : if (DEBUG) { System.out.println("SwitchLabeledBlock ::= SwitchLabelExpr Block"); }  //$NON-NLS-1$
+     case 457 : if (DEBUG) { System.out.println("SwitchLabeledBlock ::= SwitchLabelExpr Block"); }  //$NON-NLS-1$
 		    consumeSwitchLabeledBlock();
 			break;
 
-     case 448 : if (DEBUG) { System.out.println("SwitchLabeledThrowStatement ::= SwitchLabelExpr..."); }  //$NON-NLS-1$
+     case 458 : if (DEBUG) { System.out.println("SwitchLabeledThrowStatement ::= SwitchLabelExpr..."); }  //$NON-NLS-1$
 		    consumeSwitchLabeledThrowStatement();
 			break;
 
-     case 449 : if (DEBUG) { System.out.println("SwitchLabelExpr ::= default ARROW"); }  //$NON-NLS-1$
+     case 459 : if (DEBUG) { System.out.println("SwitchLabelExpr ::= default ARROW"); }  //$NON-NLS-1$
 		    consumeDefaultLabelExpr();
 			break;
 
-     case 450 : if (DEBUG) { System.out.println("SwitchLabelExpr ::= SwitchLabelCaseLhs BeginCaseExpr..."); }  //$NON-NLS-1$
+     case 460 : if (DEBUG) { System.out.println("SwitchLabelExpr ::= SwitchLabelCaseLhs BeginCaseExpr..."); }  //$NON-NLS-1$
 		    consumeCaseLabelExpr();
 			break;
 
-     case 451 : if (DEBUG) { System.out.println("SwitchLabelCaseLhs ::= case ConstantExpressions"); }  //$NON-NLS-1$
+     case 461 : if (DEBUG) { System.out.println("SwitchLabelCaseLhs ::= case CaseLabelElements"); }  //$NON-NLS-1$
 		    consumeSwitchLabelCaseLhs();
 			break;
 
-    case 452 : if (DEBUG) { System.out.println("YieldStatement ::= RestrictedIdentifierYield Expression"); }  //$NON-NLS-1$
+    case 463 : if (DEBUG) { System.out.println("CaseLabelElements ::= CaseLabelElements COMMA..."); }  //$NON-NLS-1$
+		    consumeCaseLabelElements();
+			break;
+
+    case 464 : if (DEBUG) { System.out.println("CaseLabelElement ::= ConstantExpression"); }  //$NON-NLS-1$
+		    consumeCaseLabelElement(CaseLabelKind.CASE_EXPRESSION);
+			break;
+
+    case 465 : if (DEBUG) { System.out.println("CaseLabelElement ::= default"); }  //$NON-NLS-1$
+		    consumeCaseLabelElement(CaseLabelKind.CASE_DEFAULT);
+			break;
+
+    case 466 : if (DEBUG) { System.out.println("CaseLabelElement ::= BeginCaseElement Pattern"); }  //$NON-NLS-1$
+		    consumeCaseLabelElement(CaseLabelKind.CASE_PATTERN);
+			break;
+
+    case 467 : if (DEBUG) { System.out.println("YieldStatement ::= RestrictedIdentifierYield Expression"); }  //$NON-NLS-1$
 		    consumeStatementYield() ;
 			break;
 
-    case 453 : if (DEBUG) { System.out.println("WhileStatement ::= while LPAREN Expression RPAREN..."); }  //$NON-NLS-1$
+    case 468 : if (DEBUG) { System.out.println("WhileStatement ::= while LPAREN Expression RPAREN..."); }  //$NON-NLS-1$
 		    consumeStatementWhile() ;
 			break;
 
-    case 454 : if (DEBUG) { System.out.println("WhileStatementNoShortIf ::= while LPAREN Expression..."); }  //$NON-NLS-1$
+    case 469 : if (DEBUG) { System.out.println("WhileStatementNoShortIf ::= while LPAREN Expression..."); }  //$NON-NLS-1$
 		    consumeStatementWhile() ;
 			break;
 
-    case 455 : if (DEBUG) { System.out.println("DoStatement ::= do Statement while LPAREN Expression..."); }  //$NON-NLS-1$
+    case 470 : if (DEBUG) { System.out.println("DoStatement ::= do Statement while LPAREN Expression..."); }  //$NON-NLS-1$
 		    consumeStatementDo() ;
 			break;
 
-    case 456 : if (DEBUG) { System.out.println("ForStatement ::= for LPAREN ForInitopt SEMICOLON..."); }  //$NON-NLS-1$
+    case 471 : if (DEBUG) { System.out.println("ForStatement ::= for LPAREN ForInitopt SEMICOLON..."); }  //$NON-NLS-1$
 		    consumeStatementFor() ;
 			break;
 
-    case 457 : if (DEBUG) { System.out.println("ForStatementNoShortIf ::= for LPAREN ForInitopt..."); }  //$NON-NLS-1$
+    case 472 : if (DEBUG) { System.out.println("ForStatementNoShortIf ::= for LPAREN ForInitopt..."); }  //$NON-NLS-1$
 		    consumeStatementFor() ;
 			break;
 
-    case 458 : if (DEBUG) { System.out.println("ForInit ::= StatementExpressionList"); }  //$NON-NLS-1$
+    case 473 : if (DEBUG) { System.out.println("ForInit ::= StatementExpressionList"); }  //$NON-NLS-1$
 		    consumeForInit() ;
 			break;
 
-    case 462 : if (DEBUG) { System.out.println("StatementExpressionList ::= StatementExpressionList..."); }  //$NON-NLS-1$
+    case 477 : if (DEBUG) { System.out.println("StatementExpressionList ::= StatementExpressionList..."); }  //$NON-NLS-1$
 		    consumeStatementExpressionList() ;
 			break;
 
-    case 463 : if (DEBUG) { System.out.println("AssertStatement ::= assert Expression SEMICOLON"); }  //$NON-NLS-1$
+    case 478 : if (DEBUG) { System.out.println("AssertStatement ::= assert Expression SEMICOLON"); }  //$NON-NLS-1$
 		    consumeSimpleAssertStatement() ;
 			break;
 
-    case 464 : if (DEBUG) { System.out.println("AssertStatement ::= assert Expression COLON Expression"); }  //$NON-NLS-1$
+    case 479 : if (DEBUG) { System.out.println("AssertStatement ::= assert Expression COLON Expression"); }  //$NON-NLS-1$
 		    consumeAssertStatement() ;
 			break;
 
-    case 465 : if (DEBUG) { System.out.println("BreakStatement ::= break SEMICOLON"); }  //$NON-NLS-1$
+    case 480 : if (DEBUG) { System.out.println("BreakStatement ::= break SEMICOLON"); }  //$NON-NLS-1$
 		    consumeStatementBreak() ;
 			break;
 
-    case 466 : if (DEBUG) { System.out.println("BreakStatement ::= break Identifier SEMICOLON"); }  //$NON-NLS-1$
+    case 481 : if (DEBUG) { System.out.println("BreakStatement ::= break Identifier SEMICOLON"); }  //$NON-NLS-1$
 		    consumeStatementBreakWithLabel() ;
 			break;
 
-    case 467 : if (DEBUG) { System.out.println("ContinueStatement ::= continue SEMICOLON"); }  //$NON-NLS-1$
+    case 482 : if (DEBUG) { System.out.println("ContinueStatement ::= continue SEMICOLON"); }  //$NON-NLS-1$
 		    consumeStatementContinue() ;
 			break;
 
-    case 468 : if (DEBUG) { System.out.println("ContinueStatement ::= continue Identifier SEMICOLON"); }  //$NON-NLS-1$
+    case 483 : if (DEBUG) { System.out.println("ContinueStatement ::= continue Identifier SEMICOLON"); }  //$NON-NLS-1$
 		    consumeStatementContinueWithLabel() ;
 			break;
 
-    case 469 : if (DEBUG) { System.out.println("ReturnStatement ::= return Expressionopt SEMICOLON"); }  //$NON-NLS-1$
+    case 484 : if (DEBUG) { System.out.println("ReturnStatement ::= return Expressionopt SEMICOLON"); }  //$NON-NLS-1$
 		    consumeStatementReturn() ;
 			break;
 
-    case 470 : if (DEBUG) { System.out.println("ThrowStatement ::= throw Expression SEMICOLON"); }  //$NON-NLS-1$
+    case 485 : if (DEBUG) { System.out.println("ThrowStatement ::= throw Expression SEMICOLON"); }  //$NON-NLS-1$
 		    consumeStatementThrow();
 			break;
 
-    case 471 : if (DEBUG) { System.out.println("ThrowExpression ::= throw Expression"); }  //$NON-NLS-1$
+    case 486 : if (DEBUG) { System.out.println("ThrowExpression ::= throw Expression"); }  //$NON-NLS-1$
 		    consumeThrowExpression() ;
 			break;
 
-    case 472 : if (DEBUG) { System.out.println("SynchronizedStatement ::= OnlySynchronized LPAREN..."); }  //$NON-NLS-1$
+    case 487 : if (DEBUG) { System.out.println("SynchronizedStatement ::= OnlySynchronized LPAREN..."); }  //$NON-NLS-1$
 		    consumeStatementSynchronized();
 			break;
 
-    case 473 : if (DEBUG) { System.out.println("OnlySynchronized ::= synchronized"); }  //$NON-NLS-1$
+    case 488 : if (DEBUG) { System.out.println("OnlySynchronized ::= synchronized"); }  //$NON-NLS-1$
 		    consumeOnlySynchronized();
 			break;
 
-    case 474 : if (DEBUG) { System.out.println("TryStatement ::= try TryBlock Catches"); }  //$NON-NLS-1$
+    case 489 : if (DEBUG) { System.out.println("TryStatement ::= try TryBlock Catches"); }  //$NON-NLS-1$
 		    consumeStatementTry(false, false);
 			break;
 
-    case 475 : if (DEBUG) { System.out.println("TryStatement ::= try TryBlock Catchesopt Finally"); }  //$NON-NLS-1$
+    case 490 : if (DEBUG) { System.out.println("TryStatement ::= try TryBlock Catchesopt Finally"); }  //$NON-NLS-1$
 		    consumeStatementTry(true, false);
 			break;
 
-    case 476 : if (DEBUG) { System.out.println("TryStatementWithResources ::= try ResourceSpecification"); }  //$NON-NLS-1$
+    case 491 : if (DEBUG) { System.out.println("TryStatementWithResources ::= try ResourceSpecification"); }  //$NON-NLS-1$
 		    consumeStatementTry(false, true);
 			break;
 
-    case 477 : if (DEBUG) { System.out.println("TryStatementWithResources ::= try ResourceSpecification"); }  //$NON-NLS-1$
+    case 492 : if (DEBUG) { System.out.println("TryStatementWithResources ::= try ResourceSpecification"); }  //$NON-NLS-1$
 		    consumeStatementTry(true, true);
 			break;
 
-    case 478 : if (DEBUG) { System.out.println("ResourceSpecification ::= LPAREN Resources ;opt RPAREN"); }  //$NON-NLS-1$
+    case 493 : if (DEBUG) { System.out.println("ResourceSpecification ::= LPAREN Resources ;opt RPAREN"); }  //$NON-NLS-1$
 		    consumeResourceSpecification();
 			break;
 
-    case 479 : if (DEBUG) { System.out.println(";opt ::="); }  //$NON-NLS-1$
+    case 494 : if (DEBUG) { System.out.println(";opt ::="); }  //$NON-NLS-1$
 		    consumeResourceOptionalTrailingSemiColon(false);
 			break;
 
-    case 480 : if (DEBUG) { System.out.println(";opt ::= SEMICOLON"); }  //$NON-NLS-1$
+    case 495 : if (DEBUG) { System.out.println(";opt ::= SEMICOLON"); }  //$NON-NLS-1$
 		    consumeResourceOptionalTrailingSemiColon(true);
 			break;
 
-    case 481 : if (DEBUG) { System.out.println("Resources ::= Resource"); }  //$NON-NLS-1$
+    case 496 : if (DEBUG) { System.out.println("Resources ::= Resource"); }  //$NON-NLS-1$
 		    consumeSingleResource();
 			break;
 
-    case 482 : if (DEBUG) { System.out.println("Resources ::= Resources TrailingSemiColon Resource"); }  //$NON-NLS-1$
+    case 497 : if (DEBUG) { System.out.println("Resources ::= Resources TrailingSemiColon Resource"); }  //$NON-NLS-1$
 		    consumeMultipleResources();
 			break;
 
-    case 483 : if (DEBUG) { System.out.println("TrailingSemiColon ::= SEMICOLON"); }  //$NON-NLS-1$
+    case 498 : if (DEBUG) { System.out.println("TrailingSemiColon ::= SEMICOLON"); }  //$NON-NLS-1$
 		    consumeResourceOptionalTrailingSemiColon(true);
 			break;
 
-    case 484 : if (DEBUG) { System.out.println("Resource ::= Type PushModifiers VariableDeclaratorId..."); }  //$NON-NLS-1$
+    case 499 : if (DEBUG) { System.out.println("Resource ::= Type PushModifiers VariableDeclaratorId..."); }  //$NON-NLS-1$
 		    consumeResourceAsLocalVariableDeclaration();
 			break;
 
-    case 485 : if (DEBUG) { System.out.println("Resource ::= Modifiers Type PushRealModifiers..."); }  //$NON-NLS-1$
+    case 500 : if (DEBUG) { System.out.println("Resource ::= Modifiers Type PushRealModifiers..."); }  //$NON-NLS-1$
 		    consumeResourceAsLocalVariableDeclaration();
 			break;
 
-    case 486 : if (DEBUG) { System.out.println("Resource ::= Name"); }  //$NON-NLS-1$
+    case 501 : if (DEBUG) { System.out.println("Resource ::= Name"); }  //$NON-NLS-1$
 		    consumeResourceAsLocalVariable();
 			break;
 
-    case 487 : if (DEBUG) { System.out.println("Resource ::= FieldAccess"); }  //$NON-NLS-1$
+    case 502 : if (DEBUG) { System.out.println("Resource ::= FieldAccess"); }  //$NON-NLS-1$
 		    consumeResourceAsFieldAccess();
 			break;
 
-    case 489 : if (DEBUG) { System.out.println("ExitTryBlock ::="); }  //$NON-NLS-1$
+    case 504 : if (DEBUG) { System.out.println("ExitTryBlock ::="); }  //$NON-NLS-1$
 		    consumeExitTryBlock();
 			break;
 
-    case 491 : if (DEBUG) { System.out.println("Catches ::= Catches CatchClause"); }  //$NON-NLS-1$
+    case 506 : if (DEBUG) { System.out.println("Catches ::= Catches CatchClause"); }  //$NON-NLS-1$
 		    consumeCatches();
 			break;
 
-    case 492 : if (DEBUG) { System.out.println("CatchClause ::= catch LPAREN CatchFormalParameter RPAREN"); }  //$NON-NLS-1$
+    case 507 : if (DEBUG) { System.out.println("CatchClause ::= catch LPAREN CatchFormalParameter RPAREN"); }  //$NON-NLS-1$
 		    consumeStatementCatch() ;
 			break;
 
-    case 494 : if (DEBUG) { System.out.println("PushLPAREN ::= LPAREN"); }  //$NON-NLS-1$
+    case 509 : if (DEBUG) { System.out.println("PushLPAREN ::= LPAREN"); }  //$NON-NLS-1$
 		    consumeLeftParen();
 			break;
 
-    case 495 : if (DEBUG) { System.out.println("PushRPAREN ::= RPAREN"); }  //$NON-NLS-1$
+    case 510 : if (DEBUG) { System.out.println("PushRPAREN ::= RPAREN"); }  //$NON-NLS-1$
 		    consumeRightParen();
 			break;
 
-    case 500 : if (DEBUG) { System.out.println("PrimaryNoNewArray ::= this"); }  //$NON-NLS-1$
+    case 515 : if (DEBUG) { System.out.println("PrimaryNoNewArray ::= this"); }  //$NON-NLS-1$
 		    consumePrimaryNoNewArrayThis();
 			break;
 
-    case 501 : if (DEBUG) { System.out.println("PrimaryNoNewArray ::= PushLPAREN Expression_NotName..."); }  //$NON-NLS-1$
+    case 516 : if (DEBUG) { System.out.println("PrimaryNoNewArray ::= PushLPAREN Expression_NotName..."); }  //$NON-NLS-1$
 		    consumePrimaryNoNewArray();
 			break;
 
-    case 502 : if (DEBUG) { System.out.println("PrimaryNoNewArray ::= PushLPAREN Name PushRPAREN"); }  //$NON-NLS-1$
+    case 517 : if (DEBUG) { System.out.println("PrimaryNoNewArray ::= PushLPAREN Name PushRPAREN"); }  //$NON-NLS-1$
 		    consumePrimaryNoNewArrayWithName();
 			break;
 
-    case 505 : if (DEBUG) { System.out.println("PrimaryNoNewArray ::= Name DOT this"); }  //$NON-NLS-1$
+    case 520 : if (DEBUG) { System.out.println("PrimaryNoNewArray ::= Name DOT this"); }  //$NON-NLS-1$
 		    consumePrimaryNoNewArrayNameThis();
 			break;
 
-    case 506 : if (DEBUG) { System.out.println("QualifiedSuperReceiver ::= Name DOT super"); }  //$NON-NLS-1$
+    case 521 : if (DEBUG) { System.out.println("QualifiedSuperReceiver ::= Name DOT super"); }  //$NON-NLS-1$
 		    consumeQualifiedSuperReceiver();
 			break;
 
-    case 507 : if (DEBUG) { System.out.println("PrimaryNoNewArray ::= Name DOT class"); }  //$NON-NLS-1$
+    case 522 : if (DEBUG) { System.out.println("PrimaryNoNewArray ::= Name DOT class"); }  //$NON-NLS-1$
 		    consumePrimaryNoNewArrayName();
 			break;
 
-    case 508 : if (DEBUG) { System.out.println("PrimaryNoNewArray ::= Name Dims DOT class"); }  //$NON-NLS-1$
+    case 523 : if (DEBUG) { System.out.println("PrimaryNoNewArray ::= Name Dims DOT class"); }  //$NON-NLS-1$
 		    consumePrimaryNoNewArrayArrayType();
 			break;
 
-    case 509 : if (DEBUG) { System.out.println("PrimaryNoNewArray ::= PrimitiveType Dims DOT class"); }  //$NON-NLS-1$
+    case 524 : if (DEBUG) { System.out.println("PrimaryNoNewArray ::= PrimitiveType Dims DOT class"); }  //$NON-NLS-1$
 		    consumePrimaryNoNewArrayPrimitiveArrayType();
 			break;
 
-    case 510 : if (DEBUG) { System.out.println("PrimaryNoNewArray ::= PrimitiveType DOT class"); }  //$NON-NLS-1$
+    case 525 : if (DEBUG) { System.out.println("PrimaryNoNewArray ::= PrimitiveType DOT class"); }  //$NON-NLS-1$
 		    consumePrimaryNoNewArrayPrimitiveType();
 			break;
 
-    case 516 : if (DEBUG) { System.out.println("ReferenceExpressionTypeArgumentsAndTrunk0 ::=..."); }  //$NON-NLS-1$
+    case 531 : if (DEBUG) { System.out.println("ReferenceExpressionTypeArgumentsAndTrunk0 ::=..."); }  //$NON-NLS-1$
 		    consumeReferenceExpressionTypeArgumentsAndTrunk(false);
 			break;
 
-    case 517 : if (DEBUG) { System.out.println("ReferenceExpressionTypeArgumentsAndTrunk0 ::=..."); }  //$NON-NLS-1$
+    case 532 : if (DEBUG) { System.out.println("ReferenceExpressionTypeArgumentsAndTrunk0 ::=..."); }  //$NON-NLS-1$
 		    consumeReferenceExpressionTypeArgumentsAndTrunk(true);
 			break;
 
-    case 518 : if (DEBUG) { System.out.println("ReferenceExpression ::= PrimitiveType Dims COLON_COLON"); }  //$NON-NLS-1$
+    case 533 : if (DEBUG) { System.out.println("ReferenceExpression ::= PrimitiveType Dims COLON_COLON"); }  //$NON-NLS-1$
 		    consumeReferenceExpressionTypeForm(true);
 			break;
 
-    case 519 : if (DEBUG) { System.out.println("ReferenceExpression ::= Name Dimsopt COLON_COLON..."); }  //$NON-NLS-1$
+    case 534 : if (DEBUG) { System.out.println("ReferenceExpression ::= Name Dimsopt COLON_COLON..."); }  //$NON-NLS-1$
 		    consumeReferenceExpressionTypeForm(false);
 			break;
 
-    case 520 : if (DEBUG) { System.out.println("ReferenceExpression ::= Name BeginTypeArguments..."); }  //$NON-NLS-1$
+    case 535 : if (DEBUG) { System.out.println("ReferenceExpression ::= Name BeginTypeArguments..."); }  //$NON-NLS-1$
 		    consumeReferenceExpressionGenericTypeForm();
 			break;
 
-    case 521 : if (DEBUG) { System.out.println("ReferenceExpression ::= Primary COLON_COLON..."); }  //$NON-NLS-1$
+    case 536 : if (DEBUG) { System.out.println("ReferenceExpression ::= Primary COLON_COLON..."); }  //$NON-NLS-1$
 		    consumeReferenceExpressionPrimaryForm();
 			break;
 
-    case 522 : if (DEBUG) { System.out.println("ReferenceExpression ::= QualifiedSuperReceiver..."); }  //$NON-NLS-1$
+    case 537 : if (DEBUG) { System.out.println("ReferenceExpression ::= QualifiedSuperReceiver..."); }  //$NON-NLS-1$
 		    consumeReferenceExpressionPrimaryForm();
 			break;
 
-    case 523 : if (DEBUG) { System.out.println("ReferenceExpression ::= super COLON_COLON..."); }  //$NON-NLS-1$
+    case 538 : if (DEBUG) { System.out.println("ReferenceExpression ::= super COLON_COLON..."); }  //$NON-NLS-1$
 		    consumeReferenceExpressionSuperForm();
 			break;
 
-    case 524 : if (DEBUG) { System.out.println("NonWildTypeArgumentsopt ::="); }  //$NON-NLS-1$
+    case 539 : if (DEBUG) { System.out.println("NonWildTypeArgumentsopt ::="); }  //$NON-NLS-1$
 		    consumeEmptyTypeArguments();
 			break;
 
-    case 526 : if (DEBUG) { System.out.println("IdentifierOrNew ::= Identifier"); }  //$NON-NLS-1$
+    case 541 : if (DEBUG) { System.out.println("IdentifierOrNew ::= Identifier"); }  //$NON-NLS-1$
 		    consumeIdentifierOrNew(false);
 			break;
 
-    case 527 : if (DEBUG) { System.out.println("IdentifierOrNew ::= new"); }  //$NON-NLS-1$
+    case 542 : if (DEBUG) { System.out.println("IdentifierOrNew ::= new"); }  //$NON-NLS-1$
 		    consumeIdentifierOrNew(true);
 			break;
 
-    case 528 : if (DEBUG) { System.out.println("LambdaExpression ::= LambdaParameters ARROW LambdaBody"); }  //$NON-NLS-1$
+    case 543 : if (DEBUG) { System.out.println("LambdaExpression ::= LambdaParameters ARROW LambdaBody"); }  //$NON-NLS-1$
 		    consumeLambdaExpression();
 			break;
 
-    case 529 : if (DEBUG) { System.out.println("NestedLambda ::="); }  //$NON-NLS-1$
+    case 544 : if (DEBUG) { System.out.println("NestedLambda ::="); }  //$NON-NLS-1$
 		    consumeNestedLambda();
 			break;
 
-    case 530 : if (DEBUG) { System.out.println("LambdaParameters ::= Identifier NestedLambda"); }  //$NON-NLS-1$
+    case 545 : if (DEBUG) { System.out.println("LambdaParameters ::= Identifier NestedLambda"); }  //$NON-NLS-1$
 		    consumeTypeElidedLambdaParameter(false);
 			break;
 
-    case 536 : if (DEBUG) { System.out.println("TypeElidedFormalParameterList ::=..."); }  //$NON-NLS-1$
+    case 551 : if (DEBUG) { System.out.println("TypeElidedFormalParameterList ::=..."); }  //$NON-NLS-1$
 		    consumeFormalParameterList();
 			break;
 
-    case 537 : if (DEBUG) { System.out.println("TypeElidedFormalParameter ::= Modifiersopt Identifier"); }  //$NON-NLS-1$
+    case 552 : if (DEBUG) { System.out.println("TypeElidedFormalParameter ::= Modifiersopt Identifier"); }  //$NON-NLS-1$
 		    consumeTypeElidedLambdaParameter(true);
 			break;
 
-    case 540 : if (DEBUG) { System.out.println("ElidedLeftBraceAndReturn ::="); }  //$NON-NLS-1$
+    case 555 : if (DEBUG) { System.out.println("ElidedLeftBraceAndReturn ::="); }  //$NON-NLS-1$
 		    consumeElidedLeftBraceAndReturn();
 			break;
 
-    case 541 : if (DEBUG) { System.out.println("AllocationHeader ::= new ClassType LPAREN..."); }  //$NON-NLS-1$
+    case 556 : if (DEBUG) { System.out.println("AllocationHeader ::= new ClassType LPAREN..."); }  //$NON-NLS-1$
 		    consumeAllocationHeader();
 			break;
 
-    case 542 : if (DEBUG) { System.out.println("ClassInstanceCreationExpression ::= new..."); }  //$NON-NLS-1$
+    case 557 : if (DEBUG) { System.out.println("ClassInstanceCreationExpression ::= new..."); }  //$NON-NLS-1$
 		    consumeClassInstanceCreationExpressionWithTypeArguments();
 			break;
 
-    case 543 : if (DEBUG) { System.out.println("ClassInstanceCreationExpression ::= new ClassType..."); }  //$NON-NLS-1$
+    case 558 : if (DEBUG) { System.out.println("ClassInstanceCreationExpression ::= new ClassType..."); }  //$NON-NLS-1$
 		    consumeClassInstanceCreationExpression();
 			break;
 
-    case 544 : if (DEBUG) { System.out.println("ClassInstanceCreationExpression ::= Primary DOT new..."); }  //$NON-NLS-1$
+    case 559 : if (DEBUG) { System.out.println("ClassInstanceCreationExpression ::= Primary DOT new..."); }  //$NON-NLS-1$
 		    consumeClassInstanceCreationExpressionQualifiedWithTypeArguments() ;
 			break;
 
-    case 545 : if (DEBUG) { System.out.println("ClassInstanceCreationExpression ::= Primary DOT new..."); }  //$NON-NLS-1$
+    case 560 : if (DEBUG) { System.out.println("ClassInstanceCreationExpression ::= Primary DOT new..."); }  //$NON-NLS-1$
 		    consumeClassInstanceCreationExpressionQualified() ;
 			break;
 
-    case 546 : if (DEBUG) { System.out.println("ClassInstanceCreationExpression ::=..."); }  //$NON-NLS-1$
+    case 561 : if (DEBUG) { System.out.println("ClassInstanceCreationExpression ::=..."); }  //$NON-NLS-1$
 		    consumeClassInstanceCreationExpressionQualified() ;
 			break;
 
-    case 547 : if (DEBUG) { System.out.println("ClassInstanceCreationExpression ::=..."); }  //$NON-NLS-1$
+    case 562 : if (DEBUG) { System.out.println("ClassInstanceCreationExpression ::=..."); }  //$NON-NLS-1$
 		    consumeClassInstanceCreationExpressionQualifiedWithTypeArguments() ;
 			break;
 
-    case 548 : if (DEBUG) { System.out.println("EnterInstanceCreationArgumentList ::="); }  //$NON-NLS-1$
+    case 563 : if (DEBUG) { System.out.println("EnterInstanceCreationArgumentList ::="); }  //$NON-NLS-1$
 		    consumeEnterInstanceCreationArgumentList();
 			break;
 
-    case 549 : if (DEBUG) { System.out.println("ClassInstanceCreationExpressionName ::= Name DOT new"); }  //$NON-NLS-1$
+    case 564 : if (DEBUG) { System.out.println("ClassInstanceCreationExpressionName ::= Name DOT new"); }  //$NON-NLS-1$
 		    consumeClassInstanceCreationExpressionName() ;
 			break;
 
-    case 550 : if (DEBUG) { System.out.println("UnqualifiedClassBodyopt ::="); }  //$NON-NLS-1$
+    case 565 : if (DEBUG) { System.out.println("UnqualifiedClassBodyopt ::="); }  //$NON-NLS-1$
 		    consumeClassBodyopt();
 			break;
 
-    case 552 : if (DEBUG) { System.out.println("UnqualifiedEnterAnonymousClassBody ::="); }  //$NON-NLS-1$
+    case 567 : if (DEBUG) { System.out.println("UnqualifiedEnterAnonymousClassBody ::="); }  //$NON-NLS-1$
 		    consumeEnterAnonymousClassBody(false);
 			break;
 
-    case 553 : if (DEBUG) { System.out.println("QualifiedClassBodyopt ::="); }  //$NON-NLS-1$
+    case 568 : if (DEBUG) { System.out.println("QualifiedClassBodyopt ::="); }  //$NON-NLS-1$
 		    consumeClassBodyopt();
 			break;
 
-    case 555 : if (DEBUG) { System.out.println("QualifiedEnterAnonymousClassBody ::="); }  //$NON-NLS-1$
+    case 570 : if (DEBUG) { System.out.println("QualifiedEnterAnonymousClassBody ::="); }  //$NON-NLS-1$
 		    consumeEnterAnonymousClassBody(true);
 			break;
 
-    case 557 : if (DEBUG) { System.out.println("ArgumentList ::= ArgumentList COMMA Expression"); }  //$NON-NLS-1$
+    case 572 : if (DEBUG) { System.out.println("ArgumentList ::= ArgumentList COMMA Expression"); }  //$NON-NLS-1$
 		    consumeArgumentList();
 			break;
 
-    case 558 : if (DEBUG) { System.out.println("ArrayCreationHeader ::= new PrimitiveType..."); }  //$NON-NLS-1$
+    case 573 : if (DEBUG) { System.out.println("ArrayCreationHeader ::= new PrimitiveType..."); }  //$NON-NLS-1$
 		    consumeArrayCreationHeader();
 			break;
 
-    case 559 : if (DEBUG) { System.out.println("ArrayCreationHeader ::= new ClassOrInterfaceType..."); }  //$NON-NLS-1$
+    case 574 : if (DEBUG) { System.out.println("ArrayCreationHeader ::= new ClassOrInterfaceType..."); }  //$NON-NLS-1$
 		    consumeArrayCreationHeader();
 			break;
 
-    case 560 : if (DEBUG) { System.out.println("ArrayCreationWithoutArrayInitializer ::= new..."); }  //$NON-NLS-1$
+    case 575 : if (DEBUG) { System.out.println("ArrayCreationWithoutArrayInitializer ::= new..."); }  //$NON-NLS-1$
 		    consumeArrayCreationExpressionWithoutInitializer();
 			break;
 
-    case 561 : if (DEBUG) { System.out.println("ArrayCreationWithArrayInitializer ::= new PrimitiveType"); }  //$NON-NLS-1$
+    case 576 : if (DEBUG) { System.out.println("ArrayCreationWithArrayInitializer ::= new PrimitiveType"); }  //$NON-NLS-1$
 		    consumeArrayCreationExpressionWithInitializer();
 			break;
 
-    case 562 : if (DEBUG) { System.out.println("ArrayCreationWithoutArrayInitializer ::= new..."); }  //$NON-NLS-1$
+    case 577 : if (DEBUG) { System.out.println("ArrayCreationWithoutArrayInitializer ::= new..."); }  //$NON-NLS-1$
 		    consumeArrayCreationExpressionWithoutInitializer();
 			break;
 
-    case 563 : if (DEBUG) { System.out.println("ArrayCreationWithArrayInitializer ::= new..."); }  //$NON-NLS-1$
+    case 578 : if (DEBUG) { System.out.println("ArrayCreationWithArrayInitializer ::= new..."); }  //$NON-NLS-1$
 		    consumeArrayCreationExpressionWithInitializer();
 			break;
 
-    case 565 : if (DEBUG) { System.out.println("DimWithOrWithOutExprs ::= DimWithOrWithOutExprs..."); }  //$NON-NLS-1$
+    case 580 : if (DEBUG) { System.out.println("DimWithOrWithOutExprs ::= DimWithOrWithOutExprs..."); }  //$NON-NLS-1$
 		    consumeDimWithOrWithOutExprs();
 			break;
 
-     case 567 : if (DEBUG) { System.out.println("DimWithOrWithOutExpr ::= TypeAnnotationsopt LBRACKET..."); }  //$NON-NLS-1$
+     case 582 : if (DEBUG) { System.out.println("DimWithOrWithOutExpr ::= TypeAnnotationsopt LBRACKET..."); }  //$NON-NLS-1$
 		    consumeDimWithOrWithOutExpr();
 			break;
 
-     case 568 : if (DEBUG) { System.out.println("Dims ::= DimsLoop"); }  //$NON-NLS-1$
+     case 583 : if (DEBUG) { System.out.println("Dims ::= DimsLoop"); }  //$NON-NLS-1$
 		    consumeDims();
 			break;
 
-     case 571 : if (DEBUG) { System.out.println("OneDimLoop ::= LBRACKET RBRACKET"); }  //$NON-NLS-1$
+     case 586 : if (DEBUG) { System.out.println("OneDimLoop ::= LBRACKET RBRACKET"); }  //$NON-NLS-1$
 		    consumeOneDimLoop(false);
 			break;
 
-     case 572 : if (DEBUG) { System.out.println("OneDimLoop ::= TypeAnnotations LBRACKET RBRACKET"); }  //$NON-NLS-1$
+     case 587 : if (DEBUG) { System.out.println("OneDimLoop ::= TypeAnnotations LBRACKET RBRACKET"); }  //$NON-NLS-1$
 		    consumeOneDimLoop(true);
 			break;
 
-    case 573 : if (DEBUG) { System.out.println("FieldAccess ::= Primary DOT Identifier"); }  //$NON-NLS-1$
+    case 588 : if (DEBUG) { System.out.println("FieldAccess ::= Primary DOT Identifier"); }  //$NON-NLS-1$
 		    consumeFieldAccess(false);
 			break;
 
-    case 574 : if (DEBUG) { System.out.println("FieldAccess ::= super DOT Identifier"); }  //$NON-NLS-1$
+    case 589 : if (DEBUG) { System.out.println("FieldAccess ::= super DOT Identifier"); }  //$NON-NLS-1$
 		    consumeFieldAccess(true);
 			break;
 
-    case 575 : if (DEBUG) { System.out.println("FieldAccess ::= QualifiedSuperReceiver DOT Identifier"); }  //$NON-NLS-1$
+    case 590 : if (DEBUG) { System.out.println("FieldAccess ::= QualifiedSuperReceiver DOT Identifier"); }  //$NON-NLS-1$
 		    consumeFieldAccess(false);
 			break;
 
-    case 576 : if (DEBUG) { System.out.println("MethodInvocation ::= Name LPAREN ArgumentListopt RPAREN"); }  //$NON-NLS-1$
+    case 591 : if (DEBUG) { System.out.println("MethodInvocation ::= Name LPAREN ArgumentListopt RPAREN"); }  //$NON-NLS-1$
 		    consumeMethodInvocationName();
 			break;
 
-    case 577 : if (DEBUG) { System.out.println("MethodInvocation ::= Name DOT OnlyTypeArguments..."); }  //$NON-NLS-1$
+    case 592 : if (DEBUG) { System.out.println("MethodInvocation ::= Name DOT OnlyTypeArguments..."); }  //$NON-NLS-1$
 		    consumeMethodInvocationNameWithTypeArguments();
 			break;
 
-    case 578 : if (DEBUG) { System.out.println("MethodInvocation ::= Primary DOT OnlyTypeArguments..."); }  //$NON-NLS-1$
+    case 593 : if (DEBUG) { System.out.println("MethodInvocation ::= Primary DOT OnlyTypeArguments..."); }  //$NON-NLS-1$
 		    consumeMethodInvocationPrimaryWithTypeArguments();
 			break;
 
-    case 579 : if (DEBUG) { System.out.println("MethodInvocation ::= Primary DOT Identifier LPAREN..."); }  //$NON-NLS-1$
+    case 594 : if (DEBUG) { System.out.println("MethodInvocation ::= Primary DOT Identifier LPAREN..."); }  //$NON-NLS-1$
 		    consumeMethodInvocationPrimary();
 			break;
 
-    case 580 : if (DEBUG) { System.out.println("MethodInvocation ::= QualifiedSuperReceiver DOT..."); }  //$NON-NLS-1$
+    case 595 : if (DEBUG) { System.out.println("MethodInvocation ::= QualifiedSuperReceiver DOT..."); }  //$NON-NLS-1$
 		    consumeMethodInvocationPrimary();
 			break;
 
-    case 581 : if (DEBUG) { System.out.println("MethodInvocation ::= QualifiedSuperReceiver DOT..."); }  //$NON-NLS-1$
+    case 596 : if (DEBUG) { System.out.println("MethodInvocation ::= QualifiedSuperReceiver DOT..."); }  //$NON-NLS-1$
 		    consumeMethodInvocationPrimaryWithTypeArguments();
 			break;
 
-    case 582 : if (DEBUG) { System.out.println("MethodInvocation ::= super DOT OnlyTypeArguments..."); }  //$NON-NLS-1$
+    case 597 : if (DEBUG) { System.out.println("MethodInvocation ::= super DOT OnlyTypeArguments..."); }  //$NON-NLS-1$
 		    consumeMethodInvocationSuperWithTypeArguments();
 			break;
 
-    case 583 : if (DEBUG) { System.out.println("MethodInvocation ::= super DOT Identifier LPAREN..."); }  //$NON-NLS-1$
+    case 598 : if (DEBUG) { System.out.println("MethodInvocation ::= super DOT Identifier LPAREN..."); }  //$NON-NLS-1$
 		    consumeMethodInvocationSuper();
 			break;
 
-    case 584 : if (DEBUG) { System.out.println("ArrayAccess ::= Name LBRACKET Expression RBRACKET"); }  //$NON-NLS-1$
+    case 599 : if (DEBUG) { System.out.println("ArrayAccess ::= Name LBRACKET Expression RBRACKET"); }  //$NON-NLS-1$
 		    consumeArrayAccess(true);
 			break;
 
-    case 585 : if (DEBUG) { System.out.println("ArrayAccess ::= PrimaryNoNewArray LBRACKET Expression..."); }  //$NON-NLS-1$
+    case 600 : if (DEBUG) { System.out.println("ArrayAccess ::= PrimaryNoNewArray LBRACKET Expression..."); }  //$NON-NLS-1$
 		    consumeArrayAccess(false);
 			break;
 
-    case 586 : if (DEBUG) { System.out.println("ArrayAccess ::= ArrayCreationWithArrayInitializer..."); }  //$NON-NLS-1$
+    case 601 : if (DEBUG) { System.out.println("ArrayAccess ::= ArrayCreationWithArrayInitializer..."); }  //$NON-NLS-1$
 		    consumeArrayAccess(false);
 			break;
 
-    case 588 : if (DEBUG) { System.out.println("PostfixExpression ::= Name"); }  //$NON-NLS-1$
+    case 603 : if (DEBUG) { System.out.println("PostfixExpression ::= Name"); }  //$NON-NLS-1$
 		    consumePostfixExpression();
 			break;
 
-    case 591 : if (DEBUG) { System.out.println("PostIncrementExpression ::= PostfixExpression PLUS_PLUS"); }  //$NON-NLS-1$
+    case 606 : if (DEBUG) { System.out.println("PostIncrementExpression ::= PostfixExpression PLUS_PLUS"); }  //$NON-NLS-1$
 		    consumeUnaryExpression(OperatorIds.PLUS,true);
 			break;
 
-    case 592 : if (DEBUG) { System.out.println("PostDecrementExpression ::= PostfixExpression..."); }  //$NON-NLS-1$
+    case 607 : if (DEBUG) { System.out.println("PostDecrementExpression ::= PostfixExpression..."); }  //$NON-NLS-1$
 		    consumeUnaryExpression(OperatorIds.MINUS,true);
 			break;
 
-    case 593 : if (DEBUG) { System.out.println("PushPosition ::="); }  //$NON-NLS-1$
+    case 608 : if (DEBUG) { System.out.println("PushPosition ::="); }  //$NON-NLS-1$
 		    consumePushPosition();
 			break;
 
-    case 596 : if (DEBUG) { System.out.println("UnaryExpression ::= PLUS PushPosition UnaryExpression"); }  //$NON-NLS-1$
+    case 611 : if (DEBUG) { System.out.println("UnaryExpression ::= PLUS PushPosition UnaryExpression"); }  //$NON-NLS-1$
 		    consumeUnaryExpression(OperatorIds.PLUS);
 			break;
 
-    case 597 : if (DEBUG) { System.out.println("UnaryExpression ::= MINUS PushPosition UnaryExpression"); }  //$NON-NLS-1$
+    case 612 : if (DEBUG) { System.out.println("UnaryExpression ::= MINUS PushPosition UnaryExpression"); }  //$NON-NLS-1$
 		    consumeUnaryExpression(OperatorIds.MINUS);
 			break;
 
-    case 599 : if (DEBUG) { System.out.println("PreIncrementExpression ::= PLUS_PLUS PushPosition..."); }  //$NON-NLS-1$
+    case 614 : if (DEBUG) { System.out.println("PreIncrementExpression ::= PLUS_PLUS PushPosition..."); }  //$NON-NLS-1$
 		    consumeUnaryExpression(OperatorIds.PLUS,false);
 			break;
 
-    case 600 : if (DEBUG) { System.out.println("PreDecrementExpression ::= MINUS_MINUS PushPosition..."); }  //$NON-NLS-1$
+    case 615 : if (DEBUG) { System.out.println("PreDecrementExpression ::= MINUS_MINUS PushPosition..."); }  //$NON-NLS-1$
 		    consumeUnaryExpression(OperatorIds.MINUS,false);
 			break;
 
-    case 602 : if (DEBUG) { System.out.println("UnaryExpressionNotPlusMinus ::= TWIDDLE PushPosition..."); }  //$NON-NLS-1$
+    case 617 : if (DEBUG) { System.out.println("UnaryExpressionNotPlusMinus ::= TWIDDLE PushPosition..."); }  //$NON-NLS-1$
 		    consumeUnaryExpression(OperatorIds.TWIDDLE);
 			break;
 
-    case 603 : if (DEBUG) { System.out.println("UnaryExpressionNotPlusMinus ::= NOT PushPosition..."); }  //$NON-NLS-1$
+    case 618 : if (DEBUG) { System.out.println("UnaryExpressionNotPlusMinus ::= NOT PushPosition..."); }  //$NON-NLS-1$
 		    consumeUnaryExpression(OperatorIds.NOT);
 			break;
 
-    case 605 : if (DEBUG) { System.out.println("CastExpression ::= PushLPAREN PrimitiveType Dimsopt..."); }  //$NON-NLS-1$
+    case 620 : if (DEBUG) { System.out.println("CastExpression ::= PushLPAREN PrimitiveType Dimsopt..."); }  //$NON-NLS-1$
 		    consumeCastExpressionWithPrimitiveType();
 			break;
 
-    case 606 : if (DEBUG) { System.out.println("CastExpression ::= PushLPAREN Name..."); }  //$NON-NLS-1$
+    case 621 : if (DEBUG) { System.out.println("CastExpression ::= PushLPAREN Name..."); }  //$NON-NLS-1$
 		    consumeCastExpressionWithGenericsArray();
 			break;
 
-    case 607 : if (DEBUG) { System.out.println("CastExpression ::= PushLPAREN Name..."); }  //$NON-NLS-1$
+    case 622 : if (DEBUG) { System.out.println("CastExpression ::= PushLPAREN Name..."); }  //$NON-NLS-1$
 		    consumeCastExpressionWithQualifiedGenericsArray();
 			break;
 
-    case 608 : if (DEBUG) { System.out.println("CastExpression ::= PushLPAREN Name PushRPAREN..."); }  //$NON-NLS-1$
+    case 623 : if (DEBUG) { System.out.println("CastExpression ::= PushLPAREN Name PushRPAREN..."); }  //$NON-NLS-1$
 		    consumeCastExpressionLL1();
 			break;
 
-    case 609 : if (DEBUG) { System.out.println("CastExpression ::= BeginIntersectionCast PushLPAREN..."); }  //$NON-NLS-1$
+    case 624 : if (DEBUG) { System.out.println("CastExpression ::= BeginIntersectionCast PushLPAREN..."); }  //$NON-NLS-1$
 		    consumeCastExpressionLL1WithBounds();
 			break;
 
-    case 610 : if (DEBUG) { System.out.println("CastExpression ::= PushLPAREN Name Dims..."); }  //$NON-NLS-1$
+    case 625 : if (DEBUG) { System.out.println("CastExpression ::= PushLPAREN Name Dims..."); }  //$NON-NLS-1$
 		    consumeCastExpressionWithNameArray();
 			break;
 
-    case 611 : if (DEBUG) { System.out.println("AdditionalBoundsListOpt ::="); }  //$NON-NLS-1$
+    case 626 : if (DEBUG) { System.out.println("AdditionalBoundsListOpt ::="); }  //$NON-NLS-1$
 		    consumeZeroAdditionalBounds();
 			break;
 
-    case 615 : if (DEBUG) { System.out.println("OnlyTypeArgumentsForCastExpression ::= OnlyTypeArguments"); }  //$NON-NLS-1$
+    case 630 : if (DEBUG) { System.out.println("OnlyTypeArgumentsForCastExpression ::= OnlyTypeArguments"); }  //$NON-NLS-1$
 		    consumeOnlyTypeArgumentsForCastExpression();
 			break;
 
-    case 616 : if (DEBUG) { System.out.println("InsideCastExpression ::="); }  //$NON-NLS-1$
+    case 631 : if (DEBUG) { System.out.println("InsideCastExpression ::="); }  //$NON-NLS-1$
 		    consumeInsideCastExpression();
 			break;
 
-    case 617 : if (DEBUG) { System.out.println("InsideCastExpressionLL1 ::="); }  //$NON-NLS-1$
+    case 632 : if (DEBUG) { System.out.println("InsideCastExpressionLL1 ::="); }  //$NON-NLS-1$
 		    consumeInsideCastExpressionLL1();
 			break;
 
-    case 618 : if (DEBUG) { System.out.println("InsideCastExpressionLL1WithBounds ::="); }  //$NON-NLS-1$
+    case 633 : if (DEBUG) { System.out.println("InsideCastExpressionLL1WithBounds ::="); }  //$NON-NLS-1$
 		    consumeInsideCastExpressionLL1WithBounds ();
 			break;
 
-    case 619 : if (DEBUG) { System.out.println("InsideCastExpressionWithQualifiedGenerics ::="); }  //$NON-NLS-1$
+    case 634 : if (DEBUG) { System.out.println("InsideCastExpressionWithQualifiedGenerics ::="); }  //$NON-NLS-1$
 		    consumeInsideCastExpressionWithQualifiedGenerics();
 			break;
 
-    case 621 : if (DEBUG) { System.out.println("MultiplicativeExpression ::= MultiplicativeExpression..."); }  //$NON-NLS-1$
+    case 636 : if (DEBUG) { System.out.println("MultiplicativeExpression ::= MultiplicativeExpression..."); }  //$NON-NLS-1$
 		    consumeBinaryExpression(OperatorIds.MULTIPLY);
 			break;
 
-    case 622 : if (DEBUG) { System.out.println("MultiplicativeExpression ::= MultiplicativeExpression..."); }  //$NON-NLS-1$
+    case 637 : if (DEBUG) { System.out.println("MultiplicativeExpression ::= MultiplicativeExpression..."); }  //$NON-NLS-1$
 		    consumeBinaryExpression(OperatorIds.DIVIDE);
 			break;
 
-    case 623 : if (DEBUG) { System.out.println("MultiplicativeExpression ::= MultiplicativeExpression..."); }  //$NON-NLS-1$
+    case 638 : if (DEBUG) { System.out.println("MultiplicativeExpression ::= MultiplicativeExpression..."); }  //$NON-NLS-1$
 		    consumeBinaryExpression(OperatorIds.REMAINDER);
 			break;
 
-    case 625 : if (DEBUG) { System.out.println("AdditiveExpression ::= AdditiveExpression PLUS..."); }  //$NON-NLS-1$
+    case 640 : if (DEBUG) { System.out.println("AdditiveExpression ::= AdditiveExpression PLUS..."); }  //$NON-NLS-1$
 		    consumeBinaryExpression(OperatorIds.PLUS);
 			break;
 
-    case 626 : if (DEBUG) { System.out.println("AdditiveExpression ::= AdditiveExpression MINUS..."); }  //$NON-NLS-1$
+    case 641 : if (DEBUG) { System.out.println("AdditiveExpression ::= AdditiveExpression MINUS..."); }  //$NON-NLS-1$
 		    consumeBinaryExpression(OperatorIds.MINUS);
 			break;
 
-    case 628 : if (DEBUG) { System.out.println("ShiftExpression ::= ShiftExpression LEFT_SHIFT..."); }  //$NON-NLS-1$
+    case 643 : if (DEBUG) { System.out.println("ShiftExpression ::= ShiftExpression LEFT_SHIFT..."); }  //$NON-NLS-1$
 		    consumeBinaryExpression(OperatorIds.LEFT_SHIFT);
 			break;
 
-    case 629 : if (DEBUG) { System.out.println("ShiftExpression ::= ShiftExpression RIGHT_SHIFT..."); }  //$NON-NLS-1$
+    case 644 : if (DEBUG) { System.out.println("ShiftExpression ::= ShiftExpression RIGHT_SHIFT..."); }  //$NON-NLS-1$
 		    consumeBinaryExpression(OperatorIds.RIGHT_SHIFT);
 			break;
 
-    case 630 : if (DEBUG) { System.out.println("ShiftExpression ::= ShiftExpression UNSIGNED_RIGHT_SHIFT"); }  //$NON-NLS-1$
+    case 645 : if (DEBUG) { System.out.println("ShiftExpression ::= ShiftExpression UNSIGNED_RIGHT_SHIFT"); }  //$NON-NLS-1$
 		    consumeBinaryExpression(OperatorIds.UNSIGNED_RIGHT_SHIFT);
 			break;
 
-    case 632 : if (DEBUG) { System.out.println("RelationalExpression ::= RelationalExpression LESS..."); }  //$NON-NLS-1$
+    case 647 : if (DEBUG) { System.out.println("RelationalExpression ::= RelationalExpression LESS..."); }  //$NON-NLS-1$
 		    consumeBinaryExpression(OperatorIds.LESS);
 			break;
 
-    case 633 : if (DEBUG) { System.out.println("RelationalExpression ::= RelationalExpression GREATER..."); }  //$NON-NLS-1$
+    case 648 : if (DEBUG) { System.out.println("RelationalExpression ::= RelationalExpression GREATER..."); }  //$NON-NLS-1$
 		    consumeBinaryExpression(OperatorIds.GREATER);
 			break;
 
-    case 634 : if (DEBUG) { System.out.println("RelationalExpression ::= RelationalExpression LESS_EQUAL"); }  //$NON-NLS-1$
+    case 649 : if (DEBUG) { System.out.println("RelationalExpression ::= RelationalExpression LESS_EQUAL"); }  //$NON-NLS-1$
 		    consumeBinaryExpression(OperatorIds.LESS_EQUAL);
 			break;
 
-    case 635 : if (DEBUG) { System.out.println("RelationalExpression ::= RelationalExpression..."); }  //$NON-NLS-1$
+    case 650 : if (DEBUG) { System.out.println("RelationalExpression ::= RelationalExpression..."); }  //$NON-NLS-1$
 		    consumeBinaryExpression(OperatorIds.GREATER_EQUAL);
 			break;
 
-    case 637 : if (DEBUG) { System.out.println("EqualityExpression ::= EqualityExpression EQUAL_EQUAL..."); }  //$NON-NLS-1$
+    case 652 : if (DEBUG) { System.out.println("EqualityExpression ::= EqualityExpression EQUAL_EQUAL..."); }  //$NON-NLS-1$
 		    consumeEqualityExpression(OperatorIds.EQUAL_EQUAL);
 			break;
 
-    case 638 : if (DEBUG) { System.out.println("EqualityExpression ::= EqualityExpression NOT_EQUAL..."); }  //$NON-NLS-1$
+    case 653 : if (DEBUG) { System.out.println("EqualityExpression ::= EqualityExpression NOT_EQUAL..."); }  //$NON-NLS-1$
 		    consumeEqualityExpression(OperatorIds.NOT_EQUAL);
 			break;
 
-    case 640 : if (DEBUG) { System.out.println("AndExpression ::= AndExpression AND EqualityExpression"); }  //$NON-NLS-1$
+    case 655 : if (DEBUG) { System.out.println("AndExpression ::= AndExpression AND EqualityExpression"); }  //$NON-NLS-1$
 		    consumeBinaryExpression(OperatorIds.AND);
 			break;
 
-    case 642 : if (DEBUG) { System.out.println("ExclusiveOrExpression ::= ExclusiveOrExpression XOR..."); }  //$NON-NLS-1$
+    case 657 : if (DEBUG) { System.out.println("ExclusiveOrExpression ::= ExclusiveOrExpression XOR..."); }  //$NON-NLS-1$
 		    consumeBinaryExpression(OperatorIds.XOR);
 			break;
 
-    case 644 : if (DEBUG) { System.out.println("InclusiveOrExpression ::= InclusiveOrExpression OR..."); }  //$NON-NLS-1$
+    case 659 : if (DEBUG) { System.out.println("InclusiveOrExpression ::= InclusiveOrExpression OR..."); }  //$NON-NLS-1$
 		    consumeBinaryExpression(OperatorIds.OR);
 			break;
 
-    case 646 : if (DEBUG) { System.out.println("ConditionalAndExpression ::= ConditionalAndExpression..."); }  //$NON-NLS-1$
+    case 661 : if (DEBUG) { System.out.println("ConditionalAndExpression ::= ConditionalAndExpression..."); }  //$NON-NLS-1$
 		    consumeBinaryExpression(OperatorIds.AND_AND);
 			break;
 
-    case 648 : if (DEBUG) { System.out.println("ConditionalOrExpression ::= ConditionalOrExpression..."); }  //$NON-NLS-1$
+    case 663 : if (DEBUG) { System.out.println("ConditionalOrExpression ::= ConditionalOrExpression..."); }  //$NON-NLS-1$
 		    consumeBinaryExpression(OperatorIds.OR_OR);
 			break;
 
-    case 650 : if (DEBUG) { System.out.println("ConditionalExpression ::= ConditionalOrExpression..."); }  //$NON-NLS-1$
+    case 665 : if (DEBUG) { System.out.println("ConditionalExpression ::= ConditionalOrExpression..."); }  //$NON-NLS-1$
 		    consumeConditionalExpression(OperatorIds.QUESTIONCOLON) ;
 			break;
 
-    case 653 : if (DEBUG) { System.out.println("Assignment ::= PostfixExpression AssignmentOperator..."); }  //$NON-NLS-1$
+    case 668 : if (DEBUG) { System.out.println("Assignment ::= PostfixExpression AssignmentOperator..."); }  //$NON-NLS-1$
 		    consumeAssignment();
 			break;
 
-    case 655 : if (DEBUG) { System.out.println("Assignment ::= InvalidArrayInitializerAssignement"); }  //$NON-NLS-1$
+    case 670 : if (DEBUG) { System.out.println("Assignment ::= InvalidArrayInitializerAssignement"); }  //$NON-NLS-1$
 		    ignoreExpressionAssignment();
 			break;
 
-    case 656 : if (DEBUG) { System.out.println("AssignmentOperator ::= EQUAL"); }  //$NON-NLS-1$
+    case 671 : if (DEBUG) { System.out.println("AssignmentOperator ::= EQUAL"); }  //$NON-NLS-1$
 		    consumeAssignmentOperator(EQUAL);
 			break;
 
-    case 657 : if (DEBUG) { System.out.println("AssignmentOperator ::= MULTIPLY_EQUAL"); }  //$NON-NLS-1$
+    case 672 : if (DEBUG) { System.out.println("AssignmentOperator ::= MULTIPLY_EQUAL"); }  //$NON-NLS-1$
 		    consumeAssignmentOperator(MULTIPLY);
 			break;
 
-    case 658 : if (DEBUG) { System.out.println("AssignmentOperator ::= DIVIDE_EQUAL"); }  //$NON-NLS-1$
+    case 673 : if (DEBUG) { System.out.println("AssignmentOperator ::= DIVIDE_EQUAL"); }  //$NON-NLS-1$
 		    consumeAssignmentOperator(DIVIDE);
 			break;
 
-    case 659 : if (DEBUG) { System.out.println("AssignmentOperator ::= REMAINDER_EQUAL"); }  //$NON-NLS-1$
+    case 674 : if (DEBUG) { System.out.println("AssignmentOperator ::= REMAINDER_EQUAL"); }  //$NON-NLS-1$
 		    consumeAssignmentOperator(REMAINDER);
 			break;
 
-    case 660 : if (DEBUG) { System.out.println("AssignmentOperator ::= PLUS_EQUAL"); }  //$NON-NLS-1$
+    case 675 : if (DEBUG) { System.out.println("AssignmentOperator ::= PLUS_EQUAL"); }  //$NON-NLS-1$
 		    consumeAssignmentOperator(PLUS);
 			break;
 
-    case 661 : if (DEBUG) { System.out.println("AssignmentOperator ::= MINUS_EQUAL"); }  //$NON-NLS-1$
+    case 676 : if (DEBUG) { System.out.println("AssignmentOperator ::= MINUS_EQUAL"); }  //$NON-NLS-1$
 		    consumeAssignmentOperator(MINUS);
 			break;
 
-    case 662 : if (DEBUG) { System.out.println("AssignmentOperator ::= LEFT_SHIFT_EQUAL"); }  //$NON-NLS-1$
+    case 677 : if (DEBUG) { System.out.println("AssignmentOperator ::= LEFT_SHIFT_EQUAL"); }  //$NON-NLS-1$
 		    consumeAssignmentOperator(LEFT_SHIFT);
 			break;
 
-    case 663 : if (DEBUG) { System.out.println("AssignmentOperator ::= RIGHT_SHIFT_EQUAL"); }  //$NON-NLS-1$
+    case 678 : if (DEBUG) { System.out.println("AssignmentOperator ::= RIGHT_SHIFT_EQUAL"); }  //$NON-NLS-1$
 		    consumeAssignmentOperator(RIGHT_SHIFT);
 			break;
 
-    case 664 : if (DEBUG) { System.out.println("AssignmentOperator ::= UNSIGNED_RIGHT_SHIFT_EQUAL"); }  //$NON-NLS-1$
+    case 679 : if (DEBUG) { System.out.println("AssignmentOperator ::= UNSIGNED_RIGHT_SHIFT_EQUAL"); }  //$NON-NLS-1$
 		    consumeAssignmentOperator(UNSIGNED_RIGHT_SHIFT);
 			break;
 
-    case 665 : if (DEBUG) { System.out.println("AssignmentOperator ::= AND_EQUAL"); }  //$NON-NLS-1$
+    case 680 : if (DEBUG) { System.out.println("AssignmentOperator ::= AND_EQUAL"); }  //$NON-NLS-1$
 		    consumeAssignmentOperator(AND);
 			break;
 
-    case 666 : if (DEBUG) { System.out.println("AssignmentOperator ::= XOR_EQUAL"); }  //$NON-NLS-1$
+    case 681 : if (DEBUG) { System.out.println("AssignmentOperator ::= XOR_EQUAL"); }  //$NON-NLS-1$
 		    consumeAssignmentOperator(XOR);
 			break;
 
-    case 667 : if (DEBUG) { System.out.println("AssignmentOperator ::= OR_EQUAL"); }  //$NON-NLS-1$
+    case 682 : if (DEBUG) { System.out.println("AssignmentOperator ::= OR_EQUAL"); }  //$NON-NLS-1$
 		    consumeAssignmentOperator(OR);
 			break;
 
-    case 668 : if (DEBUG) { System.out.println("Expression ::= AssignmentExpression"); }  //$NON-NLS-1$
+    case 683 : if (DEBUG) { System.out.println("Expression ::= AssignmentExpression"); }  //$NON-NLS-1$
 		    consumeExpression();
 			break;
 
-    case 671 : if (DEBUG) { System.out.println("Expressionopt ::="); }  //$NON-NLS-1$
+    case 686 : if (DEBUG) { System.out.println("Expressionopt ::="); }  //$NON-NLS-1$
 		    consumeEmptyExpression();
 			break;
 
-    case 674 : if (DEBUG) { System.out.println("ConstantExpressions ::= ConstantExpressions COMMA..."); }  //$NON-NLS-1$
-		    consumeConstantExpressions();
-			break;
-
-    case 678 : if (DEBUG) { System.out.println("ClassBodyDeclarationsopt ::="); }  //$NON-NLS-1$
+    case 691 : if (DEBUG) { System.out.println("ClassBodyDeclarationsopt ::="); }  //$NON-NLS-1$
 		    consumeEmptyClassBodyDeclarationsopt();
 			break;
 
-    case 679 : if (DEBUG) { System.out.println("ClassBodyDeclarationsopt ::= NestedType..."); }  //$NON-NLS-1$
+    case 692 : if (DEBUG) { System.out.println("ClassBodyDeclarationsopt ::= NestedType..."); }  //$NON-NLS-1$
 		    consumeClassBodyDeclarationsopt();
 			break;
 
-     case 680 : if (DEBUG) { System.out.println("Modifiersopt ::="); }  //$NON-NLS-1$
+     case 693 : if (DEBUG) { System.out.println("Modifiersopt ::="); }  //$NON-NLS-1$
 		    consumeDefaultModifiers();
 			break;
 
-    case 681 : if (DEBUG) { System.out.println("Modifiersopt ::= Modifiers"); }  //$NON-NLS-1$
+    case 694 : if (DEBUG) { System.out.println("Modifiersopt ::= Modifiers"); }  //$NON-NLS-1$
 		    consumeModifiers();
 			break;
 
-    case 682 : if (DEBUG) { System.out.println("BlockStatementsopt ::="); }  //$NON-NLS-1$
+    case 695 : if (DEBUG) { System.out.println("BlockStatementsopt ::="); }  //$NON-NLS-1$
 		    consumeEmptyBlockStatementsopt();
 			break;
 
-     case 684 : if (DEBUG) { System.out.println("Dimsopt ::="); }  //$NON-NLS-1$
+     case 697 : if (DEBUG) { System.out.println("Dimsopt ::="); }  //$NON-NLS-1$
 		    consumeEmptyDimsopt();
 			break;
 
-     case 686 : if (DEBUG) { System.out.println("ArgumentListopt ::="); }  //$NON-NLS-1$
+     case 699 : if (DEBUG) { System.out.println("ArgumentListopt ::="); }  //$NON-NLS-1$
 		    consumeEmptyArgumentListopt();
 			break;
 
-    case 690 : if (DEBUG) { System.out.println("FormalParameterListopt ::="); }  //$NON-NLS-1$
+    case 703 : if (DEBUG) { System.out.println("FormalParameterListopt ::="); }  //$NON-NLS-1$
 		    consumeFormalParameterListopt();
 			break;
 
-    case 697 : if (DEBUG) { System.out.println("ClassHeaderPermittedSubclasses ::=..."); }  //$NON-NLS-1$
+    case 710 : if (DEBUG) { System.out.println("ClassHeaderPermittedSubclasses ::=..."); }  //$NON-NLS-1$
 		    consumeClassHeaderPermittedSubclasses();
 			break;
 
-    case 700 : if (DEBUG) { System.out.println("InterfaceHeaderPermittedSubClassesAndSubInterfaces ::="); }  //$NON-NLS-1$
+    case 713 : if (DEBUG) { System.out.println("InterfaceHeaderPermittedSubClassesAndSubInterfaces ::="); }  //$NON-NLS-1$
 		    consumeInterfaceHeaderPermittedSubClassesAndSubInterfaces();
 			break;
 
-     case 701 : if (DEBUG) { System.out.println("InterfaceMemberDeclarationsopt ::="); }  //$NON-NLS-1$
+     case 714 : if (DEBUG) { System.out.println("InterfaceMemberDeclarationsopt ::="); }  //$NON-NLS-1$
 		    consumeEmptyInterfaceMemberDeclarationsopt();
 			break;
 
-     case 702 : if (DEBUG) { System.out.println("InterfaceMemberDeclarationsopt ::= NestedType..."); }  //$NON-NLS-1$
+     case 715 : if (DEBUG) { System.out.println("InterfaceMemberDeclarationsopt ::= NestedType..."); }  //$NON-NLS-1$
 		    consumeInterfaceMemberDeclarationsopt();
 			break;
 
-    case 703 : if (DEBUG) { System.out.println("NestedType ::="); }  //$NON-NLS-1$
+    case 716 : if (DEBUG) { System.out.println("NestedType ::="); }  //$NON-NLS-1$
 		    consumeNestedType();
 			break;
 
-     case 704 : if (DEBUG) { System.out.println("ForInitopt ::="); }  //$NON-NLS-1$
+     case 717 : if (DEBUG) { System.out.println("ForInitopt ::="); }  //$NON-NLS-1$
 		    consumeEmptyForInitopt();
 			break;
 
-     case 706 : if (DEBUG) { System.out.println("ForUpdateopt ::="); }  //$NON-NLS-1$
+     case 719 : if (DEBUG) { System.out.println("ForUpdateopt ::="); }  //$NON-NLS-1$
 		    consumeEmptyForUpdateopt();
 			break;
 
-     case 710 : if (DEBUG) { System.out.println("Catchesopt ::="); }  //$NON-NLS-1$
+     case 723 : if (DEBUG) { System.out.println("Catchesopt ::="); }  //$NON-NLS-1$
 		    consumeEmptyCatchesopt();
 			break;
 
-     case 712 : if (DEBUG) { System.out.println("EnumDeclaration ::= EnumHeader EnumBody"); }  //$NON-NLS-1$
+     case 725 : if (DEBUG) { System.out.println("EnumDeclaration ::= EnumHeader EnumBody"); }  //$NON-NLS-1$
 		    consumeEnumDeclaration();
 			break;
 
-     case 713 : if (DEBUG) { System.out.println("EnumHeader ::= EnumHeaderName ClassHeaderImplementsopt"); }  //$NON-NLS-1$
+     case 726 : if (DEBUG) { System.out.println("EnumHeader ::= EnumHeaderName ClassHeaderImplementsopt"); }  //$NON-NLS-1$
 		    consumeEnumHeader();
 			break;
 
-     case 714 : if (DEBUG) { System.out.println("EnumHeaderName ::= Modifiersopt enum Identifier"); }  //$NON-NLS-1$
+     case 727 : if (DEBUG) { System.out.println("EnumHeaderName ::= Modifiersopt enum Identifier"); }  //$NON-NLS-1$
 		    consumeEnumHeaderName();
 			break;
 
-     case 715 : if (DEBUG) { System.out.println("EnumHeaderName ::= Modifiersopt enum Identifier..."); }  //$NON-NLS-1$
+     case 728 : if (DEBUG) { System.out.println("EnumHeaderName ::= Modifiersopt enum Identifier..."); }  //$NON-NLS-1$
 		    consumeEnumHeaderNameWithTypeParameters();
 			break;
 
-     case 716 : if (DEBUG) { System.out.println("EnumBody ::= LBRACE EnumBodyDeclarationsopt RBRACE"); }  //$NON-NLS-1$
+     case 729 : if (DEBUG) { System.out.println("EnumBody ::= LBRACE EnumBodyDeclarationsopt RBRACE"); }  //$NON-NLS-1$
 		    consumeEnumBodyNoConstants();
 			break;
 
-     case 717 : if (DEBUG) { System.out.println("EnumBody ::= LBRACE COMMA EnumBodyDeclarationsopt..."); }  //$NON-NLS-1$
+     case 730 : if (DEBUG) { System.out.println("EnumBody ::= LBRACE COMMA EnumBodyDeclarationsopt..."); }  //$NON-NLS-1$
 		    consumeEnumBodyNoConstants();
 			break;
 
-     case 718 : if (DEBUG) { System.out.println("EnumBody ::= LBRACE EnumConstants COMMA..."); }  //$NON-NLS-1$
+     case 731 : if (DEBUG) { System.out.println("EnumBody ::= LBRACE EnumConstants COMMA..."); }  //$NON-NLS-1$
 		    consumeEnumBodyWithConstants();
 			break;
 
-     case 719 : if (DEBUG) { System.out.println("EnumBody ::= LBRACE EnumConstants..."); }  //$NON-NLS-1$
+     case 732 : if (DEBUG) { System.out.println("EnumBody ::= LBRACE EnumConstants..."); }  //$NON-NLS-1$
 		    consumeEnumBodyWithConstants();
 			break;
 
-    case 721 : if (DEBUG) { System.out.println("EnumConstants ::= EnumConstants COMMA EnumConstant"); }  //$NON-NLS-1$
+    case 734 : if (DEBUG) { System.out.println("EnumConstants ::= EnumConstants COMMA EnumConstant"); }  //$NON-NLS-1$
 		    consumeEnumConstants();
 			break;
 
-    case 722 : if (DEBUG) { System.out.println("EnumConstantHeaderName ::= Modifiersopt Identifier"); }  //$NON-NLS-1$
+    case 735 : if (DEBUG) { System.out.println("EnumConstantHeaderName ::= Modifiersopt Identifier"); }  //$NON-NLS-1$
 		    consumeEnumConstantHeaderName();
 			break;
 
-    case 723 : if (DEBUG) { System.out.println("EnumConstantHeader ::= EnumConstantHeaderName..."); }  //$NON-NLS-1$
+    case 736 : if (DEBUG) { System.out.println("EnumConstantHeader ::= EnumConstantHeaderName..."); }  //$NON-NLS-1$
 		    consumeEnumConstantHeader();
 			break;
 
-    case 724 : if (DEBUG) { System.out.println("EnumConstant ::= EnumConstantHeader ForceNoDiet..."); }  //$NON-NLS-1$
+    case 737 : if (DEBUG) { System.out.println("EnumConstant ::= EnumConstantHeader ForceNoDiet..."); }  //$NON-NLS-1$
 		    consumeEnumConstantWithClassBody();
 			break;
 
-    case 725 : if (DEBUG) { System.out.println("EnumConstant ::= EnumConstantHeader"); }  //$NON-NLS-1$
+    case 738 : if (DEBUG) { System.out.println("EnumConstant ::= EnumConstantHeader"); }  //$NON-NLS-1$
 		    consumeEnumConstantNoClassBody();
 			break;
 
-    case 726 : if (DEBUG) { System.out.println("Arguments ::= LPAREN ArgumentListopt RPAREN"); }  //$NON-NLS-1$
+    case 739 : if (DEBUG) { System.out.println("Arguments ::= LPAREN ArgumentListopt RPAREN"); }  //$NON-NLS-1$
 		    consumeArguments();
 			break;
 
-    case 727 : if (DEBUG) { System.out.println("Argumentsopt ::="); }  //$NON-NLS-1$
+    case 740 : if (DEBUG) { System.out.println("Argumentsopt ::="); }  //$NON-NLS-1$
 		    consumeEmptyArguments();
 			break;
 
-    case 729 : if (DEBUG) { System.out.println("EnumDeclarations ::= SEMICOLON ClassBodyDeclarationsopt"); }  //$NON-NLS-1$
+    case 742 : if (DEBUG) { System.out.println("EnumDeclarations ::= SEMICOLON ClassBodyDeclarationsopt"); }  //$NON-NLS-1$
 		    consumeEnumDeclarations();
 			break;
 
-    case 730 : if (DEBUG) { System.out.println("EnumBodyDeclarationsopt ::="); }  //$NON-NLS-1$
+    case 743 : if (DEBUG) { System.out.println("EnumBodyDeclarationsopt ::="); }  //$NON-NLS-1$
 		    consumeEmptyEnumDeclarations();
 			break;
 
-    case 732 : if (DEBUG) { System.out.println("EnhancedForStatement ::= EnhancedForStatementHeader..."); }  //$NON-NLS-1$
+    case 745 : if (DEBUG) { System.out.println("EnhancedForStatement ::= EnhancedForStatementHeader..."); }  //$NON-NLS-1$
 		    consumeEnhancedForStatement();
 			break;
 
-    case 733 : if (DEBUG) { System.out.println("EnhancedForStatementNoShortIf ::=..."); }  //$NON-NLS-1$
+    case 746 : if (DEBUG) { System.out.println("EnhancedForStatementNoShortIf ::=..."); }  //$NON-NLS-1$
 		    consumeEnhancedForStatement();
 			break;
 
-    case 734 : if (DEBUG) { System.out.println("EnhancedForStatementHeaderInit ::= for LPAREN Type..."); }  //$NON-NLS-1$
+    case 747 : if (DEBUG) { System.out.println("EnhancedForStatementHeaderInit ::= for LPAREN Type..."); }  //$NON-NLS-1$
 		    consumeEnhancedForStatementHeaderInit(false);
 			break;
 
-    case 735 : if (DEBUG) { System.out.println("EnhancedForStatementHeaderInit ::= for LPAREN Modifiers"); }  //$NON-NLS-1$
+    case 748 : if (DEBUG) { System.out.println("EnhancedForStatementHeaderInit ::= for LPAREN Modifiers"); }  //$NON-NLS-1$
 		    consumeEnhancedForStatementHeaderInit(true);
 			break;
 
-    case 736 : if (DEBUG) { System.out.println("EnhancedForStatementHeader ::=..."); }  //$NON-NLS-1$
+    case 749 : if (DEBUG) { System.out.println("EnhancedForStatementHeader ::=..."); }  //$NON-NLS-1$
 		    consumeEnhancedForStatementHeader();
 			break;
 
-    case 737 : if (DEBUG) { System.out.println("SingleStaticImportDeclaration ::=..."); }  //$NON-NLS-1$
+    case 750 : if (DEBUG) { System.out.println("SingleStaticImportDeclaration ::=..."); }  //$NON-NLS-1$
 		    consumeImportDeclaration();
 			break;
 
-    case 738 : if (DEBUG) { System.out.println("SingleStaticImportDeclarationName ::= import static Name"); }  //$NON-NLS-1$
+    case 751 : if (DEBUG) { System.out.println("SingleStaticImportDeclarationName ::= import static Name"); }  //$NON-NLS-1$
 		    consumeSingleStaticImportDeclarationName();
 			break;
 
-    case 739 : if (DEBUG) { System.out.println("StaticImportOnDemandDeclaration ::=..."); }  //$NON-NLS-1$
+    case 752 : if (DEBUG) { System.out.println("StaticImportOnDemandDeclaration ::=..."); }  //$NON-NLS-1$
 		    consumeImportDeclaration();
 			break;
 
-    case 740 : if (DEBUG) { System.out.println("StaticImportOnDemandDeclarationName ::= import static..."); }  //$NON-NLS-1$
+    case 753 : if (DEBUG) { System.out.println("StaticImportOnDemandDeclarationName ::= import static..."); }  //$NON-NLS-1$
 		    consumeStaticImportOnDemandDeclarationName();
 			break;
 
-    case 741 : if (DEBUG) { System.out.println("TypeArguments ::= LESS TypeArgumentList1"); }  //$NON-NLS-1$
+    case 754 : if (DEBUG) { System.out.println("TypeArguments ::= LESS TypeArgumentList1"); }  //$NON-NLS-1$
 		    consumeTypeArguments();
 			break;
 
-    case 742 : if (DEBUG) { System.out.println("OnlyTypeArguments ::= LESS TypeArgumentList1"); }  //$NON-NLS-1$
+    case 755 : if (DEBUG) { System.out.println("OnlyTypeArguments ::= LESS TypeArgumentList1"); }  //$NON-NLS-1$
 		    consumeOnlyTypeArguments();
 			break;
 
-    case 744 : if (DEBUG) { System.out.println("TypeArgumentList1 ::= TypeArgumentList COMMA..."); }  //$NON-NLS-1$
+    case 757 : if (DEBUG) { System.out.println("TypeArgumentList1 ::= TypeArgumentList COMMA..."); }  //$NON-NLS-1$
 		    consumeTypeArgumentList1();
 			break;
 
-    case 746 : if (DEBUG) { System.out.println("TypeArgumentList ::= TypeArgumentList COMMA TypeArgument"); }  //$NON-NLS-1$
+    case 759 : if (DEBUG) { System.out.println("TypeArgumentList ::= TypeArgumentList COMMA TypeArgument"); }  //$NON-NLS-1$
 		    consumeTypeArgumentList();
 			break;
 
-    case 747 : if (DEBUG) { System.out.println("TypeArgument ::= ReferenceType"); }  //$NON-NLS-1$
+    case 760 : if (DEBUG) { System.out.println("TypeArgument ::= ReferenceType"); }  //$NON-NLS-1$
 		    consumeTypeArgument();
 			break;
 
-    case 751 : if (DEBUG) { System.out.println("ReferenceType1 ::= ReferenceType GREATER"); }  //$NON-NLS-1$
+    case 764 : if (DEBUG) { System.out.println("ReferenceType1 ::= ReferenceType GREATER"); }  //$NON-NLS-1$
 		    consumeReferenceType1();
 			break;
 
-    case 752 : if (DEBUG) { System.out.println("ReferenceType1 ::= ClassOrInterface LESS..."); }  //$NON-NLS-1$
+    case 765 : if (DEBUG) { System.out.println("ReferenceType1 ::= ClassOrInterface LESS..."); }  //$NON-NLS-1$
 		    consumeTypeArgumentReferenceType1();
 			break;
 
-    case 754 : if (DEBUG) { System.out.println("TypeArgumentList2 ::= TypeArgumentList COMMA..."); }  //$NON-NLS-1$
+    case 767 : if (DEBUG) { System.out.println("TypeArgumentList2 ::= TypeArgumentList COMMA..."); }  //$NON-NLS-1$
 		    consumeTypeArgumentList2();
 			break;
 
-    case 757 : if (DEBUG) { System.out.println("ReferenceType2 ::= ReferenceType RIGHT_SHIFT"); }  //$NON-NLS-1$
+    case 770 : if (DEBUG) { System.out.println("ReferenceType2 ::= ReferenceType RIGHT_SHIFT"); }  //$NON-NLS-1$
 		    consumeReferenceType2();
 			break;
 
-    case 758 : if (DEBUG) { System.out.println("ReferenceType2 ::= ClassOrInterface LESS..."); }  //$NON-NLS-1$
+    case 771 : if (DEBUG) { System.out.println("ReferenceType2 ::= ClassOrInterface LESS..."); }  //$NON-NLS-1$
 		    consumeTypeArgumentReferenceType2();
 			break;
 
-    case 760 : if (DEBUG) { System.out.println("TypeArgumentList3 ::= TypeArgumentList COMMA..."); }  //$NON-NLS-1$
+    case 773 : if (DEBUG) { System.out.println("TypeArgumentList3 ::= TypeArgumentList COMMA..."); }  //$NON-NLS-1$
 		    consumeTypeArgumentList3();
 			break;
 
-    case 763 : if (DEBUG) { System.out.println("ReferenceType3 ::= ReferenceType UNSIGNED_RIGHT_SHIFT"); }  //$NON-NLS-1$
+    case 776 : if (DEBUG) { System.out.println("ReferenceType3 ::= ReferenceType UNSIGNED_RIGHT_SHIFT"); }  //$NON-NLS-1$
 		    consumeReferenceType3();
 			break;
 
-    case 764 : if (DEBUG) { System.out.println("Wildcard ::= TypeAnnotationsopt QUESTION"); }  //$NON-NLS-1$
+    case 777 : if (DEBUG) { System.out.println("Wildcard ::= TypeAnnotationsopt QUESTION"); }  //$NON-NLS-1$
 		    consumeWildcard();
 			break;
 
-    case 765 : if (DEBUG) { System.out.println("Wildcard ::= TypeAnnotationsopt QUESTION WildcardBounds"); }  //$NON-NLS-1$
+    case 778 : if (DEBUG) { System.out.println("Wildcard ::= TypeAnnotationsopt QUESTION WildcardBounds"); }  //$NON-NLS-1$
 		    consumeWildcardWithBounds();
 			break;
 
-    case 766 : if (DEBUG) { System.out.println("WildcardBounds ::= extends ReferenceType"); }  //$NON-NLS-1$
+    case 779 : if (DEBUG) { System.out.println("WildcardBounds ::= extends ReferenceType"); }  //$NON-NLS-1$
 		    consumeWildcardBoundsExtends();
 			break;
 
-    case 767 : if (DEBUG) { System.out.println("WildcardBounds ::= super ReferenceType"); }  //$NON-NLS-1$
+    case 780 : if (DEBUG) { System.out.println("WildcardBounds ::= super ReferenceType"); }  //$NON-NLS-1$
 		    consumeWildcardBoundsSuper();
 			break;
 
-    case 768 : if (DEBUG) { System.out.println("Wildcard1 ::= TypeAnnotationsopt QUESTION GREATER"); }  //$NON-NLS-1$
+    case 781 : if (DEBUG) { System.out.println("Wildcard1 ::= TypeAnnotationsopt QUESTION GREATER"); }  //$NON-NLS-1$
 		    consumeWildcard1();
 			break;
 
-    case 769 : if (DEBUG) { System.out.println("Wildcard1 ::= TypeAnnotationsopt QUESTION..."); }  //$NON-NLS-1$
+    case 782 : if (DEBUG) { System.out.println("Wildcard1 ::= TypeAnnotationsopt QUESTION..."); }  //$NON-NLS-1$
 		    consumeWildcard1WithBounds();
 			break;
 
-    case 770 : if (DEBUG) { System.out.println("WildcardBounds1 ::= extends ReferenceType1"); }  //$NON-NLS-1$
+    case 783 : if (DEBUG) { System.out.println("WildcardBounds1 ::= extends ReferenceType1"); }  //$NON-NLS-1$
 		    consumeWildcardBounds1Extends();
 			break;
 
-    case 771 : if (DEBUG) { System.out.println("WildcardBounds1 ::= super ReferenceType1"); }  //$NON-NLS-1$
+    case 784 : if (DEBUG) { System.out.println("WildcardBounds1 ::= super ReferenceType1"); }  //$NON-NLS-1$
 		    consumeWildcardBounds1Super();
 			break;
 
-    case 772 : if (DEBUG) { System.out.println("Wildcard2 ::= TypeAnnotationsopt QUESTION RIGHT_SHIFT"); }  //$NON-NLS-1$
+    case 785 : if (DEBUG) { System.out.println("Wildcard2 ::= TypeAnnotationsopt QUESTION RIGHT_SHIFT"); }  //$NON-NLS-1$
 		    consumeWildcard2();
 			break;
 
-    case 773 : if (DEBUG) { System.out.println("Wildcard2 ::= TypeAnnotationsopt QUESTION..."); }  //$NON-NLS-1$
+    case 786 : if (DEBUG) { System.out.println("Wildcard2 ::= TypeAnnotationsopt QUESTION..."); }  //$NON-NLS-1$
 		    consumeWildcard2WithBounds();
 			break;
 
-    case 774 : if (DEBUG) { System.out.println("WildcardBounds2 ::= extends ReferenceType2"); }  //$NON-NLS-1$
+    case 787 : if (DEBUG) { System.out.println("WildcardBounds2 ::= extends ReferenceType2"); }  //$NON-NLS-1$
 		    consumeWildcardBounds2Extends();
 			break;
 
-    case 775 : if (DEBUG) { System.out.println("WildcardBounds2 ::= super ReferenceType2"); }  //$NON-NLS-1$
+    case 788 : if (DEBUG) { System.out.println("WildcardBounds2 ::= super ReferenceType2"); }  //$NON-NLS-1$
 		    consumeWildcardBounds2Super();
 			break;
 
-    case 776 : if (DEBUG) { System.out.println("Wildcard3 ::= TypeAnnotationsopt QUESTION..."); }  //$NON-NLS-1$
+    case 789 : if (DEBUG) { System.out.println("Wildcard3 ::= TypeAnnotationsopt QUESTION..."); }  //$NON-NLS-1$
 		    consumeWildcard3();
 			break;
 
-    case 777 : if (DEBUG) { System.out.println("Wildcard3 ::= TypeAnnotationsopt QUESTION..."); }  //$NON-NLS-1$
+    case 790 : if (DEBUG) { System.out.println("Wildcard3 ::= TypeAnnotationsopt QUESTION..."); }  //$NON-NLS-1$
 		    consumeWildcard3WithBounds();
 			break;
 
-    case 778 : if (DEBUG) { System.out.println("WildcardBounds3 ::= extends ReferenceType3"); }  //$NON-NLS-1$
+    case 791 : if (DEBUG) { System.out.println("WildcardBounds3 ::= extends ReferenceType3"); }  //$NON-NLS-1$
 		    consumeWildcardBounds3Extends();
 			break;
 
-    case 779 : if (DEBUG) { System.out.println("WildcardBounds3 ::= super ReferenceType3"); }  //$NON-NLS-1$
+    case 792 : if (DEBUG) { System.out.println("WildcardBounds3 ::= super ReferenceType3"); }  //$NON-NLS-1$
 		    consumeWildcardBounds3Super();
 			break;
 
-    case 780 : if (DEBUG) { System.out.println("TypeParameterHeader ::= TypeAnnotationsopt Identifier"); }  //$NON-NLS-1$
+    case 793 : if (DEBUG) { System.out.println("TypeParameterHeader ::= TypeAnnotationsopt Identifier"); }  //$NON-NLS-1$
 		    consumeTypeParameterHeader();
 			break;
 
-    case 781 : if (DEBUG) { System.out.println("TypeParameters ::= LESS TypeParameterList1"); }  //$NON-NLS-1$
+    case 794 : if (DEBUG) { System.out.println("TypeParameters ::= LESS TypeParameterList1"); }  //$NON-NLS-1$
 		    consumeTypeParameters();
 			break;
 
-    case 783 : if (DEBUG) { System.out.println("TypeParameterList ::= TypeParameterList COMMA..."); }  //$NON-NLS-1$
+    case 796 : if (DEBUG) { System.out.println("TypeParameterList ::= TypeParameterList COMMA..."); }  //$NON-NLS-1$
 		    consumeTypeParameterList();
 			break;
 
-    case 785 : if (DEBUG) { System.out.println("TypeParameter ::= TypeParameterHeader extends..."); }  //$NON-NLS-1$
+    case 798 : if (DEBUG) { System.out.println("TypeParameter ::= TypeParameterHeader extends..."); }  //$NON-NLS-1$
 		    consumeTypeParameterWithExtends();
 			break;
 
-    case 786 : if (DEBUG) { System.out.println("TypeParameter ::= TypeParameterHeader extends..."); }  //$NON-NLS-1$
+    case 799 : if (DEBUG) { System.out.println("TypeParameter ::= TypeParameterHeader extends..."); }  //$NON-NLS-1$
 		    consumeTypeParameterWithExtendsAndBounds();
 			break;
 
-    case 788 : if (DEBUG) { System.out.println("AdditionalBoundList ::= AdditionalBoundList..."); }  //$NON-NLS-1$
+    case 801 : if (DEBUG) { System.out.println("AdditionalBoundList ::= AdditionalBoundList..."); }  //$NON-NLS-1$
 		    consumeAdditionalBoundList();
 			break;
 
-    case 789 : if (DEBUG) { System.out.println("AdditionalBound ::= AND ReferenceType"); }  //$NON-NLS-1$
+    case 802 : if (DEBUG) { System.out.println("AdditionalBound ::= AND ReferenceType"); }  //$NON-NLS-1$
 		    consumeAdditionalBound();
 			break;
 
-    case 791 : if (DEBUG) { System.out.println("TypeParameterList1 ::= TypeParameterList COMMA..."); }  //$NON-NLS-1$
+    case 804 : if (DEBUG) { System.out.println("TypeParameterList1 ::= TypeParameterList COMMA..."); }  //$NON-NLS-1$
 		    consumeTypeParameterList1();
 			break;
 
-    case 792 : if (DEBUG) { System.out.println("TypeParameter1 ::= TypeParameterHeader GREATER"); }  //$NON-NLS-1$
+    case 805 : if (DEBUG) { System.out.println("TypeParameter1 ::= TypeParameterHeader GREATER"); }  //$NON-NLS-1$
 		    consumeTypeParameter1();
 			break;
 
-    case 793 : if (DEBUG) { System.out.println("TypeParameter1 ::= TypeParameterHeader extends..."); }  //$NON-NLS-1$
+    case 806 : if (DEBUG) { System.out.println("TypeParameter1 ::= TypeParameterHeader extends..."); }  //$NON-NLS-1$
 		    consumeTypeParameter1WithExtends();
 			break;
 
-    case 794 : if (DEBUG) { System.out.println("TypeParameter1 ::= TypeParameterHeader extends..."); }  //$NON-NLS-1$
+    case 807 : if (DEBUG) { System.out.println("TypeParameter1 ::= TypeParameterHeader extends..."); }  //$NON-NLS-1$
 		    consumeTypeParameter1WithExtendsAndBounds();
 			break;
 
-    case 796 : if (DEBUG) { System.out.println("AdditionalBoundList1 ::= AdditionalBoundList..."); }  //$NON-NLS-1$
+    case 809 : if (DEBUG) { System.out.println("AdditionalBoundList1 ::= AdditionalBoundList..."); }  //$NON-NLS-1$
 		    consumeAdditionalBoundList1();
 			break;
 
-    case 797 : if (DEBUG) { System.out.println("AdditionalBound1 ::= AND ReferenceType1"); }  //$NON-NLS-1$
+    case 810 : if (DEBUG) { System.out.println("AdditionalBound1 ::= AND ReferenceType1"); }  //$NON-NLS-1$
 		    consumeAdditionalBound1();
 			break;
 
-    case 803 : if (DEBUG) { System.out.println("UnaryExpression_NotName ::= PLUS PushPosition..."); }  //$NON-NLS-1$
+    case 816 : if (DEBUG) { System.out.println("UnaryExpression_NotName ::= PLUS PushPosition..."); }  //$NON-NLS-1$
 		    consumeUnaryExpression(OperatorIds.PLUS);
 			break;
 
-    case 804 : if (DEBUG) { System.out.println("UnaryExpression_NotName ::= MINUS PushPosition..."); }  //$NON-NLS-1$
+    case 817 : if (DEBUG) { System.out.println("UnaryExpression_NotName ::= MINUS PushPosition..."); }  //$NON-NLS-1$
 		    consumeUnaryExpression(OperatorIds.MINUS);
 			break;
 
-    case 807 : if (DEBUG) { System.out.println("UnaryExpressionNotPlusMinus_NotName ::= TWIDDLE..."); }  //$NON-NLS-1$
+    case 820 : if (DEBUG) { System.out.println("UnaryExpressionNotPlusMinus_NotName ::= TWIDDLE..."); }  //$NON-NLS-1$
 		    consumeUnaryExpression(OperatorIds.TWIDDLE);
 			break;
 
-    case 808 : if (DEBUG) { System.out.println("UnaryExpressionNotPlusMinus_NotName ::= NOT PushPosition"); }  //$NON-NLS-1$
+    case 821 : if (DEBUG) { System.out.println("UnaryExpressionNotPlusMinus_NotName ::= NOT PushPosition"); }  //$NON-NLS-1$
 		    consumeUnaryExpression(OperatorIds.NOT);
 			break;
 
-    case 811 : if (DEBUG) { System.out.println("MultiplicativeExpression_NotName ::=..."); }  //$NON-NLS-1$
+    case 824 : if (DEBUG) { System.out.println("MultiplicativeExpression_NotName ::=..."); }  //$NON-NLS-1$
 		    consumeBinaryExpression(OperatorIds.MULTIPLY);
 			break;
 
-    case 812 : if (DEBUG) { System.out.println("MultiplicativeExpression_NotName ::= Name MULTIPLY..."); }  //$NON-NLS-1$
+    case 825 : if (DEBUG) { System.out.println("MultiplicativeExpression_NotName ::= Name MULTIPLY..."); }  //$NON-NLS-1$
 		    consumeBinaryExpressionWithName(OperatorIds.MULTIPLY);
 			break;
 
-    case 813 : if (DEBUG) { System.out.println("MultiplicativeExpression_NotName ::=..."); }  //$NON-NLS-1$
+    case 826 : if (DEBUG) { System.out.println("MultiplicativeExpression_NotName ::=..."); }  //$NON-NLS-1$
 		    consumeBinaryExpression(OperatorIds.DIVIDE);
 			break;
 
-    case 814 : if (DEBUG) { System.out.println("MultiplicativeExpression_NotName ::= Name DIVIDE..."); }  //$NON-NLS-1$
+    case 827 : if (DEBUG) { System.out.println("MultiplicativeExpression_NotName ::= Name DIVIDE..."); }  //$NON-NLS-1$
 		    consumeBinaryExpressionWithName(OperatorIds.DIVIDE);
 			break;
 
-    case 815 : if (DEBUG) { System.out.println("MultiplicativeExpression_NotName ::=..."); }  //$NON-NLS-1$
+    case 828 : if (DEBUG) { System.out.println("MultiplicativeExpression_NotName ::=..."); }  //$NON-NLS-1$
 		    consumeBinaryExpression(OperatorIds.REMAINDER);
 			break;
 
-    case 816 : if (DEBUG) { System.out.println("MultiplicativeExpression_NotName ::= Name REMAINDER..."); }  //$NON-NLS-1$
+    case 829 : if (DEBUG) { System.out.println("MultiplicativeExpression_NotName ::= Name REMAINDER..."); }  //$NON-NLS-1$
 		    consumeBinaryExpressionWithName(OperatorIds.REMAINDER);
 			break;
 
-    case 818 : if (DEBUG) { System.out.println("AdditiveExpression_NotName ::=..."); }  //$NON-NLS-1$
+    case 831 : if (DEBUG) { System.out.println("AdditiveExpression_NotName ::=..."); }  //$NON-NLS-1$
 		    consumeBinaryExpression(OperatorIds.PLUS);
 			break;
 
-    case 819 : if (DEBUG) { System.out.println("AdditiveExpression_NotName ::= Name PLUS..."); }  //$NON-NLS-1$
+    case 832 : if (DEBUG) { System.out.println("AdditiveExpression_NotName ::= Name PLUS..."); }  //$NON-NLS-1$
 		    consumeBinaryExpressionWithName(OperatorIds.PLUS);
 			break;
 
-    case 820 : if (DEBUG) { System.out.println("AdditiveExpression_NotName ::=..."); }  //$NON-NLS-1$
+    case 833 : if (DEBUG) { System.out.println("AdditiveExpression_NotName ::=..."); }  //$NON-NLS-1$
 		    consumeBinaryExpression(OperatorIds.MINUS);
 			break;
 
-    case 821 : if (DEBUG) { System.out.println("AdditiveExpression_NotName ::= Name MINUS..."); }  //$NON-NLS-1$
+    case 834 : if (DEBUG) { System.out.println("AdditiveExpression_NotName ::= Name MINUS..."); }  //$NON-NLS-1$
 		    consumeBinaryExpressionWithName(OperatorIds.MINUS);
 			break;
 
-    case 823 : if (DEBUG) { System.out.println("ShiftExpression_NotName ::= ShiftExpression_NotName..."); }  //$NON-NLS-1$
+    case 836 : if (DEBUG) { System.out.println("ShiftExpression_NotName ::= ShiftExpression_NotName..."); }  //$NON-NLS-1$
 		    consumeBinaryExpression(OperatorIds.LEFT_SHIFT);
 			break;
 
-    case 824 : if (DEBUG) { System.out.println("ShiftExpression_NotName ::= Name LEFT_SHIFT..."); }  //$NON-NLS-1$
+    case 837 : if (DEBUG) { System.out.println("ShiftExpression_NotName ::= Name LEFT_SHIFT..."); }  //$NON-NLS-1$
 		    consumeBinaryExpressionWithName(OperatorIds.LEFT_SHIFT);
 			break;
 
-    case 825 : if (DEBUG) { System.out.println("ShiftExpression_NotName ::= ShiftExpression_NotName..."); }  //$NON-NLS-1$
+    case 838 : if (DEBUG) { System.out.println("ShiftExpression_NotName ::= ShiftExpression_NotName..."); }  //$NON-NLS-1$
 		    consumeBinaryExpression(OperatorIds.RIGHT_SHIFT);
 			break;
 
-    case 826 : if (DEBUG) { System.out.println("ShiftExpression_NotName ::= Name RIGHT_SHIFT..."); }  //$NON-NLS-1$
+    case 839 : if (DEBUG) { System.out.println("ShiftExpression_NotName ::= Name RIGHT_SHIFT..."); }  //$NON-NLS-1$
 		    consumeBinaryExpressionWithName(OperatorIds.RIGHT_SHIFT);
 			break;
 
-    case 827 : if (DEBUG) { System.out.println("ShiftExpression_NotName ::= ShiftExpression_NotName..."); }  //$NON-NLS-1$
+    case 840 : if (DEBUG) { System.out.println("ShiftExpression_NotName ::= ShiftExpression_NotName..."); }  //$NON-NLS-1$
 		    consumeBinaryExpression(OperatorIds.UNSIGNED_RIGHT_SHIFT);
 			break;
 
-    case 828 : if (DEBUG) { System.out.println("ShiftExpression_NotName ::= Name UNSIGNED_RIGHT_SHIFT..."); }  //$NON-NLS-1$
+    case 841 : if (DEBUG) { System.out.println("ShiftExpression_NotName ::= Name UNSIGNED_RIGHT_SHIFT..."); }  //$NON-NLS-1$
 		    consumeBinaryExpressionWithName(OperatorIds.UNSIGNED_RIGHT_SHIFT);
 			break;
 
-    case 830 : if (DEBUG) { System.out.println("RelationalExpression_NotName ::= ShiftExpression_NotName"); }  //$NON-NLS-1$
+    case 843 : if (DEBUG) { System.out.println("RelationalExpression_NotName ::= ShiftExpression_NotName"); }  //$NON-NLS-1$
 		    consumeBinaryExpression(OperatorIds.LESS);
 			break;
 
-    case 831 : if (DEBUG) { System.out.println("RelationalExpression_NotName ::= Name LESS..."); }  //$NON-NLS-1$
+    case 844 : if (DEBUG) { System.out.println("RelationalExpression_NotName ::= Name LESS..."); }  //$NON-NLS-1$
 		    consumeBinaryExpressionWithName(OperatorIds.LESS);
 			break;
 
-    case 832 : if (DEBUG) { System.out.println("RelationalExpression_NotName ::= ShiftExpression_NotName"); }  //$NON-NLS-1$
+    case 845 : if (DEBUG) { System.out.println("RelationalExpression_NotName ::= ShiftExpression_NotName"); }  //$NON-NLS-1$
 		    consumeBinaryExpression(OperatorIds.GREATER);
 			break;
 
-    case 833 : if (DEBUG) { System.out.println("RelationalExpression_NotName ::= Name GREATER..."); }  //$NON-NLS-1$
+    case 846 : if (DEBUG) { System.out.println("RelationalExpression_NotName ::= Name GREATER..."); }  //$NON-NLS-1$
 		    consumeBinaryExpressionWithName(OperatorIds.GREATER);
 			break;
 
-    case 834 : if (DEBUG) { System.out.println("RelationalExpression_NotName ::=..."); }  //$NON-NLS-1$
+    case 847 : if (DEBUG) { System.out.println("RelationalExpression_NotName ::=..."); }  //$NON-NLS-1$
 		    consumeBinaryExpression(OperatorIds.LESS_EQUAL);
 			break;
 
-    case 835 : if (DEBUG) { System.out.println("RelationalExpression_NotName ::= Name LESS_EQUAL..."); }  //$NON-NLS-1$
+    case 848 : if (DEBUG) { System.out.println("RelationalExpression_NotName ::= Name LESS_EQUAL..."); }  //$NON-NLS-1$
 		    consumeBinaryExpressionWithName(OperatorIds.LESS_EQUAL);
 			break;
 
-    case 836 : if (DEBUG) { System.out.println("RelationalExpression_NotName ::=..."); }  //$NON-NLS-1$
+    case 849 : if (DEBUG) { System.out.println("RelationalExpression_NotName ::=..."); }  //$NON-NLS-1$
 		    consumeBinaryExpression(OperatorIds.GREATER_EQUAL);
 			break;
 
-    case 837 : if (DEBUG) { System.out.println("RelationalExpression_NotName ::= Name GREATER_EQUAL..."); }  //$NON-NLS-1$
+    case 850 : if (DEBUG) { System.out.println("RelationalExpression_NotName ::= Name GREATER_EQUAL..."); }  //$NON-NLS-1$
 		    consumeBinaryExpressionWithName(OperatorIds.GREATER_EQUAL);
 			break;
 
-    case 839 : if (DEBUG) { System.out.println("InstanceofExpression_NotName ::= Name InstanceofRHS"); }  //$NON-NLS-1$
+    case 852 : if (DEBUG) { System.out.println("InstanceofExpression_NotName ::= Name InstanceofRHS"); }  //$NON-NLS-1$
 		    consumeInstanceOfExpressionWithName();
 			break;
 
-    case 840 : if (DEBUG) { System.out.println("InstanceofExpression_NotName ::=..."); }  //$NON-NLS-1$
+    case 853 : if (DEBUG) { System.out.println("InstanceofExpression_NotName ::=..."); }  //$NON-NLS-1$
 		    consumeInstanceOfExpression();
 			break;
 
-    case 842 : if (DEBUG) { System.out.println("EqualityExpression_NotName ::=..."); }  //$NON-NLS-1$
+    case 855 : if (DEBUG) { System.out.println("EqualityExpression_NotName ::=..."); }  //$NON-NLS-1$
 		    consumeEqualityExpression(OperatorIds.EQUAL_EQUAL);
 			break;
 
-    case 843 : if (DEBUG) { System.out.println("EqualityExpression_NotName ::= Name EQUAL_EQUAL..."); }  //$NON-NLS-1$
+    case 856 : if (DEBUG) { System.out.println("EqualityExpression_NotName ::= Name EQUAL_EQUAL..."); }  //$NON-NLS-1$
 		    consumeEqualityExpressionWithName(OperatorIds.EQUAL_EQUAL);
 			break;
 
-    case 844 : if (DEBUG) { System.out.println("EqualityExpression_NotName ::=..."); }  //$NON-NLS-1$
+    case 857 : if (DEBUG) { System.out.println("EqualityExpression_NotName ::=..."); }  //$NON-NLS-1$
 		    consumeEqualityExpression(OperatorIds.NOT_EQUAL);
 			break;
 
-    case 845 : if (DEBUG) { System.out.println("EqualityExpression_NotName ::= Name NOT_EQUAL..."); }  //$NON-NLS-1$
+    case 858 : if (DEBUG) { System.out.println("EqualityExpression_NotName ::= Name NOT_EQUAL..."); }  //$NON-NLS-1$
 		    consumeEqualityExpressionWithName(OperatorIds.NOT_EQUAL);
 			break;
 
-    case 847 : if (DEBUG) { System.out.println("AndExpression_NotName ::= AndExpression_NotName AND..."); }  //$NON-NLS-1$
+    case 860 : if (DEBUG) { System.out.println("AndExpression_NotName ::= AndExpression_NotName AND..."); }  //$NON-NLS-1$
 		    consumeBinaryExpression(OperatorIds.AND);
 			break;
 
-    case 848 : if (DEBUG) { System.out.println("AndExpression_NotName ::= Name AND EqualityExpression"); }  //$NON-NLS-1$
+    case 861 : if (DEBUG) { System.out.println("AndExpression_NotName ::= Name AND EqualityExpression"); }  //$NON-NLS-1$
 		    consumeBinaryExpressionWithName(OperatorIds.AND);
 			break;
 
-    case 850 : if (DEBUG) { System.out.println("ExclusiveOrExpression_NotName ::=..."); }  //$NON-NLS-1$
+    case 863 : if (DEBUG) { System.out.println("ExclusiveOrExpression_NotName ::=..."); }  //$NON-NLS-1$
 		    consumeBinaryExpression(OperatorIds.XOR);
 			break;
 
-    case 851 : if (DEBUG) { System.out.println("ExclusiveOrExpression_NotName ::= Name XOR AndExpression"); }  //$NON-NLS-1$
+    case 864 : if (DEBUG) { System.out.println("ExclusiveOrExpression_NotName ::= Name XOR AndExpression"); }  //$NON-NLS-1$
 		    consumeBinaryExpressionWithName(OperatorIds.XOR);
 			break;
 
-    case 853 : if (DEBUG) { System.out.println("InclusiveOrExpression_NotName ::=..."); }  //$NON-NLS-1$
+    case 866 : if (DEBUG) { System.out.println("InclusiveOrExpression_NotName ::=..."); }  //$NON-NLS-1$
 		    consumeBinaryExpression(OperatorIds.OR);
 			break;
 
-    case 854 : if (DEBUG) { System.out.println("InclusiveOrExpression_NotName ::= Name OR..."); }  //$NON-NLS-1$
+    case 867 : if (DEBUG) { System.out.println("InclusiveOrExpression_NotName ::= Name OR..."); }  //$NON-NLS-1$
 		    consumeBinaryExpressionWithName(OperatorIds.OR);
 			break;
 
-    case 856 : if (DEBUG) { System.out.println("ConditionalAndExpression_NotName ::=..."); }  //$NON-NLS-1$
+    case 869 : if (DEBUG) { System.out.println("ConditionalAndExpression_NotName ::=..."); }  //$NON-NLS-1$
 		    consumeBinaryExpression(OperatorIds.AND_AND);
 			break;
 
-    case 857 : if (DEBUG) { System.out.println("ConditionalAndExpression_NotName ::= Name AND_AND..."); }  //$NON-NLS-1$
+    case 870 : if (DEBUG) { System.out.println("ConditionalAndExpression_NotName ::= Name AND_AND..."); }  //$NON-NLS-1$
 		    consumeBinaryExpressionWithName(OperatorIds.AND_AND);
 			break;
 
-    case 859 : if (DEBUG) { System.out.println("ConditionalOrExpression_NotName ::=..."); }  //$NON-NLS-1$
+    case 872 : if (DEBUG) { System.out.println("ConditionalOrExpression_NotName ::=..."); }  //$NON-NLS-1$
 		    consumeBinaryExpression(OperatorIds.OR_OR);
 			break;
 
-    case 860 : if (DEBUG) { System.out.println("ConditionalOrExpression_NotName ::= Name OR_OR..."); }  //$NON-NLS-1$
+    case 873 : if (DEBUG) { System.out.println("ConditionalOrExpression_NotName ::= Name OR_OR..."); }  //$NON-NLS-1$
 		    consumeBinaryExpressionWithName(OperatorIds.OR_OR);
 			break;
 
-    case 862 : if (DEBUG) { System.out.println("ConditionalExpression_NotName ::=..."); }  //$NON-NLS-1$
+    case 875 : if (DEBUG) { System.out.println("ConditionalExpression_NotName ::=..."); }  //$NON-NLS-1$
 		    consumeConditionalExpression(OperatorIds.QUESTIONCOLON) ;
 			break;
 
-    case 863 : if (DEBUG) { System.out.println("ConditionalExpression_NotName ::= Name QUESTION..."); }  //$NON-NLS-1$
+    case 876 : if (DEBUG) { System.out.println("ConditionalExpression_NotName ::= Name QUESTION..."); }  //$NON-NLS-1$
 		    consumeConditionalExpressionWithName(OperatorIds.QUESTIONCOLON) ;
 			break;
 
-    case 867 : if (DEBUG) { System.out.println("AnnotationTypeDeclarationHeaderName ::= Modifiers AT..."); }  //$NON-NLS-1$
+    case 880 : if (DEBUG) { System.out.println("AnnotationTypeDeclarationHeaderName ::= Modifiers AT..."); }  //$NON-NLS-1$
 		    consumeAnnotationTypeDeclarationHeaderName() ;
 			break;
 
-    case 868 : if (DEBUG) { System.out.println("AnnotationTypeDeclarationHeaderName ::= Modifiers AT..."); }  //$NON-NLS-1$
+    case 881 : if (DEBUG) { System.out.println("AnnotationTypeDeclarationHeaderName ::= Modifiers AT..."); }  //$NON-NLS-1$
 		    consumeAnnotationTypeDeclarationHeaderNameWithTypeParameters() ;
 			break;
 
-    case 869 : if (DEBUG) { System.out.println("AnnotationTypeDeclarationHeaderName ::= AT..."); }  //$NON-NLS-1$
+    case 882 : if (DEBUG) { System.out.println("AnnotationTypeDeclarationHeaderName ::= AT..."); }  //$NON-NLS-1$
 		    consumeAnnotationTypeDeclarationHeaderNameWithTypeParameters() ;
 			break;
 
-    case 870 : if (DEBUG) { System.out.println("AnnotationTypeDeclarationHeaderName ::= AT..."); }  //$NON-NLS-1$
+    case 883 : if (DEBUG) { System.out.println("AnnotationTypeDeclarationHeaderName ::= AT..."); }  //$NON-NLS-1$
 		    consumeAnnotationTypeDeclarationHeaderName() ;
 			break;
 
-    case 871 : if (DEBUG) { System.out.println("AnnotationTypeDeclarationHeader ::=..."); }  //$NON-NLS-1$
+    case 884 : if (DEBUG) { System.out.println("AnnotationTypeDeclarationHeader ::=..."); }  //$NON-NLS-1$
 		    consumeAnnotationTypeDeclarationHeader() ;
 			break;
 
-    case 872 : if (DEBUG) { System.out.println("AnnotationTypeDeclaration ::=..."); }  //$NON-NLS-1$
+    case 885 : if (DEBUG) { System.out.println("AnnotationTypeDeclaration ::=..."); }  //$NON-NLS-1$
 		    consumeAnnotationTypeDeclaration() ;
 			break;
 
-    case 874 : if (DEBUG) { System.out.println("AnnotationTypeMemberDeclarationsopt ::="); }  //$NON-NLS-1$
+    case 887 : if (DEBUG) { System.out.println("AnnotationTypeMemberDeclarationsopt ::="); }  //$NON-NLS-1$
 		    consumeEmptyAnnotationTypeMemberDeclarationsopt() ;
 			break;
 
-    case 875 : if (DEBUG) { System.out.println("AnnotationTypeMemberDeclarationsopt ::= NestedType..."); }  //$NON-NLS-1$
+    case 888 : if (DEBUG) { System.out.println("AnnotationTypeMemberDeclarationsopt ::= NestedType..."); }  //$NON-NLS-1$
 		    consumeAnnotationTypeMemberDeclarationsopt() ;
 			break;
 
-    case 877 : if (DEBUG) { System.out.println("AnnotationTypeMemberDeclarations ::=..."); }  //$NON-NLS-1$
+    case 890 : if (DEBUG) { System.out.println("AnnotationTypeMemberDeclarations ::=..."); }  //$NON-NLS-1$
 		    consumeAnnotationTypeMemberDeclarations() ;
 			break;
 
-    case 878 : if (DEBUG) { System.out.println("AnnotationMethodHeaderName ::= Modifiersopt..."); }  //$NON-NLS-1$
+    case 891 : if (DEBUG) { System.out.println("AnnotationMethodHeaderName ::= Modifiersopt..."); }  //$NON-NLS-1$
 		    consumeMethodHeaderNameWithTypeParameters(true);
 			break;
 
-    case 879 : if (DEBUG) { System.out.println("AnnotationMethodHeaderName ::= Modifiersopt Type..."); }  //$NON-NLS-1$
+    case 892 : if (DEBUG) { System.out.println("AnnotationMethodHeaderName ::= Modifiersopt Type..."); }  //$NON-NLS-1$
 		    consumeMethodHeaderName(true);
 			break;
 
-    case 880 : if (DEBUG) { System.out.println("AnnotationMethodHeaderDefaultValueopt ::="); }  //$NON-NLS-1$
+    case 893 : if (DEBUG) { System.out.println("AnnotationMethodHeaderDefaultValueopt ::="); }  //$NON-NLS-1$
 		    consumeEmptyMethodHeaderDefaultValue() ;
 			break;
 
-    case 881 : if (DEBUG) { System.out.println("AnnotationMethodHeaderDefaultValueopt ::= DefaultValue"); }  //$NON-NLS-1$
+    case 894 : if (DEBUG) { System.out.println("AnnotationMethodHeaderDefaultValueopt ::= DefaultValue"); }  //$NON-NLS-1$
 		    consumeMethodHeaderDefaultValue();
 			break;
 
-    case 882 : if (DEBUG) { System.out.println("AnnotationMethodHeader ::= AnnotationMethodHeaderName..."); }  //$NON-NLS-1$
+    case 895 : if (DEBUG) { System.out.println("AnnotationMethodHeader ::= AnnotationMethodHeaderName..."); }  //$NON-NLS-1$
 		    consumeMethodHeader();
 			break;
 
-    case 883 : if (DEBUG) { System.out.println("AnnotationTypeMemberDeclaration ::=..."); }  //$NON-NLS-1$
+    case 896 : if (DEBUG) { System.out.println("AnnotationTypeMemberDeclaration ::=..."); }  //$NON-NLS-1$
 		    consumeAnnotationTypeMemberDeclaration() ;
 			break;
 
-    case 891 : if (DEBUG) { System.out.println("AnnotationName ::= AT UnannotatableName"); }  //$NON-NLS-1$
+    case 904 : if (DEBUG) { System.out.println("AnnotationName ::= AT UnannotatableName"); }  //$NON-NLS-1$
 		    consumeAnnotationName() ;
 			break;
 
-    case 892 : if (DEBUG) { System.out.println("NormalAnnotation ::= AnnotationName LPAREN..."); }  //$NON-NLS-1$
+    case 905 : if (DEBUG) { System.out.println("NormalAnnotation ::= AnnotationName LPAREN..."); }  //$NON-NLS-1$
 		    consumeNormalAnnotation(false) ;
 			break;
 
-    case 893 : if (DEBUG) { System.out.println("MemberValuePairsopt ::="); }  //$NON-NLS-1$
+    case 906 : if (DEBUG) { System.out.println("MemberValuePairsopt ::="); }  //$NON-NLS-1$
 		    consumeEmptyMemberValuePairsopt() ;
 			break;
 
-    case 896 : if (DEBUG) { System.out.println("MemberValuePairs ::= MemberValuePairs COMMA..."); }  //$NON-NLS-1$
+    case 909 : if (DEBUG) { System.out.println("MemberValuePairs ::= MemberValuePairs COMMA..."); }  //$NON-NLS-1$
 		    consumeMemberValuePairs() ;
 			break;
 
-    case 897 : if (DEBUG) { System.out.println("MemberValuePair ::= SimpleName EQUAL EnterMemberValue..."); }  //$NON-NLS-1$
+    case 910 : if (DEBUG) { System.out.println("MemberValuePair ::= SimpleName EQUAL EnterMemberValue..."); }  //$NON-NLS-1$
 		    consumeMemberValuePair() ;
 			break;
 
-    case 898 : if (DEBUG) { System.out.println("EnterMemberValue ::="); }  //$NON-NLS-1$
+    case 911 : if (DEBUG) { System.out.println("EnterMemberValue ::="); }  //$NON-NLS-1$
 		    consumeEnterMemberValue() ;
 			break;
 
-    case 899 : if (DEBUG) { System.out.println("ExitMemberValue ::="); }  //$NON-NLS-1$
+    case 912 : if (DEBUG) { System.out.println("ExitMemberValue ::="); }  //$NON-NLS-1$
 		    consumeExitMemberValue() ;
 			break;
 
-    case 901 : if (DEBUG) { System.out.println("MemberValue ::= Name"); }  //$NON-NLS-1$
+    case 914 : if (DEBUG) { System.out.println("MemberValue ::= Name"); }  //$NON-NLS-1$
 		    consumeMemberValueAsName() ;
 			break;
 
-    case 904 : if (DEBUG) { System.out.println("MemberValueArrayInitializer ::=..."); }  //$NON-NLS-1$
+    case 917 : if (DEBUG) { System.out.println("MemberValueArrayInitializer ::=..."); }  //$NON-NLS-1$
 		    consumeMemberValueArrayInitializer() ;
 			break;
 
-    case 905 : if (DEBUG) { System.out.println("MemberValueArrayInitializer ::=..."); }  //$NON-NLS-1$
+    case 918 : if (DEBUG) { System.out.println("MemberValueArrayInitializer ::=..."); }  //$NON-NLS-1$
 		    consumeMemberValueArrayInitializer() ;
 			break;
 
-    case 906 : if (DEBUG) { System.out.println("MemberValueArrayInitializer ::=..."); }  //$NON-NLS-1$
+    case 919 : if (DEBUG) { System.out.println("MemberValueArrayInitializer ::=..."); }  //$NON-NLS-1$
 		    consumeEmptyMemberValueArrayInitializer() ;
 			break;
 
-    case 907 : if (DEBUG) { System.out.println("MemberValueArrayInitializer ::=..."); }  //$NON-NLS-1$
+    case 920 : if (DEBUG) { System.out.println("MemberValueArrayInitializer ::=..."); }  //$NON-NLS-1$
 		    consumeEmptyMemberValueArrayInitializer() ;
 			break;
 
-    case 908 : if (DEBUG) { System.out.println("EnterMemberValueArrayInitializer ::="); }  //$NON-NLS-1$
+    case 921 : if (DEBUG) { System.out.println("EnterMemberValueArrayInitializer ::="); }  //$NON-NLS-1$
 		    consumeEnterMemberValueArrayInitializer() ;
 			break;
 
-    case 910 : if (DEBUG) { System.out.println("MemberValues ::= MemberValues COMMA MemberValue"); }  //$NON-NLS-1$
+    case 923 : if (DEBUG) { System.out.println("MemberValues ::= MemberValues COMMA MemberValue"); }  //$NON-NLS-1$
 		    consumeMemberValues() ;
 			break;
 
-    case 911 : if (DEBUG) { System.out.println("MarkerAnnotation ::= AnnotationName"); }  //$NON-NLS-1$
+    case 924 : if (DEBUG) { System.out.println("MarkerAnnotation ::= AnnotationName"); }  //$NON-NLS-1$
 		    consumeMarkerAnnotation(false) ;
 			break;
 
-    case 912 : if (DEBUG) { System.out.println("SingleMemberAnnotationMemberValue ::= MemberValue"); }  //$NON-NLS-1$
+    case 925 : if (DEBUG) { System.out.println("SingleMemberAnnotationMemberValue ::= MemberValue"); }  //$NON-NLS-1$
 		    consumeSingleMemberAnnotationMemberValue() ;
 			break;
 
-    case 913 : if (DEBUG) { System.out.println("SingleMemberAnnotation ::= AnnotationName LPAREN..."); }  //$NON-NLS-1$
+    case 926 : if (DEBUG) { System.out.println("SingleMemberAnnotation ::= AnnotationName LPAREN..."); }  //$NON-NLS-1$
 		    consumeSingleMemberAnnotation(false) ;
 			break;
 
-    case 914 : if (DEBUG) { System.out.println("RecoveryMethodHeaderName ::= Modifiersopt TypeParameters"); }  //$NON-NLS-1$
+    case 927 : if (DEBUG) { System.out.println("RecoveryMethodHeaderName ::= Modifiersopt TypeParameters"); }  //$NON-NLS-1$
 		    consumeRecoveryMethodHeaderNameWithTypeParameters();
 			break;
 
-    case 915 : if (DEBUG) { System.out.println("RecoveryMethodHeaderName ::= Modifiersopt Type..."); }  //$NON-NLS-1$
+    case 928 : if (DEBUG) { System.out.println("RecoveryMethodHeaderName ::= Modifiersopt Type..."); }  //$NON-NLS-1$
 		    consumeRecoveryMethodHeaderName();
 			break;
 
-    case 916 : if (DEBUG) { System.out.println("RecoveryMethodHeaderName ::= ModifiersWithDefault..."); }  //$NON-NLS-1$
+    case 929 : if (DEBUG) { System.out.println("RecoveryMethodHeaderName ::= ModifiersWithDefault..."); }  //$NON-NLS-1$
 		    consumeRecoveryMethodHeaderNameWithTypeParameters();
 			break;
 
-    case 917 : if (DEBUG) { System.out.println("RecoveryMethodHeaderName ::= ModifiersWithDefault Type"); }  //$NON-NLS-1$
+    case 930 : if (DEBUG) { System.out.println("RecoveryMethodHeaderName ::= ModifiersWithDefault Type"); }  //$NON-NLS-1$
 		    consumeRecoveryMethodHeaderName();
 			break;
 
-    case 918 : if (DEBUG) { System.out.println("RecoveryMethodHeader ::= RecoveryMethodHeaderName..."); }  //$NON-NLS-1$
+    case 931 : if (DEBUG) { System.out.println("RecoveryMethodHeader ::= RecoveryMethodHeaderName..."); }  //$NON-NLS-1$
 		    consumeMethodHeader();
 			break;
 
-    case 919 : if (DEBUG) { System.out.println("RecoveryMethodHeader ::= RecoveryMethodHeaderName..."); }  //$NON-NLS-1$
+    case 932 : if (DEBUG) { System.out.println("RecoveryMethodHeader ::= RecoveryMethodHeaderName..."); }  //$NON-NLS-1$
 		    consumeMethodHeader();
 			break;
 
@@ -9674,6 +9722,7 @@
 	//OpenBlock just makes the semantic action blockStart()
 	//the block is inlined but a scope need to be created
 	//if some declaration occurs.
+	Boolean isPatternSwitch = this.recordPatternSwitches.remove(this.switchNestingLevel);
 	this.nestedType--;
 	this.switchNestingLevel--;
 	this.scanner.breakPreviewAllowed = this.switchNestingLevel > 0;
@@ -9691,6 +9740,7 @@
 				length);
 	}
 	switchStatement.explicitDeclarations = this.realBlockStack[this.realBlockPtr--];
+	switchStatement.containsPatterns = isPatternSwitch != null ? isPatternSwitch.booleanValue() : false;
 	pushOnAstStack(switchStatement);
 	switchStatement.blockStart = this.intStack[this.intPtr--];
 	switchStatement.sourceStart = this.intStack[this.intPtr--];
@@ -10067,7 +10117,22 @@
 protected void consumeConstantExpression() {
 	// do nothing for now.
 }
-protected void consumeConstantExpressions() {
+protected void consumeCaseLabelElement(CaseLabelKind kind) {
+	switch (kind) {
+		case CASE_PATTERN:
+			this.astLengthPtr--;
+			Pattern pattern = (Pattern) this.astStack[this.astPtr--];
+			pushOnExpressionStack(pattern);
+			this.recordPatternSwitches.put(this.switchNestingLevel, Boolean.TRUE);
+			break;
+		case CASE_DEFAULT:
+			pushOnExpressionStack(new FakeDefaultLiteral(this.scanner.startPosition, this.scanner.currentPosition - 1));
+			break;
+		default : break;
+	}
+	this.scanner.multiCaseLabelComma = this.currentToken == TerminalTokens.TokenNameCOMMA;
+}
+protected void consumeCaseLabelElements() {
 	concatExpressionLists();
 }
 protected void consumeSwitchLabeledRules() {
@@ -10737,6 +10802,43 @@
 		typeParameter.bits |= (bound.bits & ASTNode.HasTypeAnnotations);
 	}
 }
+protected void consumeGuardedPattern() {
+	this.astLengthPtr--;
+	Pattern pattern = (Pattern) this.astStack[this.astPtr--];
+	Expression expr = this.expressionStack[this.expressionPtr--];
+	this.expressionLengthPtr--;
+	pushOnAstStack(new GuardedPattern(pattern, expr));
+}
+protected void consumeTypePattern() {
+
+	//name
+	char[] identifierName = this.identifierStack[this.identifierPtr];
+	long namePosition = this.identifierPositionStack[this.identifierPtr];
+
+	LocalDeclaration local = createLocalDeclaration(identifierName, (int) (namePosition >>> 32), (int) namePosition);
+	local.declarationSourceEnd = local.declarationEnd;
+	this.identifierPtr--;
+	this.identifierLengthPtr--;
+
+	//type
+	consumeTypeReferenceWithModifiersAndAnnotations();
+	TypeReference type = (TypeReference) this.expressionStack[this.expressionPtr--];
+	this.expressionLengthPtr--;
+
+	// Move annotations from type reference to LocalDeclaration
+	local.annotations = type.annotations != null && type.annotations.length > 0 ? type.annotations[0] : null;
+	type.annotations = null;
+	local.type = type;
+
+	TypePattern aTypePattern = new TypePattern(local);
+	aTypePattern.sourceStart = this.intStack[this.intPtr--];
+	local.modifiers =  this.intStack[this.intPtr--];
+	local.declarationSourceStart = aTypePattern.sourceStart;
+	aTypePattern.sourceEnd = local.sourceEnd;
+
+	problemReporter().validateJavaFeatureSupport(JavaFeature.PATTERN_MATCHING_IN_INSTANCEOF, type.sourceStart, local.declarationEnd);
+	pushOnAstStack(aTypePattern);
+}
 protected void consumeZeroAdditionalBounds() {
 	if (this.currentToken == TokenNameRPAREN)  // Signal zero additional bounds - do this only when the cast type is fully seen (i.e not in error path)
 		pushOnGenericsLengthStack(0);          // Not all stacks are adjusted - this is not meant to be popped by getTypeReference
@@ -12596,12 +12698,14 @@
 	this.nextIgnoredToken = -1;
 	do {
 		try {
+			this.scanner.multiCaseLabelComma = false;
 			this.scanner.lookBack[0] = this.scanner.lookBack[1] = TokenNameNotAToken; // stay clear of the voodoo in the present method
 			this.nextIgnoredToken = this.scanner.getNextNotFakedToken();
 		} catch(InvalidInputException e){
 			pos = this.scanner.currentPosition;
 		} finally {
 			this.scanner.lookBack[0] = this.scanner.lookBack[1] = TokenNameNotAToken; // steer clear of the voodoo in the present method
+			this.scanner.multiCaseLabelComma = false;
 		}
 	} while (this.nextIgnoredToken < 0);
 
@@ -13375,13 +13479,11 @@
 		}
 		// collect all body declaration inside the compilation unit except the default constructor and implicit  methods and fields for records
 		final List bodyDeclarations = new ArrayList();
-
 		unit.ignoreFurtherInvestigation = false;
 		Predicate<MethodDeclaration> methodPred = classRecordType == TYPE_CLASS ?
 				mD -> !mD.isDefaultConstructor() : mD -> (mD.bits & ASTNode.IsImplicit) == 0;
 		Consumer<FieldDeclaration> fieldAction = classRecordType == TYPE_CLASS ?
 				fD -> bodyDeclarations.add(fD) : fD -> { if ((fD.bits & ASTNode.IsImplicit) == 0 ) bodyDeclarations.add(fD);} ;
-
 		ASTVisitor visitor = new ASTVisitor() {
 			@Override
 			public boolean visit(MethodDeclaration methodDeclaration, ClassScope scope) {
@@ -14239,6 +14341,7 @@
 	this.genericsPtr = -1;
 	this.valueLambdaNestDepth = -1;
 	this.recordNestedMethodLevels = new HashMap<>();
+	this.recordPatternSwitches = new HashMap<>();
 }
 /*
  * Reset context so as to resume to regular parse loop
diff --git a/org.eclipse.jdt.core/compiler/org/eclipse/jdt/internal/compiler/parser/ParserBasicInformation.java b/org.eclipse.jdt.core/compiler/org/eclipse/jdt/internal/compiler/parser/ParserBasicInformation.java
index 1cfe916..82b37d0 100644
--- a/org.eclipse.jdt.core/compiler/org/eclipse/jdt/internal/compiler/parser/ParserBasicInformation.java
+++ b/org.eclipse.jdt.core/compiler/org/eclipse/jdt/internal/compiler/parser/ParserBasicInformation.java
@@ -1,5 +1,5 @@
 /*******************************************************************************
- * Copyright (c) 2000, 2019 IBM Corporation and others.
+ * Copyright (c) 2000, 2021 IBM Corporation and others.
  *
  * This program and the accompanying materials
  * are made available under the terms of the Eclipse Public License 2.0
@@ -8,6 +8,10 @@
  *
  * SPDX-License-Identifier: EPL-2.0
  *
+ * This is an implementation of an early-draft specification developed under the Java
+ * Community Process (JCP) and is made available for testing and evaluation purposes
+ * only. The code is not compatible with any specification of the JCP.
+ *
  * Contributors:
  *     IBM Corporation - initial API and implementation
  *******************************************************************************/
@@ -20,22 +24,22 @@
 	public final static int
 	// BEGIN_AUTOGENERATED_REGION
 
-					ERROR_SYMBOL = 135,
+					ERROR_SYMBOL = 136,
 					MAX_NAME_LENGTH = 53,
-					NUM_STATES = 1207,
+					NUM_STATES = 1219,
 
-					NT_OFFSET = 135,
-					SCOPE_UBOUND = 313,
-					SCOPE_SIZE = 314,
-					LA_STATE_OFFSET = 17934,
+					NT_OFFSET = 136,
+					SCOPE_UBOUND = 318,
+					SCOPE_SIZE = 319,
+					LA_STATE_OFFSET = 18203,
 					MAX_LA = 1,
-					NUM_RULES = 919,
-					NUM_TERMINALS = 135,
-					NUM_NON_TERMINALS = 423,
-					NUM_SYMBOLS = 558,
-					START_STATE = 982,
+					NUM_RULES = 932,
+					NUM_TERMINALS = 136,
+					NUM_NON_TERMINALS = 430,
+					NUM_SYMBOLS = 566,
+					START_STATE = 990,
 					EOFT_SYMBOL = 64,
 					EOLT_SYMBOL = 64,
-					ACCEPT_ACTION = 17933,
-					ERROR_ACTION = 17934;
+					ACCEPT_ACTION = 18202,
+					ERROR_ACTION = 18203;
 }
diff --git a/org.eclipse.jdt.core/compiler/org/eclipse/jdt/internal/compiler/parser/Scanner.java b/org.eclipse.jdt.core/compiler/org/eclipse/jdt/internal/compiler/parser/Scanner.java
index ada2959..ec6194a 100644
--- a/org.eclipse.jdt.core/compiler/org/eclipse/jdt/internal/compiler/parser/Scanner.java
+++ b/org.eclipse.jdt.core/compiler/org/eclipse/jdt/internal/compiler/parser/Scanner.java
@@ -1,5 +1,5 @@
 /*******************************************************************************
- * Copyright (c) 2000, 2020 IBM Corporation and others.
+ * Copyright (c) 2000, 2021 IBM Corporation and others.
  *
  * This program and the accompanying materials
  * are made available under the terms of the Eclipse Public License 2.0
@@ -8,6 +8,10 @@
  *
  * SPDX-License-Identifier: EPL-2.0
  *
+ * This is an implementation of an early-draft specification developed under the Java
+ * Community Process (JCP) and is made available for testing and evaluation purposes
+ * only. The code is not compatible with any specification of the JCP.
+ *
  * Contributors:
  *     IBM Corporation - initial API and implementation
  *     Stephan Herrmann - Contribution for bug 186342 - [compiler][null] Using annotations for null checking
@@ -230,6 +234,7 @@
 	private VanguardParser vanguardParser;
 	ConflictedParser activeParser = null;
 	private boolean consumingEllipsisAnnotations = false;
+	protected boolean multiCaseLabelComma = false;
 
 	public static final int RoundBracket = 0;
 	public static final int SquareBracket = 1;
@@ -273,6 +278,7 @@
 	this.checkNonExternalizedStringLiterals = checkNonExternalizedStringLiterals;
 	this.previewEnabled = isPreviewEnabled;
 	this.caseStartPosition = -1;
+	this.multiCaseLabelComma = false;
 	if (taskTags != null) {
 		int taskTagsLength = taskTags.length;
 		int length = taskTagsLength;
@@ -1472,9 +1478,12 @@
 		token = disambiguatedToken(token);
 	} else if (token == TokenNameELLIPSIS) {
 		this.consumingEllipsisAnnotations = false;
+	} else if (mayBeAtCasePattern(token)) {
+		token = disambiguateCasePattern(token, this);
 	}
 	this.lookBack[0] = this.lookBack[1];
 	this.lookBack[1] = token;
+	this.multiCaseLabelComma = false;
 	updateCase(token);
 	return token;
 }
@@ -3283,6 +3292,7 @@
 	this.consumingEllipsisAnnotations = false;
 	this.insideModuleInfo = isModuleInfo;
 	this.scanContext = context == null ? getScanContext(begin) : context;
+	this.multiCaseLabelComma = false;
 }
 
 private ScanContext getScanContext(int begin) {
@@ -4962,7 +4972,9 @@
 			if (isRestrictedKeyword(token))
 				token = disambiguatedRestrictedKeyword(token);
 			updateScanContext(token);
-		}
+		} else if (mayBeAtCasePattern(token)) {
+			token = disambiguateCasePattern(token, this);
+		} else
 		if (token == TokenNameAT && atTypeAnnotation()) {
 			if (((VanguardParser) this.activeParser).currentGoal == Goal.LambdaParameterListGoal) {
 				token = disambiguatedToken(token);
@@ -4989,6 +5001,7 @@
 	static int SwitchLabelCaseLhsRule = 0;
 	static int[] RestrictedIdentifierSealedRule;
 	static int[] RestrictedIdentifierPermitsRule;
+	static int[] PatternRules;
 
 	static Goal LambdaParameterListGoal;
 	static Goal IntersectionCastGoal;
@@ -4999,16 +5012,20 @@
 	static Goal SwitchLabelCaseLhsGoal;
 	static Goal RestrictedIdentifierSealedGoal;
 	static Goal RestrictedIdentifierPermitsGoal;
+	static Goal PatternGoal;
 
 	static int[] RestrictedIdentifierSealedFollow =  { TokenNameclass, TokenNameinterface,
 			TokenNameenum, TokenNameRestrictedIdentifierrecord };// Note: enum/record allowed as error flagging rules.
 	static int[] RestrictedIdentifierPermitsFollow =  { TokenNameLBRACE };
+	static int[] PatternCaseLabelFollow = {TokenNameCOLON, TokenNameARROW, TokenNameCOMMA};
 
 	static {
 
 		List<Integer> ridSealed = new ArrayList<>(2);
 		List<Integer> ridPermits = new ArrayList<>();
+		List<Integer> patternStates = new ArrayList<>();
 		for (int i = 1; i <= ParserBasicInformation.NUM_RULES; i++) {  // 0 == $acc
+			// TODO: Change to switch
 			if ("ParenthesizedLambdaParameterList".equals(Parser.name[Parser.non_terminal_index[Parser.lhs[i]]])) //$NON-NLS-1$
 				LambdaParameterListRule = i;
 			else
@@ -5035,10 +5052,25 @@
 			else
 			if ("SwitchLabelCaseLhs".equals(Parser.name[Parser.non_terminal_index[Parser.lhs[i]]])) //$NON-NLS-1$
 				SwitchLabelCaseLhsRule = i;
-
+			else
+			if ("TypePattern".equals(Parser.name[Parser.non_terminal_index[Parser.lhs[i]]])) //$NON-NLS-1$
+				patternStates.add(i);
+			else
+			if ("PrimaryPattern".equals(Parser.name[Parser.non_terminal_index[Parser.lhs[i]]])) //$NON-NLS-1$
+				patternStates.add(i);
+			else
+			if ("GuardedPattern".equals(Parser.name[Parser.non_terminal_index[Parser.lhs[i]]])) //$NON-NLS-1$
+				patternStates.add(i);
+			else
+			if ("Pattern".equals(Parser.name[Parser.non_terminal_index[Parser.lhs[i]]])) //$NON-NLS-1$
+				patternStates.add(i);
+			else
+			if ("ParenthesizedPattern".equals(Parser.name[Parser.non_terminal_index[Parser.lhs[i]]])) //$NON-NLS-1$
+				patternStates.add(i);
 		}
 		RestrictedIdentifierSealedRule = ridSealed.stream().mapToInt(Integer :: intValue).toArray(); // overkill but future-proof
 		RestrictedIdentifierPermitsRule = ridPermits.stream().mapToInt(Integer :: intValue).toArray();
+		PatternRules = patternStates.stream().mapToInt(Integer :: intValue).toArray();
 
 		LambdaParameterListGoal =  new Goal(TokenNameARROW, new int[] { TokenNameARROW }, LambdaParameterListRule);
 		IntersectionCastGoal =     new Goal(TokenNameLPAREN, followSetOfCast(), IntersectionCastRule);
@@ -5049,6 +5081,7 @@
 		SwitchLabelCaseLhsGoal =   new Goal(TokenNameARROW, new int [0], SwitchLabelCaseLhsRule);
 		RestrictedIdentifierSealedGoal = new Goal(TokenNameRestrictedIdentifiersealed, RestrictedIdentifierSealedFollow, RestrictedIdentifierSealedRule);
 		RestrictedIdentifierPermitsGoal = new Goal(TokenNameRestrictedIdentifierpermits, RestrictedIdentifierPermitsFollow, RestrictedIdentifierPermitsRule);
+		PatternGoal = new Goal(TokenNameBeginCaseElement, PatternCaseLabelFollow, PatternRules);
 	}
 
 
@@ -5250,6 +5283,10 @@
 	vs.resetTo(this.startPosition, this.eofPosition - 1, isInModuleDeclaration(), this.scanContext);
 	return vs;
 }
+protected final boolean mayBeAtCasePattern(int token) {
+	return (this.complianceLevel == ClassFileConstants.JDK17 && this.previewEnabled)
+			&& (token == TokenNamecase || this.multiCaseLabelComma);
+}
 protected final boolean mayBeAtBreakPreview() {
 	return this.breakPreviewAllowed && this.lookBack[1] != TokenNameARROW;
 }
@@ -5347,6 +5384,7 @@
 	if (parser != null) {
 		this.insideModuleInfo = parser.isParsingModuleDeclaration();
 	}
+	this.multiCaseLabelComma = false;
 }
 public static boolean isRestrictedKeyword(int token) {
 	switch(token) {
@@ -5657,6 +5695,25 @@
 	}
 	return token;
 }
+/*
+ * Assumption: mayBeAtCasePattern(token) is true before calling this method.
+ */
+int disambiguateCasePattern(int token, Scanner scanner) {
+	assert mayBeAtCasePattern(token);
+	int delta = token == TokenNamecase ? 4 : 0; // 4 for case.
+	final VanguardParser parser = getNewVanguardParser();
+	parser.scanner.resetTo(parser.scanner.currentPosition + delta, parser.scanner.eofPosition);
+	if (parser.parse(Goal.PatternGoal) == VanguardParser.SUCCESS) {
+		if (token == TokenNamecase) {
+			scanner.nextToken = TokenNameBeginCaseElement;
+		} else {
+			scanner.nextToken = token;
+			token = TokenNameBeginCaseElement;
+		}
+	}
+	return token;
+}
+
 private boolean mayBeAtCaseLabelExpr() {
 	if (this.lookBack[1] == TokenNamedefault || this.caseStartPosition <= 0)
 		return false;
diff --git a/org.eclipse.jdt.core/compiler/org/eclipse/jdt/internal/compiler/parser/TerminalTokens.java b/org.eclipse.jdt.core/compiler/org/eclipse/jdt/internal/compiler/parser/TerminalTokens.java
index f947a68..c4be6a9 100644
--- a/org.eclipse.jdt.core/compiler/org/eclipse/jdt/internal/compiler/parser/TerminalTokens.java
+++ b/org.eclipse.jdt.core/compiler/org/eclipse/jdt/internal/compiler/parser/TerminalTokens.java
@@ -38,7 +38,7 @@
 							TokenNameCOMMENT_JAVADOC = 1003;
 
 	// BEGIN_AUTOGENERATED_REGION
-	int TokenNameIdentifier = 22,
+	int TokenNameIdentifier = 19,
 							TokenNameabstract = 42,
 							TokenNameassert = 81,
 							TokenNameboolean = 105,
@@ -49,11 +49,11 @@
 							TokenNamechar = 108,
 							TokenNameclass = 70,
 							TokenNamecontinue = 83,
-							TokenNameconst = 133,
+							TokenNameconst = 134,
 							TokenNamedefault = 76,
 							TokenNamedo = 84,
 							TokenNamedouble = 109,
-							TokenNameelse = 119,
+							TokenNameelse = 121,
 							TokenNameenum = 74,
 							TokenNameextends = 92,
 							TokenNamefalse = 52,
@@ -61,9 +61,9 @@
 							TokenNamefinally = 116,
 							TokenNamefloat = 110,
 							TokenNamefor = 85,
-							TokenNamegoto = 134,
+							TokenNamegoto = 135,
 							TokenNameif = 86,
-							TokenNameimplements = 130,
+							TokenNameimplements = 131,
 							TokenNameimport = 111,
 							TokenNameinstanceof = 17,
 							TokenNameint = 112,
@@ -79,7 +79,7 @@
 							TokenNamepublic = 48,
 							TokenNamereturn = 87,
 							TokenNameshort = 114,
-							TokenNamestatic = 39,
+							TokenNamestatic = 38,
 							TokenNamestrictfp = 49,
 							TokenNamesuper = 34,
 							TokenNameswitch = 63,
@@ -93,16 +93,16 @@
 							TokenNamevoid = 115,
 							TokenNamevolatile = 51,
 							TokenNamewhile = 79,
-							TokenNamemodule = 120,
-							TokenNameopen = 121,
+							TokenNamemodule = 118,
+							TokenNameopen = 119,
 							TokenNamerequires = 122,
 							TokenNametransitive = 128,
 							TokenNameexports = 123,
 							TokenNameopens = 124,
-							TokenNameto = 131,
+							TokenNameto = 132,
 							TokenNameuses = 125,
 							TokenNameprovides = 126,
-							TokenNamewith = 132,
+							TokenNamewith = 133,
 							TokenNameIntegerLiteral = 55,
 							TokenNameLongLiteral = 56,
 							TokenNameFloatingPointLiteral = 57,
@@ -112,10 +112,10 @@
 							TokenNameTextBlock = 61,
 							TokenNamePLUS_PLUS = 2,
 							TokenNameMINUS_MINUS = 3,
-							TokenNameEQUAL_EQUAL = 19,
+							TokenNameEQUAL_EQUAL = 20,
 							TokenNameLESS_EQUAL = 12,
 							TokenNameGREATER_EQUAL = 13,
-							TokenNameNOT_EQUAL = 20,
+							TokenNameNOT_EQUAL = 21,
 							TokenNameLEFT_SHIFT = 18,
 							TokenNameRIGHT_SHIFT = 14,
 							TokenNameUNSIGNED_RIGHT_SHIFT = 16,
@@ -131,13 +131,13 @@
 							TokenNameRIGHT_SHIFT_EQUAL = 102,
 							TokenNameUNSIGNED_RIGHT_SHIFT_EQUAL = 103,
 							TokenNameOR_OR = 31,
-							TokenNameAND_AND = 30,
+							TokenNameAND_AND = 29,
 							TokenNamePLUS = 4,
 							TokenNameMINUS = 5,
 							TokenNameNOT = 66,
 							TokenNameREMAINDER = 9,
 							TokenNameXOR = 24,
-							TokenNameAND = 21,
+							TokenNameAND = 22,
 							TokenNameMULTIPLY = 8,
 							TokenNameOR = 28,
 							TokenNameTWIDDLE = 67,
@@ -146,18 +146,18 @@
 							TokenNameLESS = 11,
 							TokenNameLPAREN = 23,
 							TokenNameRPAREN = 26,
-							TokenNameLBRACE = 38,
+							TokenNameLBRACE = 39,
 							TokenNameRBRACE = 33,
 							TokenNameLBRACKET = 6,
 							TokenNameRBRACKET = 69,
 							TokenNameSEMICOLON = 25,
-							TokenNameQUESTION = 29,
+							TokenNameQUESTION = 30,
 							TokenNameCOLON = 65,
 							TokenNameCOMMA = 32,
 							TokenNameDOT = 1,
 							TokenNameEQUAL = 77,
 							TokenNameAT = 36,
-							TokenNameELLIPSIS = 118,
+							TokenNameELLIPSIS = 120,
 							TokenNameARROW = 104,
 							TokenNameCOLON_COLON = 7,
 							TokenNameBeginLambda = 62,
@@ -171,6 +171,7 @@
 							TokenNameRestrictedIdentifierrecord = 75,
 							TokenNameRestrictedIdentifiersealed = 41,
 							TokenNameRestrictedIdentifierpermits = 127,
+							TokenNameBeginCaseElement = 130,
 							TokenNameEOF = 64,
-							TokenNameERROR = 135;
+							TokenNameERROR = 136;
 }
diff --git a/org.eclipse.jdt.core/compiler/org/eclipse/jdt/internal/compiler/parser/parser1.rsc b/org.eclipse.jdt.core/compiler/org/eclipse/jdt/internal/compiler/parser/parser1.rsc
index 1c91052..0aa0052 100644
--- a/org.eclipse.jdt.core/compiler/org/eclipse/jdt/internal/compiler/parser/parser1.rsc
+++ b/org.eclipse.jdt.core/compiler/org/eclipse/jdt/internal/compiler/parser/parser1.rsc
Binary files differ
diff --git a/org.eclipse.jdt.core/compiler/org/eclipse/jdt/internal/compiler/parser/parser10.rsc b/org.eclipse.jdt.core/compiler/org/eclipse/jdt/internal/compiler/parser/parser10.rsc
index 6c6a6d4..87e406a 100644
--- a/org.eclipse.jdt.core/compiler/org/eclipse/jdt/internal/compiler/parser/parser10.rsc
+++ b/org.eclipse.jdt.core/compiler/org/eclipse/jdt/internal/compiler/parser/parser10.rsc
Binary files differ
diff --git a/org.eclipse.jdt.core/compiler/org/eclipse/jdt/internal/compiler/parser/parser11.rsc b/org.eclipse.jdt.core/compiler/org/eclipse/jdt/internal/compiler/parser/parser11.rsc
index 7d2d8fe..d6748fc 100644
--- a/org.eclipse.jdt.core/compiler/org/eclipse/jdt/internal/compiler/parser/parser11.rsc
+++ b/org.eclipse.jdt.core/compiler/org/eclipse/jdt/internal/compiler/parser/parser11.rsc
Binary files differ
diff --git a/org.eclipse.jdt.core/compiler/org/eclipse/jdt/internal/compiler/parser/parser12.rsc b/org.eclipse.jdt.core/compiler/org/eclipse/jdt/internal/compiler/parser/parser12.rsc
index ca4e545..5c55877 100644
--- a/org.eclipse.jdt.core/compiler/org/eclipse/jdt/internal/compiler/parser/parser12.rsc
+++ b/org.eclipse.jdt.core/compiler/org/eclipse/jdt/internal/compiler/parser/parser12.rsc
Binary files differ
diff --git a/org.eclipse.jdt.core/compiler/org/eclipse/jdt/internal/compiler/parser/parser13.rsc b/org.eclipse.jdt.core/compiler/org/eclipse/jdt/internal/compiler/parser/parser13.rsc
index f2cfa58..0a02d6e 100644
--- a/org.eclipse.jdt.core/compiler/org/eclipse/jdt/internal/compiler/parser/parser13.rsc
+++ b/org.eclipse.jdt.core/compiler/org/eclipse/jdt/internal/compiler/parser/parser13.rsc
Binary files differ
diff --git a/org.eclipse.jdt.core/compiler/org/eclipse/jdt/internal/compiler/parser/parser14.rsc b/org.eclipse.jdt.core/compiler/org/eclipse/jdt/internal/compiler/parser/parser14.rsc
index a11b10a..2032f7c 100644
--- a/org.eclipse.jdt.core/compiler/org/eclipse/jdt/internal/compiler/parser/parser14.rsc
+++ b/org.eclipse.jdt.core/compiler/org/eclipse/jdt/internal/compiler/parser/parser14.rsc
Binary files differ
diff --git a/org.eclipse.jdt.core/compiler/org/eclipse/jdt/internal/compiler/parser/parser15.rsc b/org.eclipse.jdt.core/compiler/org/eclipse/jdt/internal/compiler/parser/parser15.rsc
index d309460..2563764 100644
--- a/org.eclipse.jdt.core/compiler/org/eclipse/jdt/internal/compiler/parser/parser15.rsc
+++ b/org.eclipse.jdt.core/compiler/org/eclipse/jdt/internal/compiler/parser/parser15.rsc
Binary files differ
diff --git a/org.eclipse.jdt.core/compiler/org/eclipse/jdt/internal/compiler/parser/parser16.rsc b/org.eclipse.jdt.core/compiler/org/eclipse/jdt/internal/compiler/parser/parser16.rsc
index a9d924e..992a4f3 100644
--- a/org.eclipse.jdt.core/compiler/org/eclipse/jdt/internal/compiler/parser/parser16.rsc
+++ b/org.eclipse.jdt.core/compiler/org/eclipse/jdt/internal/compiler/parser/parser16.rsc
Binary files differ
diff --git a/org.eclipse.jdt.core/compiler/org/eclipse/jdt/internal/compiler/parser/parser17.rsc b/org.eclipse.jdt.core/compiler/org/eclipse/jdt/internal/compiler/parser/parser17.rsc
index 5edc8b0..db38276 100644
--- a/org.eclipse.jdt.core/compiler/org/eclipse/jdt/internal/compiler/parser/parser17.rsc
+++ b/org.eclipse.jdt.core/compiler/org/eclipse/jdt/internal/compiler/parser/parser17.rsc
Binary files differ
diff --git a/org.eclipse.jdt.core/compiler/org/eclipse/jdt/internal/compiler/parser/parser18.rsc b/org.eclipse.jdt.core/compiler/org/eclipse/jdt/internal/compiler/parser/parser18.rsc
index ec53f2e..85fbd01 100644
--- a/org.eclipse.jdt.core/compiler/org/eclipse/jdt/internal/compiler/parser/parser18.rsc
+++ b/org.eclipse.jdt.core/compiler/org/eclipse/jdt/internal/compiler/parser/parser18.rsc
Binary files differ
diff --git a/org.eclipse.jdt.core/compiler/org/eclipse/jdt/internal/compiler/parser/parser19.rsc b/org.eclipse.jdt.core/compiler/org/eclipse/jdt/internal/compiler/parser/parser19.rsc
index 245c989..3df5107 100644
--- a/org.eclipse.jdt.core/compiler/org/eclipse/jdt/internal/compiler/parser/parser19.rsc
+++ b/org.eclipse.jdt.core/compiler/org/eclipse/jdt/internal/compiler/parser/parser19.rsc
Binary files differ
diff --git a/org.eclipse.jdt.core/compiler/org/eclipse/jdt/internal/compiler/parser/parser2.rsc b/org.eclipse.jdt.core/compiler/org/eclipse/jdt/internal/compiler/parser/parser2.rsc
index b150323..6749e62 100644
--- a/org.eclipse.jdt.core/compiler/org/eclipse/jdt/internal/compiler/parser/parser2.rsc
+++ b/org.eclipse.jdt.core/compiler/org/eclipse/jdt/internal/compiler/parser/parser2.rsc
Binary files differ
diff --git a/org.eclipse.jdt.core/compiler/org/eclipse/jdt/internal/compiler/parser/parser20.rsc b/org.eclipse.jdt.core/compiler/org/eclipse/jdt/internal/compiler/parser/parser20.rsc
index 4160c25..fd82788 100644
--- a/org.eclipse.jdt.core/compiler/org/eclipse/jdt/internal/compiler/parser/parser20.rsc
+++ b/org.eclipse.jdt.core/compiler/org/eclipse/jdt/internal/compiler/parser/parser20.rsc
Binary files differ
diff --git a/org.eclipse.jdt.core/compiler/org/eclipse/jdt/internal/compiler/parser/parser21.rsc b/org.eclipse.jdt.core/compiler/org/eclipse/jdt/internal/compiler/parser/parser21.rsc
index 87007aa..a66b4a2 100644
--- a/org.eclipse.jdt.core/compiler/org/eclipse/jdt/internal/compiler/parser/parser21.rsc
+++ b/org.eclipse.jdt.core/compiler/org/eclipse/jdt/internal/compiler/parser/parser21.rsc
Binary files differ
diff --git a/org.eclipse.jdt.core/compiler/org/eclipse/jdt/internal/compiler/parser/parser22.rsc b/org.eclipse.jdt.core/compiler/org/eclipse/jdt/internal/compiler/parser/parser22.rsc
index c9949b0..f1b63c4 100644
--- a/org.eclipse.jdt.core/compiler/org/eclipse/jdt/internal/compiler/parser/parser22.rsc
+++ b/org.eclipse.jdt.core/compiler/org/eclipse/jdt/internal/compiler/parser/parser22.rsc
Binary files differ
diff --git a/org.eclipse.jdt.core/compiler/org/eclipse/jdt/internal/compiler/parser/parser23.rsc b/org.eclipse.jdt.core/compiler/org/eclipse/jdt/internal/compiler/parser/parser23.rsc
index 3732f2d..4e59727 100644
--- a/org.eclipse.jdt.core/compiler/org/eclipse/jdt/internal/compiler/parser/parser23.rsc
+++ b/org.eclipse.jdt.core/compiler/org/eclipse/jdt/internal/compiler/parser/parser23.rsc
Binary files differ
diff --git a/org.eclipse.jdt.core/compiler/org/eclipse/jdt/internal/compiler/parser/parser24.rsc b/org.eclipse.jdt.core/compiler/org/eclipse/jdt/internal/compiler/parser/parser24.rsc
index 54b8195..4e502cd 100644
--- a/org.eclipse.jdt.core/compiler/org/eclipse/jdt/internal/compiler/parser/parser24.rsc
+++ b/org.eclipse.jdt.core/compiler/org/eclipse/jdt/internal/compiler/parser/parser24.rsc
Binary files differ
diff --git a/org.eclipse.jdt.core/compiler/org/eclipse/jdt/internal/compiler/parser/parser3.rsc b/org.eclipse.jdt.core/compiler/org/eclipse/jdt/internal/compiler/parser/parser3.rsc
index a8cd6c2..a09ae96 100644
--- a/org.eclipse.jdt.core/compiler/org/eclipse/jdt/internal/compiler/parser/parser3.rsc
+++ b/org.eclipse.jdt.core/compiler/org/eclipse/jdt/internal/compiler/parser/parser3.rsc
Binary files differ
diff --git a/org.eclipse.jdt.core/compiler/org/eclipse/jdt/internal/compiler/parser/parser4.rsc b/org.eclipse.jdt.core/compiler/org/eclipse/jdt/internal/compiler/parser/parser4.rsc
index 9c2e1d7..bac9980 100644
--- a/org.eclipse.jdt.core/compiler/org/eclipse/jdt/internal/compiler/parser/parser4.rsc
+++ b/org.eclipse.jdt.core/compiler/org/eclipse/jdt/internal/compiler/parser/parser4.rsc
Binary files differ
diff --git a/org.eclipse.jdt.core/compiler/org/eclipse/jdt/internal/compiler/parser/parser5.rsc b/org.eclipse.jdt.core/compiler/org/eclipse/jdt/internal/compiler/parser/parser5.rsc
index 2e4d586..6d0bf0d 100644
--- a/org.eclipse.jdt.core/compiler/org/eclipse/jdt/internal/compiler/parser/parser5.rsc
+++ b/org.eclipse.jdt.core/compiler/org/eclipse/jdt/internal/compiler/parser/parser5.rsc
Binary files differ
diff --git a/org.eclipse.jdt.core/compiler/org/eclipse/jdt/internal/compiler/parser/parser6.rsc b/org.eclipse.jdt.core/compiler/org/eclipse/jdt/internal/compiler/parser/parser6.rsc
index f9ee866..b71c1d6 100644
--- a/org.eclipse.jdt.core/compiler/org/eclipse/jdt/internal/compiler/parser/parser6.rsc
+++ b/org.eclipse.jdt.core/compiler/org/eclipse/jdt/internal/compiler/parser/parser6.rsc
Binary files differ
diff --git a/org.eclipse.jdt.core/compiler/org/eclipse/jdt/internal/compiler/parser/parser7.rsc b/org.eclipse.jdt.core/compiler/org/eclipse/jdt/internal/compiler/parser/parser7.rsc
index b7c81a3..029ddd5 100644
--- a/org.eclipse.jdt.core/compiler/org/eclipse/jdt/internal/compiler/parser/parser7.rsc
+++ b/org.eclipse.jdt.core/compiler/org/eclipse/jdt/internal/compiler/parser/parser7.rsc
Binary files differ
diff --git a/org.eclipse.jdt.core/compiler/org/eclipse/jdt/internal/compiler/parser/parser8.rsc b/org.eclipse.jdt.core/compiler/org/eclipse/jdt/internal/compiler/parser/parser8.rsc
index 4d199c3..bb9e422 100644
--- a/org.eclipse.jdt.core/compiler/org/eclipse/jdt/internal/compiler/parser/parser8.rsc
+++ b/org.eclipse.jdt.core/compiler/org/eclipse/jdt/internal/compiler/parser/parser8.rsc
Binary files differ
diff --git a/org.eclipse.jdt.core/compiler/org/eclipse/jdt/internal/compiler/parser/parser9.rsc b/org.eclipse.jdt.core/compiler/org/eclipse/jdt/internal/compiler/parser/parser9.rsc
index 42c8545..826975c 100644
--- a/org.eclipse.jdt.core/compiler/org/eclipse/jdt/internal/compiler/parser/parser9.rsc
+++ b/org.eclipse.jdt.core/compiler/org/eclipse/jdt/internal/compiler/parser/parser9.rsc
Binary files differ
diff --git a/org.eclipse.jdt.core/compiler/org/eclipse/jdt/internal/compiler/parser/readableNames.props b/org.eclipse.jdt.core/compiler/org/eclipse/jdt/internal/compiler/parser/readableNames.props
index 2d8aba5..563bd9a 100644
--- a/org.eclipse.jdt.core/compiler/org/eclipse/jdt/internal/compiler/parser/readableNames.props
+++ b/org.eclipse.jdt.core/compiler/org/eclipse/jdt/internal/compiler/parser/readableNames.props
@@ -47,6 +47,8 @@
 BlockStatementsopt=BlockStatements
 BooleanLiteral=BooleanLiteral
 BreakStatement=BreakStatement
+CaseLabelElement=CaseLabelElement
+CaseLabelElements=CaseLabelElements
 CastExpression=CastExpression
 CastNameAndBounds=CastNameAndBounds
 CatchClause=CatchClause
@@ -89,7 +91,6 @@
 ConditionalOrExpression_NotName=Expression
 ConstantDeclaration=ConstantDeclaration
 ConstantExpression=ConstantExpression
-ConstantExpressions=ConstantExpressions
 ConstructorDeclaration=ConstructorDeclaration
 ConstructorHeader=ConstructorDeclaration
 ConstructorHeaderName=ConstructorHeaderName
@@ -156,6 +157,7 @@
 GenericMethodDeclaration=GenericMethodDeclaration
 GenericType=GenericType
 Goal=Goal
+GuardedPattern=GuardedPattern
 Header1=Header1
 Header2=Header2
 Header=Header
@@ -175,7 +177,8 @@
 InstanceofClassic=InstanceofClassic
 InstanceofExpression=Expression
 InstanceofExpression_NotName=Expression
-InstanceofPattern=InstanceofPattern
+InstanceofPrimaryParenPattern=InstanceofPrimaryParenPattern
+InstanceofPrimaryTypePattern=InstanceofPrimaryTypePattern
 InstanceofRHS=Expression
 IntegralType=IntegralType
 InterfaceBody=InterfaceBody
@@ -247,6 +250,8 @@
 PackageDeclarationName=PackageDeclarationName
 ParenthesizedCastNameAndBounds=ParenthesizedCastNameAndBounds
 ParenthesizedLambdaParameterList=ParenthesizedLambdaParameterList
+ParenthesizedPattern=ParenthesizedPattern
+Pattern=Pattern
 PermittedSubclasses=PermittedSubclasses
 PostDecrementExpression=PostDecrementExpression
 PostIncrementExpression=PostIncrementExpression
@@ -256,6 +261,7 @@
 PreIncrementExpression=PreIncrementExpression
 Primary=Expression
 PrimaryNoNewArray=Expression
+PrimaryPattern=PrimaryPattern
 PrimitiveType=PrimitiveType
 PushLPAREN=(
 PushLeftBrace=PushLeftBrace
@@ -365,6 +371,7 @@
 TypeParameterList1=TypeParameterList1
 TypeParameterList=TypeParameterList
 TypeParameters=TypeParameters
+TypePattern=TypePattern
 UnannotatableName=UnannotatableQualifiedName
 UnaryExpression=Expression
 UnaryExpressionNotPlusMinus=Expression
diff --git a/org.eclipse.jdt.core/compiler/org/eclipse/jdt/internal/compiler/problem/ProblemReporter.java b/org.eclipse.jdt.core/compiler/org/eclipse/jdt/internal/compiler/problem/ProblemReporter.java
index 7e21261..589573a 100644
--- a/org.eclipse.jdt.core/compiler/org/eclipse/jdt/internal/compiler/problem/ProblemReporter.java
+++ b/org.eclipse.jdt.core/compiler/org/eclipse/jdt/internal/compiler/problem/ProblemReporter.java
@@ -8,6 +8,10 @@
  *
  * SPDX-License-Identifier: EPL-2.0
  *
+ * This is an implementation of an early-draft specification developed under the Java
+ * Community Process (JCP) and is made available for testing and evaluation purposes
+ * only. The code is not compatible with any specification of the JCP.
+ *
  * Contributors:
  *     IBM Corporation - initial API and implementation
  *     Benjamin Muskalla - Contribution for bug 239066
@@ -1486,6 +1490,15 @@
 		nodeSourceStart(local, location),
 		nodeSourceEnd(local, location));
 }
+public void cannotReferToNonFinalLocalInGuard(VariableBinding local, ASTNode location) {
+	String[] arguments = new String[] { new String(local.readableName()) };
+	this.handle(
+		IProblem.LocalReferencedInGuardMustBeEffectivelyFinal,
+		arguments,
+		arguments,
+		nodeSourceStart(local, location),
+		nodeSourceEnd(local, location));
+}
 public void cannotReturnInInitializer(ASTNode location) {
 	this.handle(
 		IProblem.CannotReturnInInitializer,
@@ -1662,6 +1675,7 @@
  		case IProblem.SwitchExpressionsYieldUnqualifiedMethodWarning:
  		case IProblem.SwitchExpressionsYieldRestrictedGeneralWarning:
  		case IProblem.SwitchExpressionsYieldTypeDeclarationWarning:
+ 		case IProblem.StrictfpNotRequired:
  			return ProblemSeverities.Warning;
  		case IProblem.TypeCollidesWithPackage :
 			return ProblemSeverities.Error;
@@ -7265,7 +7279,7 @@
 		expression.sourceStart,
 		expression.sourceEnd);
 }
-public void notCompatibleTypesError(InstanceOfExpression expression, TypeBinding leftType, TypeBinding rightType) {
+public void notCompatibleTypesError(Expression expression, TypeBinding leftType, TypeBinding rightType) {
 	String leftName = new String(leftType.readableName());
 	String rightName = new String(rightType.readableName());
 	String leftShortName = new String(leftType.shortReadableName());
@@ -8384,6 +8398,8 @@
 	   third synthetic token "ElidedSemicolonAndRightBrace" that we don't expect to show up in messages since it is manufactured by
 	   the parser automatically.
 	*/
+	if (token.equals("BeginCaseExpr")) //$NON-NLS-1$
+		return "->"; //$NON-NLS-1$
 	if (token.equals("BeginTypeArguments")) //$NON-NLS-1$
 		return "."; //$NON-NLS-1$
 	if (token.equals("BeginLambda")) //$NON-NLS-1$
@@ -9585,8 +9601,6 @@
 			sourceEnd);
 }
 public void previewAPIUsed(int sourceStart, int sourceEnd, boolean isFatal) {
-	if (this.options.enablePreviewFeatures)
-		return;
 	this.handle(
 			IProblem.PreviewAPIUsed,
 			NoArgument,
@@ -11965,8 +11979,6 @@
 		type.sourceEnd());
 }
 private void sealedMissingModifier(int problem, SourceTypeBinding type, TypeDeclaration typeDecl, TypeBinding superTypeBinding) {
-	if (!this.options.enablePreviewFeatures)
-		return;
 	String name = new String(type.sourceName());
 	String superTypeFullName = new String(superTypeBinding.readableName());
 	String superTypeShortName = new String(superTypeBinding.shortReadableName());
@@ -11986,8 +11998,6 @@
 	sealedMissingModifier(IProblem.SealedMissingInterfaceModifier, type, typeDecl, superTypeBinding);
 }
 public void sealedDisAllowedNonSealedModifierInClass(SourceTypeBinding type, TypeDeclaration typeDecl) {
-	if (!this.options.enablePreviewFeatures)
-		return;
 	String name = new String(type.sourceName());
 	this.handle(
 			IProblem.SealedDisAllowedNonSealedModifierInClass,
@@ -11998,8 +12008,6 @@
 }
 
 private void sealedSuperTypeDoesNotPermit(int problem, SourceTypeBinding type, TypeReference superType, TypeBinding superTypeBinding) {
-	if (!this.options.enablePreviewFeatures)
-		return;
 	String name = new String(type.sourceName());
 	String superTypeFullName = new String(superTypeBinding.readableName());
 	String superTypeShortName = new String(superTypeBinding.shortReadableName());
@@ -12013,8 +12021,6 @@
 }
 
 public void sealedSuperTypeInDifferentPackage(int problem, SourceTypeBinding type, TypeReference curType, TypeBinding superTypeBinding, PackageBinding superPackageBinding) {
-	if (!this.options.enablePreviewFeatures)
-		return;
 	String typeName = new String(type.sourceName);
 	String name = new String(superTypeBinding.sourceName());
 	String packageName = superPackageBinding.compoundName == CharOperation.NO_CHAR_CHAR ? "default" : //$NON-NLS-1$
@@ -12028,8 +12034,6 @@
 }
 
 public void sealedSuperTypeDisallowed(int problem, SourceTypeBinding type, TypeReference curType, TypeBinding superTypeBinding) {
-	if (!this.options.enablePreviewFeatures)
-		return;
 	String typeName = new String(type.sourceName);
 	String name = new String(superTypeBinding.sourceName());
 	String[] arguments = new String[] {typeName, name};
@@ -12053,8 +12057,6 @@
 }
 
 public void sealedSuperInterfaceDoesNotPermit(SourceTypeBinding type, TypeReference superType, TypeBinding superTypeBinding) {
-	if (!this.options.enablePreviewFeatures)
-		return;
 	String name = new String(type.sourceName());
 	String superTypeFullName = new String(superTypeBinding.readableName());
 	String superTypeShortName = new String(superTypeBinding.shortReadableName());
@@ -12077,16 +12079,12 @@
 }
 
 public void sealedMissingSealedModifier(SourceTypeBinding type, ASTNode node) {
-	if (!this.options.enablePreviewFeatures)
-		return;
 	String name = new String(type.sourceName());
 	this.handle(IProblem.SealedMissingSealedModifier, new String[] { name }, new String[] { name }, node.sourceStart,
 			node.sourceEnd);
 }
 
 public void sealedDuplicateTypeInPermits(SourceTypeBinding type, TypeReference reference, ReferenceBinding superType) {
-	if (!this.options.enablePreviewFeatures)
-		return;
 	this.handle(
 		IProblem.SealedDuplicateTypeInPermits,
 		new String[] {
@@ -12100,8 +12098,6 @@
 }
 
 public void sealedNotDirectSuperClass(ReferenceBinding type, TypeReference reference, SourceTypeBinding superType) {
-	if (!this.options.enablePreviewFeatures)
-		return;
 	this.handle(
 		IProblem.SealedNotDirectSuperClass,
 		new String[] {
@@ -12114,8 +12110,6 @@
 		reference.sourceEnd);
 }
 public void sealedPermittedTypeOutsideOfModule(ReferenceBinding permType, SourceTypeBinding type, ASTNode node, ModuleBinding moduleBinding) {
-	if (!this.options.enablePreviewFeatures)
-		return;
 	String permTypeName = new String(permType.sourceName);
 	String name = new String(type.sourceName());
 	String moduleName = new String(moduleBinding.name());
@@ -12127,16 +12121,12 @@
 			node.sourceEnd);
 }
 public void sealedPermittedTypeOutsideOfModule(SourceTypeBinding type, ASTNode node) {
-	if (!this.options.enablePreviewFeatures)
-		return;
 	String name = new String(type.sourceName());
 	this.handle(IProblem.SealedPermittedTypeOutsideOfModule, new String[] { name }, new String[] { name },
 			node.sourceStart, node.sourceEnd);
 }
 
 public void sealedPermittedTypeOutsideOfPackage(ReferenceBinding permType, SourceTypeBinding type, ASTNode node, PackageBinding packageBinding) {
-	if (!this.options.enablePreviewFeatures)
-		return;
 	String permTypeName = new String(permType.sourceName);
 	String name = new String(type.sourceName());
 	String packageName = packageBinding.compoundName == CharOperation.NO_CHAR_CHAR ? "default" : //$NON-NLS-1$
@@ -12150,16 +12140,12 @@
 }
 
 public void sealedSealedTypeMissingPermits(SourceTypeBinding type, ASTNode node) {
-	if (!this.options.enablePreviewFeatures)
-		return;
 	String name = new String(type.sourceName());
 	this.handle(IProblem.SealedSealedTypeMissingPermits, new String[] { name }, new String[] { name }, node.sourceStart,
 			node.sourceEnd);
 }
 
 public void sealedInterfaceIsSealedAndNonSealed(SourceTypeBinding type, ASTNode node) {
-	if (!this.options.enablePreviewFeatures)
-		return;
 	String name = new String(type.sourceName());
 	this.handle(IProblem.SealedInterfaceIsSealedAndNonSealed,
 			new String[] { name },
@@ -12169,8 +12155,6 @@
 }
 
 public void sealedDisAllowedNonSealedModifierInInterface(SourceTypeBinding type, TypeDeclaration typeDecl) {
-	if (!this.options.enablePreviewFeatures)
-		return;
 	String name = new String(type.sourceName());
 	this.handle(
 			IProblem.SealedDisAllowedNonSealedModifierInInterface,
@@ -12181,8 +12165,6 @@
 }
 
 public void sealedNotDirectSuperInterface(ReferenceBinding type, TypeReference reference, SourceTypeBinding superType) {
-	if (!this.options.enablePreviewFeatures)
-		return;
 	this.handle(
 		IProblem.SealedNotDirectSuperInterface,
 		new String[] {
@@ -12196,8 +12178,6 @@
 }
 
 public void sealedLocalDirectSuperTypeSealed(SourceTypeBinding type, TypeReference superclass, TypeBinding superTypeBinding) {
-	if (!this.options.enablePreviewFeatures)
-		return;
 	String name = new String(type.sourceName());
 	String superTypeFullName = new String(superTypeBinding.readableName());
 	String superTypeShortName = new String(superTypeBinding.shortReadableName());
@@ -12210,8 +12190,6 @@
 		superclass.sourceEnd);
 }
 public void sealedAnonymousClassCannotExtendSealedType(TypeReference reference, TypeBinding type) {
-	if (!this.options.enablePreviewFeatures)
-		return;
 	this.handle(
 			IProblem.SealedAnonymousClassCannotExtendSealedType,
 			new String[] {new String(type.readableName())},
@@ -12219,4 +12197,75 @@
 			reference.sourceStart,
 			reference.sourceEnd);
 }
-}
\ No newline at end of file
+public void StrictfpNotRequired(int sourceStart, int sourceEnd) {
+	this.handle(
+			IProblem.StrictfpNotRequired,
+			NoArgument, NoArgument,
+			sourceStart, sourceEnd);
+}
+public void switchPatternConstantCaseLabelIncompatible(Expression element, TypeBinding selectorType) {
+	String name = new String(selectorType.shortReadableName());
+	this.handle(
+			IProblem.SwitchPatternConstantCaseLabelIncompatible,
+			new String[] {name},
+			new String[] {name},
+			element.sourceStart,
+			element.sourceEnd);
+}
+public void switchPatternConstantWithPatternIncompatible(Expression element) {
+	this.handle(
+			IProblem.SwitchPatternConstantWithPatternIncompatible,
+			NoArgument,
+			NoArgument,
+			element.sourceStart,
+			element.sourceEnd);
+}
+public void IllegalFallThroughToPattern(CaseStatement caseStatement) {
+	this.handle(
+		IProblem.IllegalFallthroughToPattern,
+		NoArgument,
+		NoArgument,
+		caseStatement.sourceStart,
+		caseStatement.sourceEnd);
+	}
+public void switchPatternOnlyOnePatternCaseLabelAllowed(Expression element) {
+	this.handle(
+			IProblem.SwitchPatternOnlyOnePatternCaseLabelAllowed,
+			NoArgument,
+			NoArgument,
+			element.sourceStart,
+			element.sourceEnd);
+}
+public void switchPatternBothPatternAndDefaultCaseLabelsNotAllowed(Expression element) {
+	this.handle(
+			IProblem.SwitchPatternBothPatternAndDefaultCaseLabelsNotAllowed,
+			NoArgument,
+			NoArgument,
+			element.sourceStart,
+			element.sourceEnd);
+}
+public void switchPatternBothNullAndNonTypePatternNotAllowed(Expression element) {
+	this.handle(
+			IProblem.SwitchPatternBothNullAndNonTypePatternNotAllowed,
+			NoArgument,
+			NoArgument,
+			element.sourceStart,
+			element.sourceEnd);
+}
+public void patternDominatingAnother(Expression element) {
+	this.handle(
+			IProblem.PatternDominates,
+			NoArgument,
+			NoArgument,
+			element.sourceStart,
+			element.sourceEnd);
+}
+public void illegalTotalPatternWithDefault(Statement element) {
+	this.handle(
+			IProblem.IllegalTotalPatternWithDefault,
+			NoArgument,
+			NoArgument,
+			element.sourceStart,
+			element.sourceEnd);
+}
+}
diff --git a/org.eclipse.jdt.core/compiler/org/eclipse/jdt/internal/compiler/problem/messages.properties b/org.eclipse.jdt.core/compiler/org/eclipse/jdt/internal/compiler/problem/messages.properties
index 75f47fb..9b6cd3c 100644
--- a/org.eclipse.jdt.core/compiler/org/eclipse/jdt/internal/compiler/problem/messages.properties
+++ b/org.eclipse.jdt.core/compiler/org/eclipse/jdt/internal/compiler/problem/messages.properties
@@ -692,6 +692,9 @@
 720 = The expression of type {0} is boxed into {1}
 721 = The expression of type {0} is unboxed into {1}
 
+### MODIFIERS
+741 = Floating-point expressions are always strictly evaluated from source level 17. Keyword 'strictfp' is not required.
+
 ### ENUMS
 750 = Illegal modifier for the enum {0}; only public is permitted
 751 = Illegal modifier for the enum constant {0}; no modifier is allowed
@@ -1112,6 +1115,17 @@
 1866 = Sealed type {2} and sub type {0} in an unnamed module should be declared in the same package {1}
 1867 = Sealed type {1} cannot be super type of {0} as it is from a different package or split package or module
 
+# Switch Patterns - Java 17 - JEP 406 - preview
+1900 = Local variable {0} referenced from a guard must be final or effectively final
+1901 = The constant case label element is not compatible with switch expression type {0}
+1902 = Constant case label elements and pattern case label elements cannot be present in a switch label
+1903 = Illegal fall-through to a pattern case label 
+1904 = A switch label may not have more than one pattern case label element.
+1905 = A switch label may not have both a pattern case label element and a default case label element.
+1906 = A null case label and patterns can co-exist only if the pattern is a type pattern
+1907 = This pattern dominates one or more of the following patterns
+1908 = Switch case cannot have both a total pattern and default label
+
 ### ELABORATIONS
 ## Access restrictions
 78592 = The type ''{1}'' is not API (restriction on classpath entry ''{0}'')
diff --git a/org.eclipse.jdt.core/compiler/org/eclipse/jdt/internal/compiler/util/Messages.java b/org.eclipse.jdt.core/compiler/org/eclipse/jdt/internal/compiler/util/Messages.java
index 34590a4..ef5eeaf 100644
--- a/org.eclipse.jdt.core/compiler/org/eclipse/jdt/internal/compiler/util/Messages.java
+++ b/org.eclipse.jdt.core/compiler/org/eclipse/jdt/internal/compiler/util/Messages.java
@@ -122,6 +122,7 @@
 	public static String pattern_matching_instanceof;
 	public static String records;
 	public static String sealed_types;
+	public static String pattern_matching_switch;
 
 	static {
 		initializeMessages(BUNDLE_NAME, Messages.class);
diff --git a/org.eclipse.jdt.core/dom/org/eclipse/jdt/core/dom/AST.java b/org.eclipse.jdt.core/dom/org/eclipse/jdt/core/dom/AST.java
index 10a6193..c6b26a0 100644
--- a/org.eclipse.jdt.core/dom/org/eclipse/jdt/core/dom/AST.java
+++ b/org.eclipse.jdt.core/dom/org/eclipse/jdt/core/dom/AST.java
@@ -8,6 +8,10 @@
  *
  * SPDX-License-Identifier: EPL-2.0
  *
+ * This is an implementation of an early-draft specification developed under the Java
+ * Community Process (JCP) and is made available for testing and evaluation purposes
+ * only. The code is not compatible with any specification of the JCP.
+ *
  * Contributors:
  *     IBM Corporation - initial API and implementation
  *******************************************************************************/
@@ -365,16 +369,31 @@
 	 * <p>
 	 * This API is capable of handling all constructs in the
 	 * Java language as described in the Java Language
-	 * Specification, Java SE 15 Edition (JLS16).
+	 * Specification, Java SE 16 Edition (JLS16).
 	 * JLS16 is a superset of all earlier versions of the
 	 * Java language, and the JLS16 API can be used to manipulate
 	 * programs written in all versions of the Java language
 	 * up to and including Java SE 16(aka JDK 16).
 	 * </p>
-	 *
+	 * * @deprecated Clients should use the {@link #getJLSLatest()} AST API instead.
 	 * @since 3.26
 	 */
 	public static final int JLS16 = 16;
+	/**
+	 * Constant for indicating the AST API that handles JLS17.
+	 * <p>
+	 * This API is capable of handling all constructs in the
+	 * Java language as described in the Java Language
+	 * Specification, Java SE 17 Edition (JLS17).
+	 * JLS17 is a superset of all earlier versions of the
+	 * Java language, and the JLS17 API can be used to manipulate
+	 * programs written in all versions of the Java language
+	 * up to and including Java SE 17(aka JDK 17).
+	 * </p>
+	 *
+	 * @since 3.27 BETA_JAVA17
+	 */
+	public static final int JLS17 = 17;
 
 	/**
 	 * Internal synonym for {@link #JLS15}. Use to alleviate
@@ -386,19 +405,24 @@
 	 * deprecation warnings once JLS16 is deprecated
 	 */
 	static final int JLS16_INTERNAL = JLS16;
+	/**
+	 * Internal synonym for {@link #JLS17}. Use to alleviate
+	 * deprecation warnings once JLS17 is deprecated
+	 */
+	static final int JLS17_INTERNAL = JLS17;
 
 	/**
 	 * Internal property for latest supported JLS level
 	 * This provides the latest JLS level.
 	 */
-	private static final int JLS_INTERNAL_Latest = JLS16;
+	private static final int JLS_INTERNAL_Latest = JLS17;
 
 	/**
 	 * @since 3.26
 	 * This provides the latest JLS level.
 	 * @deprecated use {@link #getJLSLatest()}
 	 */
-	public static final int JLS_Latest = JLS_INTERNAL_Latest;
+	public static final int JLS_Latest = JLS17;
 
 	/*
 	 * Must not collide with a value for ICompilationUnit constants
@@ -1032,10 +1056,15 @@
 						true/*taskCaseSensitive*/,
 						false/*isPreviewEnabled*/);
 				break;
-			case JLS11_INTERNAL :
+			default:
+				if (level < JLS2_INTERNAL && level > JLS_Latest) {
+					throw new IllegalArgumentException("Unsupported JLS level : " + level); //$NON-NLS-1$
+				}
 				this.apiLevel = level;
 				// initialize a scanner
-				long compliance = ClassFileConstants.getComplianceLevelForJavaVersion(ClassFileConstants.MAJOR_VERSION_11);
+				// As long as the AST levels and ClassFileConstants.MAJOR_VERSION grow simultaneously,
+				// we can use the offset of +44 to compute the Major version from the given AST Level
+				long compliance = ClassFileConstants.getComplianceLevelForJavaVersion(level + 44);
 				this.scanner = new Scanner(
 						true /*comment*/,
 						true /*whitespace*/,
@@ -1047,83 +1076,6 @@
 						true/*taskCaseSensitive*/,
 						false/*isPreviewEnabled*/);
 				break;
-			case JLS12_INTERNAL :
-				this.apiLevel = level;
-				// initialize a scanner
-				compliance = ClassFileConstants.getComplianceLevelForJavaVersion(ClassFileConstants.MAJOR_VERSION_12);
-				this.scanner = new Scanner(
-						true /*comment*/,
-						true /*whitespace*/,
-						false /*nls*/,
-						compliance /*sourceLevel*/,
-						compliance /*complianceLevel*/,
-						null/*taskTag*/,
-						null/*taskPriorities*/,
-						true/*taskCaseSensitive*/,
-						previewEnabled);
-				break;
-			case JLS13_INTERNAL :
-				this.apiLevel = level;
-				// initialize a scanner
-				compliance = ClassFileConstants.getComplianceLevelForJavaVersion(ClassFileConstants.MAJOR_VERSION_13);
-				this.scanner = new Scanner(
-						true /*comment*/,
-						true /*whitespace*/,
-						false /*nls*/,
-						compliance /*sourceLevel*/,
-						compliance /*complianceLevel*/,
-						null/*taskTag*/,
-						null/*taskPriorities*/,
-						true/*taskCaseSensitive*/,
-						previewEnabled);
-				break;
-			case JLS14_INTERNAL :
-				this.apiLevel = level;
-				// initialize a scanner
-				compliance = ClassFileConstants.getComplianceLevelForJavaVersion(ClassFileConstants.MAJOR_VERSION_14);
-				this.scanner = new Scanner(
-						true /*comment*/,
-						true /*whitespace*/,
-						false /*nls*/,
-						compliance /*sourceLevel*/,
-						compliance /*complianceLevel*/,
-						null/*taskTag*/,
-						null/*taskPriorities*/,
-						true/*taskCaseSensitive*/,
-						previewEnabled);
-				break;
-			case JLS15_INTERNAL :
-				this.apiLevel = level;
-				// initialize a scanner
-				compliance = ClassFileConstants.getComplianceLevelForJavaVersion(ClassFileConstants.MAJOR_VERSION_15);
-				this.scanner = new Scanner(
-						true /*comment*/,
-						true /*whitespace*/,
-						false /*nls*/,
-						compliance /*sourceLevel*/,
-						compliance /*complianceLevel*/,
-						null/*taskTag*/,
-						null/*taskPriorities*/,
-						true/*taskCaseSensitive*/,
-						previewEnabled);
-				break;
-			case JLS16_INTERNAL :
-				this.apiLevel = level;
-				// initialize a scanner
-				compliance = ClassFileConstants.getComplianceLevelForJavaVersion(ClassFileConstants.MAJOR_VERSION_16);
-				this.scanner = new Scanner(
-						true /*comment*/,
-						true /*whitespace*/,
-						false /*nls*/,
-						compliance /*sourceLevel*/,
-						compliance /*complianceLevel*/,
-						null/*taskTag*/,
-						null/*taskPriorities*/,
-						true/*taskCaseSensitive*/,
-						previewEnabled);
-				break;
-			default:
-				throw new IllegalArgumentException("Unsupported JLS level"); //$NON-NLS-1$
 		}
 	}
 
@@ -1138,8 +1090,9 @@
 	 *    	<code>"1.3"</code> means the source code is as per JDK 1.3 and api level {@link #JLS3}.</li>
 	 *    	<li><code>"1.4", "1.5", "1.6", "1.7" "1.8"</code> implies the respective source JDK levels 1.4, 1.5, 1.6, 1.7 and api level {@link #JLS4}.</li>
 	 *    	<li><code>"1.8"</code> implies the respective source JDK level 1.8 and api level {@link #JLS8}.</li>
-	 *    	<li><code>"9", "10", "11", "12" and "13"</code> implies the respective JDK levels 9, 10, 11, 12 and 13
-	 *     	and api levels {@link #JLS9}, {@link #JLS10}, {@link #JLS11}, {@link #JLS12} and {@link #JLS13}.</li>
+	 *    	<li><code>"9", "10", "11", "12", "13", "14", "15", "16" and "17"</code> implies the respective JDK levels 9, 10, 11, 12, 13, 14, 15, 16 and 17
+	 *     	and api levels {@link #JLS9}, {@link #JLS10}, {@link #JLS11}, {@link #JLS12}, {@link #JLS13}
+	 *     {@link #JLS14}, {@link #JLS15}, {@link #JLS16} and {@link #JLS17}.</li>
 	 *    	<li>Additional legal values may be added later.</li>
 	 *    </ul>
 	 * 	<li><code>"org.eclipse.jdt.core.compiler.problem.enablePreviewFeatures"</code> -
@@ -1203,6 +1156,7 @@
         t.put(JavaCore.VERSION_14, ClassFileConstants.JDK14);
         t.put(JavaCore.VERSION_15, ClassFileConstants.JDK15);
         t.put(JavaCore.VERSION_16, ClassFileConstants.JDK16);
+        t.put(JavaCore.VERSION_17, ClassFileConstants.JDK17);
         return Collections.unmodifiableMap(t);
 	}
 	private static Map<String, Integer> getApiLevelMapTable() {
@@ -1223,6 +1177,7 @@
         t.put(JavaCore.VERSION_14, JLS14_INTERNAL);
         t.put(JavaCore.VERSION_15, JLS15_INTERNAL);
         t.put(JavaCore.VERSION_16, JLS16_INTERNAL);
+        t.put(JavaCore.VERSION_17, JLS17_INTERNAL);
         return Collections.unmodifiableMap(t);
 	}
 	/**
diff --git a/org.eclipse.jdt.core/dom/org/eclipse/jdt/core/dom/ASTConverter.java b/org.eclipse.jdt.core/dom/org/eclipse/jdt/core/dom/ASTConverter.java
index a8d99e3..a57e110 100644
--- a/org.eclipse.jdt.core/dom/org/eclipse/jdt/core/dom/ASTConverter.java
+++ b/org.eclipse.jdt.core/dom/org/eclipse/jdt/core/dom/ASTConverter.java
@@ -8,6 +8,10 @@
  *
  * SPDX-License-Identifier: EPL-2.0
  *
+ * This is an implementation of an early-draft specification developed under the Java
+ * Community Process (JCP) and is made available for testing and evaluation purposes
+ * only. The code is not compatible with any specification of the JCP.
+ *
  * Contributors:
  *     IBM Corporation - initial API and implementation
  *     Stephan Herrmann - Contribution for
@@ -1963,6 +1967,9 @@
 		if (expression instanceof org.eclipse.jdt.internal.compiler.ast.ArrayInitializer) {
 			return convert((org.eclipse.jdt.internal.compiler.ast.ArrayInitializer) expression);
 		}
+		if (expression instanceof org.eclipse.jdt.internal.compiler.ast.Pattern) {
+			return convert((org.eclipse.jdt.internal.compiler.ast.Pattern) expression);
+		}
 		if (expression instanceof org.eclipse.jdt.internal.compiler.ast.PrefixExpression) {
 			return convert((org.eclipse.jdt.internal.compiler.ast.PrefixExpression) expression);
 		}
@@ -2739,6 +2746,12 @@
 		return postfixExpression;
 	}
 
+	// TODO: A placeholder BUG 573941 TO ADDRESS THIS
+	public Expression convert(org.eclipse.jdt.internal.compiler.ast.Pattern expression) {
+		Expression expr = new NullLiteral(this.ast);
+		expr.setSourceRange(expression.sourceStart, expression.sourceEnd - expression.sourceStart + 1);
+		return expr;
+	}
 	public PrefixExpression convert(org.eclipse.jdt.internal.compiler.ast.PrefixExpression expression) {
 		final PrefixExpression prefixExpression = new PrefixExpression(this.ast);
 		if (this.resolveBindings) {
diff --git a/org.eclipse.jdt.core/dom/org/eclipse/jdt/core/dom/ASTNode.java b/org.eclipse.jdt.core/dom/org/eclipse/jdt/core/dom/ASTNode.java
index 7c30e69..c4d1817 100644
--- a/org.eclipse.jdt.core/dom/org/eclipse/jdt/core/dom/ASTNode.java
+++ b/org.eclipse.jdt.core/dom/org/eclipse/jdt/core/dom/ASTNode.java
@@ -8,6 +8,9 @@
  *
  * SPDX-License-Identifier: EPL-2.0
  *
+ * This is an implementation of an early-draft specification developed under the Java
+ * Community Process (JCP) and is made available for testing and evaluation purposes
+ * only. The code is not compatible with any specification of the JCP.
  *
  * Contributors:
  *     IBM Corporation - initial API and implementation
@@ -1004,6 +1007,7 @@
 	 */
 	public static final int PATTERN_INSTANCEOF_EXPRESSION = 104;
 
+
 	/**
 	 * Returns the node class for the corresponding node type.
 	 *
@@ -2215,6 +2219,22 @@
 		}
 	}
 
+	/**
+     * Checks that this AST operation is not used when
+     * building JLS2, JLS3, JLS4, JLS8, JLS9, JLS10, JLS11, JLS12, JLS13, JSL14, JSL15 or JLS16 level ASTs.
+     * <p>
+     * Use this method to prevent access to new properties that have been added in JLS17
+     * </p>
+     *
+	 * @exception UnsupportedOperationException if this operation is used below JLS17
+	 * @since 3.27 BETA_JAVA17
+	 */
+	final void unsupportedBelow17() {
+		if (this.ast.apiLevel < AST.JLS17_INTERNAL) {
+			throw new UnsupportedOperationException("Operation only supported in ASTs with level JLS17 and above"); //$NON-NLS-1$
+		}
+	}
+
 
 	/**
      * Checks that this AST operation is not used when
@@ -2348,6 +2368,22 @@
 	}
 
 	/**
+ 	 * Checks that this AST operation is only used when
+     * building JLS17 level ASTs.
+     * <p>
+     * Use this method to prevent access to new properties available only in JLS17.
+     * </p>
+     *
+	 * @exception UnsupportedOperationException if this operation is not used in JLS17
+	 * @since 3.27 BETA_JAVA17
+	 */
+	final void supportedOnlyIn17() {
+		if (this.ast.apiLevel != AST.JLS17_INTERNAL) {
+			throw new UnsupportedOperationException("Operation only supported in JLS17 AST"); //$NON-NLS-1$
+		}
+	}
+
+	/**
 	 * Sets or clears this node's parent node and location.
 	 * <p>
 	 * Note that this method is package-private. The pointer from a node
diff --git a/org.eclipse.jdt.core/dom/org/eclipse/jdt/core/dom/TypeDeclaration.java b/org.eclipse.jdt.core/dom/org/eclipse/jdt/core/dom/TypeDeclaration.java
index 7027f52..974b434 100644
--- a/org.eclipse.jdt.core/dom/org/eclipse/jdt/core/dom/TypeDeclaration.java
+++ b/org.eclipse.jdt.core/dom/org/eclipse/jdt/core/dom/TypeDeclaration.java
@@ -1,5 +1,5 @@
 /*******************************************************************************
- * Copyright (c) 2000, 2020 IBM Corporation and others.
+ * Copyright (c) 2000, 2021 IBM Corporation and others.
  *
  * This program and the accompanying materials
  * are made available under the terms of the Eclipse Public License 2.0
@@ -7,7 +7,9 @@
  * https://www.eclipse.org/legal/epl-2.0/
  *
  * SPDX-License-Identifier: EPL-2.0
- *
+ * This is an implementation of an early-draft specification developed under the Java
+ * Community Process (JCP) and is made available for testing and evaluation purposes
+ * only. The code is not compatible with any specification of the JCP.
  * Contributors:
  *     IBM Corporation - initial API and implementation
  *******************************************************************************/
@@ -221,27 +223,7 @@
 	 * @since 3.0
 	 */
 	public static List propertyDescriptors(int apiLevel) {
-		if (apiLevel == AST.JLS2_INTERNAL) {
-			return PROPERTY_DESCRIPTORS_2_0;
-		} else {
-			return PROPERTY_DESCRIPTORS_3_0;
-		}
-	}
-
-	/**
-	 * Returns a list of structural property descriptors for this node type.
-	 * Clients must not modify the result.
-	 *
-	 * @param apiLevel the API level; one of the
-	 * <code>AST.JLS*</code> constants
-	 * @param previewEnabled the previewEnabled flag
-	 * @return a list of property descriptors (element type:
-	 * {@link StructuralPropertyDescriptor})
-	 * @noreference This method is not intended to be referenced by clients.
-	 * @since 3.22
-	 */
-	public static List propertyDescriptors(int apiLevel, boolean previewEnabled) {
-		if (DOMASTUtil.isFeatureSupportedinAST(apiLevel, previewEnabled, Modifier.SEALED)) {
+		if (DOMASTUtil.isFeatureSupportedinAST(apiLevel, Modifier.SEALED)) {
 			return PROPERTY_DESCRIPTORS_15;
 		} else if (apiLevel == AST.JLS2_INTERNAL) {
 			return PROPERTY_DESCRIPTORS_2_0;
@@ -340,11 +322,6 @@
 	}
 
 	@Override
-	final List internalStructuralPropertiesForType(int apiLevel, boolean previewEnabled) {
-		return propertyDescriptors(apiLevel, previewEnabled);
-	}
-
-	@Override
 	final int internalGetSetIntProperty(SimplePropertyDescriptor property, boolean get, int value) {
 		if (property == MODIFIERS_PROPERTY) {
 			if (get) {
@@ -745,20 +722,19 @@
 
 	/**
 	 * Returns the live ordered list of permits of this type
-	 * declaration (added in JLS15 API). For a type declaration, these are the
+	 * declaration (added in JLS17 API). For a type declaration, these are the
 	 * permitted types which can implement/extend this sealed type.
 	 *
 	 *
 	 * @return the live list of types
 	 *    (element type: {@link Type})
-	 * @exception UnsupportedOperationException if this operation is not used with Java 16 and preview enabled
-	 * @since 3.24
+	 * @exception UnsupportedOperationException if this operation is not used with Java 17 and above
+	 * @since 3.27 BETA_JAVA17
 	 */
 	public List permittedTypes() {
 		// more efficient than just calling unsupportedIn2() to check
 		if (this.permittedTypes == null) {
-			supportedOnlyIn16();
-			unsupportedWithoutPreviewError();
+			unsupportedBelow17();
 		}
 		return this.permittedTypes;
 	}
@@ -891,8 +867,7 @@
 	/**
 	 * A character index into the original restricted identifier source string, or <code>-1</code> if no restricted
 	 * identifier source position information is available for this node; <code>-1</code> by default.
-	 *
-	 * @noreference This method is not intended to be referenced by clients.
+	 * @since 3.27 BETA_JAVA17
 	 */
 	public void setRestrictedIdentifierStartPosition(int restrictedIdentifierStartPosition) {
 		if (restrictedIdentifierStartPosition < 0) {
@@ -907,8 +882,7 @@
 	/**
 	 * A character index into the original restricted identifier source string, or <code>-1</code> if no restricted
 	 * identifier source position information is available for this node; <code>-1</code> by default.
-	 *
-	 * @noreference This method is not intended to be referenced by clients.
+	 * @since 3.27 BETA_JAVA17
 	 */
 	public int getRestrictedIdentifierStartPosition() {
 		return this.restrictedIdentifierStartPosition;
diff --git a/org.eclipse.jdt.core/dom/org/eclipse/jdt/internal/core/dom/util/DOMASTUtil.java b/org.eclipse.jdt.core/dom/org/eclipse/jdt/internal/core/dom/util/DOMASTUtil.java
index 9977117..79f93a6 100644
--- a/org.eclipse.jdt.core/dom/org/eclipse/jdt/internal/core/dom/util/DOMASTUtil.java
+++ b/org.eclipse.jdt.core/dom/org/eclipse/jdt/internal/core/dom/util/DOMASTUtil.java
@@ -8,6 +8,10 @@
  *
  * SPDX-License-Identifier: EPL-2.0
  *
+ * This is an implementation of an early-draft specification developed under the Java
+ * Community Process (JCP) and is made available for testing and evaluation purposes
+ * only. The code is not compatible with any specification of the JCP.
+ *
  * Contributors:
  *     IBM Corporation - initial API and implementation
  *******************************************************************************/
@@ -86,9 +90,9 @@
 	public static boolean isFeatureSupportedinAST(AST ast, int featureName) {
 		switch (featureName) {
 			case Modifier.SEALED:
-				return isPreviewEnabled(ast.apiLevel(), ast.isPreviewEnabledSet());
+				return ast.apiLevel() >= AST.JLS17;
 			case Modifier.NON_SEALED:
-				return isPreviewEnabled(ast.apiLevel(), ast.isPreviewEnabledSet());
+				return ast.apiLevel() >= AST.JLS17;
 		}
 		return false;
 	}
@@ -112,15 +116,39 @@
 	public static boolean isFeatureSupportedinAST(int apiLevel, boolean previewEnabled, int featureName) {
 		switch (featureName) {
 			case Modifier.SEALED:
-				return isPreviewEnabled(apiLevel, previewEnabled);
+				return apiLevel >= AST.JLS17;
 			case Modifier.NON_SEALED:
-				return isPreviewEnabled(apiLevel, previewEnabled);
+				return apiLevel >= AST.JLS17;
 		}
 		return false;
 	}
 
-	private static boolean isPreviewEnabled(int apiLevel, boolean previewEnabled) {
-		return (apiLevel == AST.JLS16 && previewEnabled);
+	/**
+	 * Validates if the given <code>apiLevel</code> and <code>previewEnabled</code> supports the provided
+	 * <code>nodeType</code>. This API checks for node types supported from JLS 14 onwards and will return
+	 * <code>true></code> for nodes added before JLS14.
+	 *
+	 * @param apiLevel
+	 *            the level to be checked
+	 * @param featureName
+	 *            the feature name constant indicating the feature to be evaluated
+	 * @return <code>true</code> if the given <code>AST</code> supports the provided <code>nodeType</code> else
+	 *         <code>false</code>
+	 * @see ASTNode#getNodeType()
+	 * @since 3.27 BETA_JAVA17
+	 */
+	public static boolean isFeatureSupportedinAST(int apiLevel, int featureName) {
+		switch (featureName) {
+			case Modifier.SEALED:
+				return apiLevel >= AST.JLS17;
+			case Modifier.NON_SEALED:
+				return apiLevel >= AST.JLS17;
+		}
+		return false;
+	}
+
+	public static boolean isPreviewEnabled(int apiLevel, boolean previewEnabled) {
+		return (apiLevel == AST.JLS17 && previewEnabled);
 	}
 
 	public static boolean isSwitchExpressionSupported(AST ast) {
@@ -163,7 +191,7 @@
 
 	private static final String[] AST_COMPLIANCE_MAP = {"-1","-1",JavaCore.VERSION_1_2, JavaCore.VERSION_1_3, JavaCore.VERSION_1_7, //$NON-NLS-1$ //$NON-NLS-2$
 			JavaCore.VERSION_1_7, JavaCore.VERSION_1_7, JavaCore.VERSION_1_7, JavaCore.VERSION_1_8, JavaCore.VERSION_9, JavaCore.VERSION_10,
-			JavaCore.VERSION_11, JavaCore.VERSION_12, JavaCore.VERSION_13, JavaCore.VERSION_14, JavaCore.VERSION_15, JavaCore.VERSION_16};
+			JavaCore.VERSION_11, JavaCore.VERSION_12, JavaCore.VERSION_13, JavaCore.VERSION_14, JavaCore.VERSION_15, JavaCore.VERSION_16, JavaCore.VERSION_17};
 
 	/**
 	 * Calculates the JavaCore Option value string corresponding to the input ast level.
diff --git a/org.eclipse.jdt.core/eval/org/eclipse/jdt/internal/eval/CodeSnippetQualifiedNameReference.java b/org.eclipse.jdt.core/eval/org/eclipse/jdt/internal/eval/CodeSnippetQualifiedNameReference.java
index 1df9f03..6500f27 100644
--- a/org.eclipse.jdt.core/eval/org/eclipse/jdt/internal/eval/CodeSnippetQualifiedNameReference.java
+++ b/org.eclipse.jdt.core/eval/org/eclipse/jdt/internal/eval/CodeSnippetQualifiedNameReference.java
@@ -1,5 +1,5 @@
 /*******************************************************************************
- * Copyright (c) 2000, 2015 IBM Corporation and others.
+ * Copyright (c) 2000, 2021 IBM Corporation and others.
  *
  * This program and the accompanying materials
  * are made available under the terms of the Eclipse Public License 2.0
@@ -8,6 +8,10 @@
  *
  * SPDX-License-Identifier: EPL-2.0
  *
+ * This is an implementation of an early-draft specification developed under the Java
+ * Community Process (JCP) and is made available for testing and evaluation purposes
+ * only. The code is not compatible with any specification of the JCP.
+ *
  * Contributors:
  *     IBM Corporation - initial API and implementation
  *     Stephan Herrmann - Contributions for
@@ -349,9 +353,8 @@
 				codeStream.generateConstant(localConstant, 0);
 				// no implicit conversion
 			} else {
-				// outer local?
-				if ((this.bits & IsCapturedOuterLocal) != 0) {
-					checkEffectiveFinality(localBinding, currentScope);
+				// checkEffectiveFinality() returns if it's outer local
+				if (checkEffectiveFinality(localBinding, currentScope)) {
 					// outer local can be reached either through a synthetic arg or a synthetic field
 					VariableBinding[] path = currentScope.getEmulationPath(localBinding);
 					codeStream.generateOuterAccess(path, this, localBinding, currentScope);
diff --git a/org.eclipse.jdt.core/eval/org/eclipse/jdt/internal/eval/CodeSnippetSingleNameReference.java b/org.eclipse.jdt.core/eval/org/eclipse/jdt/internal/eval/CodeSnippetSingleNameReference.java
index 64ea6e4..6d17494 100644
--- a/org.eclipse.jdt.core/eval/org/eclipse/jdt/internal/eval/CodeSnippetSingleNameReference.java
+++ b/org.eclipse.jdt.core/eval/org/eclipse/jdt/internal/eval/CodeSnippetSingleNameReference.java
@@ -1,5 +1,5 @@
 /*******************************************************************************
- * Copyright (c) 2000, 2015 IBM Corporation and others.
+ * Copyright (c) 2000, 2021 IBM Corporation and others.
  *
  * This program and the accompanying materials
  * are made available under the terms of the Eclipse Public License 2.0
@@ -8,6 +8,10 @@
  *
  * SPDX-License-Identifier: EPL-2.0
  *
+ * This is an implementation of an early-draft specification developed under the Java
+ * Community Process (JCP) and is made available for testing and evaluation purposes
+ * only. The code is not compatible with any specification of the JCP.
+ *
  * Contributors:
  *     IBM Corporation - initial API and implementation
  *     Stephan Herrmann - Contributions for
@@ -262,9 +266,8 @@
 				}
 				if (!valueRequired)
 					break;
-				// outer local?
-				if ((this.bits & IsCapturedOuterLocal) != 0) {
-					checkEffectiveFinality(localBinding, currentScope);
+				// checkEffectiveFinality() returns if it's outer local
+				if (checkEffectiveFinality(localBinding, currentScope)) {
 					// outer local can be reached either through a synthetic arg or a synthetic field
 					VariableBinding[] path = currentScope.getEmulationPath(localBinding);
 					codeStream.generateOuterAccess(path, this, localBinding, currentScope);
diff --git a/org.eclipse.jdt.core/formatter/org/eclipse/jdt/internal/formatter/DefaultCodeFormatter.java b/org.eclipse.jdt.core/formatter/org/eclipse/jdt/internal/formatter/DefaultCodeFormatter.java
index 12fe532..3dc05c1 100644
--- a/org.eclipse.jdt.core/formatter/org/eclipse/jdt/internal/formatter/DefaultCodeFormatter.java
+++ b/org.eclipse.jdt.core/formatter/org/eclipse/jdt/internal/formatter/DefaultCodeFormatter.java
@@ -7,7 +7,9 @@
  * https://www.eclipse.org/legal/epl-2.0/
  *
  * SPDX-License-Identifier: EPL-2.0
- *
+ * This is an implementation of an early-draft specification developed under the Java
+ * Community Process (JCP) and is made available for testing and evaluation purposes
+ * only. The code is not compatible with any specification of the JCP.
  * Contributors:
  *     IBM Corporation - initial API and implementation
  *     Jesper Steen Moller - Contributions for
@@ -332,6 +334,7 @@
 		return null;
 	}
 
+	@SuppressWarnings("deprecation")
 	private ASTParser createParser(int kind) {
 		ASTParser parser = ASTParser.newParser(AST.JLS16);
 
diff --git a/org.eclipse.jdt.core/grammar/java.g b/org.eclipse.jdt.core/grammar/java.g
index 0aadad3..9772139 100644
--- a/org.eclipse.jdt.core/grammar/java.g
+++ b/org.eclipse.jdt.core/grammar/java.g
@@ -119,6 +119,7 @@
 	RestrictedIdentifierrecord
 	RestrictedIdentifiersealed
 	RestrictedIdentifierpermits
+	BeginCaseElement
 
 --    BodyMarker
 
@@ -228,7 +229,8 @@
 -- JSR 360 Restricted
 Goal ::= RestrictedIdentifiersealed Modifiersopt
 Goal ::= RestrictedIdentifierpermits PermittedSubclasses
-
+-- jsr 406 --
+Goal ::= BeginCaseElement Pattern
 /:$readableName Goal:/
 
 Literal -> IntegerLiteral
@@ -1223,7 +1225,7 @@
 -----------------------------------------------
 
 -----------------------------------------------
--- 14 preview feature : instanceof pattern matching
+-- 16 feature : instanceof pattern matching
 -----------------------------------------------
 
 InstanceofExpression -> RelationalExpression
@@ -1232,7 +1234,8 @@
 /:$readableName Expression:/
 
 InstanceofRHS -> InstanceofClassic
-InstanceofRHS -> InstanceofPattern
+InstanceofRHS -> InstanceofPrimaryTypePattern
+InstanceofRHS -> InstanceofPrimaryParenPattern
 /.$putCase consumeInstanceOfRHS(); $break ./
 /:$readableName Expression:/
 
@@ -1240,12 +1243,37 @@
 /.$putCase consumeInstanceOfClassic(); $break ./
 /:$readableName InstanceofClassic:/
 
-InstanceofPattern ::=  InstanceofClassic Identifier
-/.$putCase consumeInstanceofPattern(); $break ./
-/:$readableName InstanceofPattern:/
+InstanceofPrimaryTypePattern ::=  'instanceof' Modifiersopt Type 'Identifier'
+/.$putCase consumeInstanceofPrimaryTypePattern(); $break ./
+/:$readableName InstanceofPrimaryTypePattern:/
+
+InstanceofPrimaryParenPattern ::=  'instanceof'  ParenthesizedPattern 
+/.$putCase consumeInstanceofPrimaryParenPattern(); $break ./
+/:$readableName InstanceofPrimaryParenPattern:/
+
+Pattern -> PrimaryPattern
+Pattern -> GuardedPattern
+/:$readableName Pattern:/
+
+PrimaryPattern -> TypePattern
+PrimaryPattern -> ParenthesizedPattern
+/.$putCase consumePrimaryPattern(); $break ./
+/:$readableName PrimaryPattern:/
+
+ParenthesizedPattern ::= PushLPAREN Pattern PushRPAREN
+/.$putCase consumeParenthesizedPattern(); $break ./
+/:$readableName ParenthesizedPattern:/
+
+TypePattern ::= Modifiersopt Type 'Identifier'
+/.$putCase consumeTypePattern(); $break ./
+/:$readableName TypePattern:/
+
+GuardedPattern ::= PrimaryPattern '&&' ConditionalAndExpression
+/.$putCase consumeGuardedPattern(); $break ./
+/:$readableName GuardedPattern:/
 
 -----------------------------------------------
--- 14 preview feature : end of instanceof pattern matching
+-- 16 feature : end of instanceof pattern matching
 -----------------------------------------------
 
 ConstantDeclaration -> FieldDeclaration
@@ -1484,12 +1512,33 @@
 /. $putCase consumeCaseLabelExpr(); $break ./
 /:$readableName SwitchLabelExpr:/
 
-SwitchLabelCaseLhs ::= 'case' ConstantExpressions
+SwitchLabelCaseLhs ::= 'case' CaseLabelElements
 /. $putCase consumeSwitchLabelCaseLhs(); $break ./
 /:$readableName SwitchLabelCaseLhs:/
 
 -- END SwitchExpression (JEP 325) --
 
+CaseLabelElements -> CaseLabelElement
+CaseLabelElements ::= CaseLabelElements ',' CaseLabelElement
+/.$putCase consumeCaseLabelElements(); $break ./
+/:$readableName CaseLabelElements:/
+
+-- Production name hardcoded in parser. Must be ::= and not -> (need to hook at cCLE)
+CaseLabelElement ::= ConstantExpression
+/.$putCase consumeCaseLabelElement(CaseLabelKind.CASE_EXPRESSION); $break ./
+/:$readableName CaseLabelElement:/
+
+ -- following 'null' in CASE_EXPRESSION - passes through existing grammar
+ -- CaseLabelElement ->  'null'
+  
+CaseLabelElement ::= 'default'
+/.$putCase consumeCaseLabelElement(CaseLabelKind.CASE_DEFAULT); $break ./
+/:$readableName CaseLabelElement:/
+
+CaseLabelElement ::= BeginCaseElement Pattern
+/.$putCase consumeCaseLabelElement(CaseLabelKind.CASE_PATTERN); $break ./
+/:$readableName CaseLabelElement:/
+
 YieldStatement ::= RestrictedIdentifierYield Expression ;
 /.$putCase consumeStatementYield() ; $break ./
 /:$readableName YieldStatement:/
@@ -2200,11 +2249,6 @@
 Expressionopt -> Expression
 /:$readableName Expression:/
 
-ConstantExpressions -> ConstantExpression
-ConstantExpressions ::= ConstantExpressions ',' ConstantExpression
-/.$putCase consumeConstantExpressions(); $break ./
-/:$readableName ConstantExpressions:/
-
 ConstantExpression -> Expression
 /:$readableName ConstantExpression:/
 
diff --git a/org.eclipse.jdt.core/model/org/eclipse/jdt/core/JavaCore.java b/org.eclipse.jdt.core/model/org/eclipse/jdt/core/JavaCore.java
index 2b46bf9..c84f373 100644
--- a/org.eclipse.jdt.core/model/org/eclipse/jdt/core/JavaCore.java
+++ b/org.eclipse.jdt.core/model/org/eclipse/jdt/core/JavaCore.java
@@ -8,6 +8,10 @@
  *
  * SPDX-License-Identifier: EPL-2.0
  *
+ * This is an implementation of an early-draft specification developed under the Java
+ * Community Process (JCP) and is made available for testing and evaluation purposes
+ * only. The code is not compatible with any specification of the JCP.
+ *
  * Contributors:
  *     IBM Corporation - initial API and implementation
  *     IBM Corporation - added the following constants:
@@ -3145,12 +3149,18 @@
 	public static final String VERSION_16 = "16"; //$NON-NLS-1$
 	/**
 	 * Configurable option value: {@value}.
+	 * @since 3.27 BETA_JAVA17
+	 * @category OptionValue
+	 */
+	public static final String VERSION_17 = "17"; //$NON-NLS-1$
+	/**
+	 * Configurable option value: {@value}.
 	 * @since 3.4
 	 * @category OptionValue
 	 */
 	public static final String VERSION_CLDC_1_1 = "cldc1.1"; //$NON-NLS-1$
 	private static List<String> allVersions = Collections.unmodifiableList(Arrays.asList(VERSION_CLDC_1_1, VERSION_1_1, VERSION_1_2, VERSION_1_3, VERSION_1_4, VERSION_1_5,
-			VERSION_1_6, VERSION_1_7, VERSION_1_8, VERSION_9, VERSION_10, VERSION_11, VERSION_12, VERSION_13, VERSION_14, VERSION_15, VERSION_16));
+			VERSION_1_6, VERSION_1_7, VERSION_1_8, VERSION_9, VERSION_10, VERSION_11, VERSION_12, VERSION_13, VERSION_14, VERSION_15, VERSION_16, VERSION_17));
 
 	/**
 	 * Returns all {@link JavaCore}{@code #VERSION_*} levels in the order of their
diff --git a/org.eclipse.jdt.core/pom.xml b/org.eclipse.jdt.core/pom.xml
index a361616..7f5f1ef 100644
--- a/org.eclipse.jdt.core/pom.xml
+++ b/org.eclipse.jdt.core/pom.xml
@@ -1,6 +1,6 @@
 <?xml version="1.0" encoding="UTF-8"?>
 <!--
-  Copyright (c) 2012, 2020 Eclipse Foundation and others.
+  Copyright (c) 2012, 2021 Eclipse Foundation and others.
   All rights reserved. This program and the accompanying materials
   are made available under the terms of the Eclipse Distribution License v1.0
   which accompanies this distribution, and is available at
@@ -18,7 +18,7 @@
   </parent>
   <groupId>org.eclipse.jdt</groupId>
   <artifactId>org.eclipse.jdt.core</artifactId>
-  <version>3.27.0-SNAPSHOT</version>
+  <version>3.27.50-SNAPSHOT</version>
   <packaging>eclipse-plugin</packaging>
 
   <properties>
diff --git a/org.eclipse.jdt.core/search/org/eclipse/jdt/internal/core/search/matching/MatchLocatorParser.java b/org.eclipse.jdt.core/search/org/eclipse/jdt/internal/core/search/matching/MatchLocatorParser.java
index ac7e556..e5b4a86 100644
--- a/org.eclipse.jdt.core/search/org/eclipse/jdt/internal/core/search/matching/MatchLocatorParser.java
+++ b/org.eclipse.jdt.core/search/org/eclipse/jdt/internal/core/search/matching/MatchLocatorParser.java
@@ -8,6 +8,10 @@
  *
  * SPDX-License-Identifier: EPL-2.0
  *
+ * This is an implementation of an early-draft specification developed under the Java
+ * Community Process (JCP) and is made available for testing and evaluation purposes
+ * only. The code is not compatible with any specification of the JCP.
+ *
  * Contributors:
  *     IBM Corporation - initial API and implementation
  *******************************************************************************/
@@ -842,6 +846,17 @@
 }
 
 @Override
+protected void consumeTypePattern() {
+	super.consumeTypePattern();
+	if (this.patternFineGrain == 0) {
+		TypePattern td = (TypePattern) this.astStack[this.astPtr];
+		if (td.local != null) {
+			this.patternLocator.match(td.local, this.nodeSet);
+		}
+	}
+}
+
+@Override
 protected void consumeTypeParameterWithExtendsAndBounds() {
 	super.consumeTypeParameterWithExtendsAndBounds();
 	if ((this.patternFineGrain & IJavaSearchConstants.TYPE_VARIABLE_BOUND_TYPE_REFERENCE) != 0) {