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

    • Bug
    • Status: Resolved
    • P3
    • Resolution: Fixed
    • 16
    • 16
    • core-libs
    • 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

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

              Dates

                Created:
                Updated:
                Resolved: