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

XMLWordPrintable

    • Type: Bug
    • Resolution: Fixed
    • Priority: P3
    • 16
    • Affects Version/s: 16
    • Component/s: core-libs
    • b28

      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.

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

              Created:
              Updated:
              Resolved: