JDK-8245855 : JVM TI Specification for sealed classes
  • Type: CSR
  • Component: hotspot
  • Sub-Component: jvmti
  • Priority: P4
  • Status: Closed
  • Resolution: Approved
  • Fix Versions: 15
  • Submitted: 2020-05-26
  • Updated: 2020-05-27
  • Resolved: 2020-05-27
Related Reports
CSR :  
Description
Summary
-------

This change adds the class file attribute PermittedSubclasses to the list of attributes that cannot be changed by class retransformation or class redefinition.

Problem
-------

Users need to be aware that class retransformation and class redefinition cannot change the PermittedSubclasses attribute.

Solution
--------

The specifications for class redefinition and retransformation, in the JVM TI specification are enhanced to disallow any modification of the PermittedSubclasses attribute.

Specification
-------------

The JVM TI Specification changes are as follows:

      @@ -7680,7 +7680,8 @@
              The retransformation must not add, remove or rename fields or methods, change the
              signatures of methods, change modifiers, or change inheritance.
              The retransformation must not change the <code>NestHost</code>,
     -        <code>NestMembers</code>, or <code>Record</code> attributes.
     +        <code>NestMembers</code>, <code>Record</code>, or <code>PermittedSubclasses</code>
     +        attributes.
              These restrictions may be lifted in future versions.
              See the error return description below for information on error codes
              returned if an unsupported retransformation is attempted.
     @@ -7833,7 +7834,8 @@
              The redefinition must not add, remove or rename fields or methods, change the
              signatures of methods, change modifiers, or change inheritance.
              The redefinition must not change the <code>NestHost</code>,
     -        <code>NestMembers</code>, or <code>Record</code> attributes.
     +        <code>NestMembers</code>, <code>Record</code>, or <code>PermittedSubclasses</code>
     +        attributes.
              These restrictions may be lifted in future versions.
              See the error return description below for information on error codes
              returned if an unsupported redefinition is attempted.
Comments
Moving to Approved.
27-05-2020

The CSR looks good to me. I've added myself to the reviewers list.
26-05-2020