Uploaded image for project: 'JDK'
  1. JDK
  2. JDK-8245855

JVM TI Specification for sealed classes

XMLWordPrintable

    • Icon: CSR CSR
    • Resolution: Approved
    • Icon: P4 P4
    • 15
    • hotspot
    • None
    • behavioral
    • minimal
    • This change documents that class retransformation and class redefinition cannot change the new PermittedSubclasses attribute. It is doubtful that anyone is currently using an attribute with that name and so no one should be affected by this change.
    • Class file construct
    • SE

      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.

            hseigel Harold Seigel (Inactive)
            hseigel Harold Seigel (Inactive)
            Serguei Spitsyn
            Votes:
            0 Vote for this issue
            Watchers:
            2 Start watching this issue

              Created:
              Updated:
              Resolved: