Summary
-------
JEP 409 proposes that the Sealed Classes feature is ready to be made final and permanent. Currently the `javax.lang.model` APIs only support Sealed Classes as a preview feature. Making the feature standard in Java will affect these APIs.
Problem
-------
The preview status of `javax.lang.model` APIs that support the Sealed Classes feature should be updated so that they can be used in standard Java.
Solution
--------
Update `javax.lang.model` APIs that support the Sealed Classes feature so that they can be used in standard Java
Specification
-------------
diff --git a/src/java.compiler/share/classes/javax/lang/model/element/Modifier.java b/src/java.compiler/share/classes/javax/lang/model/element/Modifier.java
index 8ba4ab6a2be..dfbd76d2bf1 100644
--- a/src/java.compiler/share/classes/javax/lang/model/element/Modifier.java
+++ b/src/java.compiler/share/classes/javax/lang/model/element/Modifier.java
@@ -67,18 +67,14 @@ public enum Modifier {
/**
* The modifier {@code sealed}
- * @since 15
+ * @since 17
*/
- @jdk.internal.javac.PreviewFeature(feature=jdk.internal.javac.PreviewFeature.Feature.SEALED_CLASSES,
- reflective=true)
SEALED,
/**
* The modifier {@code non-sealed}
- * @since 15
+ * @since 17
*/
- @jdk.internal.javac.PreviewFeature(feature=jdk.internal.javac.PreviewFeature.Feature.SEALED_CLASSES,
- reflective=true)
NON_SEALED {
public String toString() {
return "non-sealed";
diff --git a/src/java.compiler/share/classes/javax/lang/model/element/TypeElement.java b/src/java.compiler/share/classes/javax/lang/model/element/TypeElement.java
index ac078309522..3d73a937b78 100644
--- a/src/java.compiler/share/classes/javax/lang/model/element/TypeElement.java
+++ b/src/java.compiler/share/classes/javax/lang/model/element/TypeElement.java
@@ -207,10 +207,8 @@ public interface TypeElement extends Element, Parameterizable, QualifiedNameable
*
* @return the permitted classes, or an empty list if there are none
*
- * @since 15
+ * @since 17
*/
- @jdk.internal.javac.PreviewFeature(feature=jdk.internal.javac.PreviewFeature.Feature.SEALED_CLASSES,
- reflective=true)
default List<? extends TypeMirror> getPermittedSubclasses() {
return List.of();
}