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

Remove non-specified JVM checks on Classes with Record attributes

    XMLWordPrintable

    Details

    • Type: Bug
    • Status: Resolved
    • Priority: P4
    • Resolution: Fixed
    • Affects Version/s: 16
    • Fix Version/s: 16
    • Component/s: hotspot
    • Labels:
      None
    • Subcomponent:
    • Resolved In Build:
      b22

      Description

      The JVM should not throw a ClassFormatError exception for abstract or non-final classes that have a Record attribute because that check is not in the JVM Specification.

      from dlsmith:
      'Record' is not one of the critical attributes described in JVMS 4.7. Like 'Signature' and 'Exceptions', it encodes information that is modeled at the language level, but that the JVM runtime ignores. There is some basic structural validation of these attributes, but nothing that mandates a relationship to other class metadata.

      Additionally, the JVM skips Record attributes for classes whose super is not java.lang.Record. This also needs to change because it's not in the JVM Specification. The Record attribute should be parsed for these classes.

        Attachments

          Issue Links

            Activity

              People

              Assignee:
              hseigel Harold Seigel
              Reporter:
              hseigel Harold Seigel
              Votes:
              0 Vote for this issue
              Watchers:
              5 Start watching this issue

                Dates

                Created:
                Updated:
                Resolved: