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

Class::isRecord should check that the current class is final and not abstract

    XMLWordPrintable

    Details

    • Type: Bug
    • Status: Resolved
    • Priority: P3
    • Resolution: Fixed
    • Affects Version/s: 16
    • Fix Version/s: 16
    • Component/s: core-libs
    • Labels:
    • Subcomponent:
    • Resolved In Build:
      b28

      Description

      The removal of non-specified JVM checks on classes with Record attributes JDK-8255342, has resulted in more types of loadable classes that may contain a Record attribute. Now that these checks are not performed by the JVM anymore, Class::isRecord (and by extension Class::getRecordAttributes) may return values for classes that are not wellformed record classes (as per the JLS), .e.g. for non-final classes or for abstract classes.

      Core Reflection, Class::isRecord, already asserts checks that the JVM does not, e.g. that the direct superclass is java.lang.Record.

        Attachments

          Issue Links

            Activity

              People

              Assignee:
              chegar Chris Hegarty
              Reporter:
              vromero Vicente Arturo Romero Zaldivar
              Votes:
              0 Vote for this issue
              Watchers:
              6 Start watching this issue

                Dates

                Created:
                Updated:
                Resolved: