RFR: JDK-8225056 VM support for sealed classes

Harold Seigel harold.seigel at oracle.com
Wed May 13 21:09:12 UTC 2020


Hi,

Please review this patch for JVM and Core-libs support for the JEP 360 
Sealed Classes preview feature.  Code changes include the following:

  * Processing of the new PermittedSubclasses attribute to enforce that
    a class or interface, whose super is a sealed class or interface,
    must be listed in the super's PermittedSubclasses attribute.
  * Disallow redefinition of a sealed class or interface if its
    redefinition would change its PermittedSubclasses attribute.
  * Support API's to determine if a class or interface is sealed and, if
    it's sealed, return a list of its permitted subclasses.
  * asm support for the PermittedSubclasses attribute

Open Webrev: 
http://cr.openjdk.java.net/~vromero/8225056/webrev.00/index.html

JBS bug: https://bugs.openjdk.java.net/browse/JDK-8225056

Java Language Spec changes: 
http://cr.openjdk.java.net/~gbierman/jep360/jep360-20200513/specs/sealed-classes-jls.html

JVM Spec changes: 
http://cr.openjdk.java.net/~gbierman/jep360/jep360-20200513/specs/sealed-classes-jvms.html

JEP 360: https://bugs.openjdk.java.net/browse/JDK-8227043

JVM CSR: https://bugs.openjdk.java.net/browse/JDK-8242578

Changes to javac and other language tools will be reviewed separately.

Thanks, Harold




More information about the core-libs-dev mailing list