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

JVM TI Specification for sealed classes

    XMLWordPrintable

    Details

    • Type: CSR
    • Status: Closed
    • Priority: P4
    • Resolution: Approved
    • Fix Version/s: 15
    • Component/s: hotspot
    • Labels:
      None
    • Subcomponent:
    • Compatibility Kind:
      behavioral
    • Compatibility Risk:
      minimal
    • Compatibility Risk Description:
      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.
    • Interface Kind:
      Class file construct
    • Scope:
      SE

      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.

        Attachments

          Issue Links

            Activity

              People

              Assignee:
              hseigel Harold Seigel
              Reporter:
              hseigel Harold Seigel
              Reviewed By:
              Serguei Spitsyn
              Votes:
              0 Vote for this issue
              Watchers:
              2 Start watching this issue

                Dates

                Created:
                Updated:
                Resolved: