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

4.7.6: Acknowledge that ACC_FINAL may be implicit

    Details

    • Type: Bug
    • Status: Closed
    • Priority: P5
    • Resolution: Fixed
    • Affects Version/s: 8
    • Fix Version/s: 9
    • Component/s: specification
    • Labels:
    • Subcomponent:
      vm

      Description

      JVMS 4.7.6 provides the interpretation of 'inner_class_access_flags' in a table, 4.7.6-A. Many interpretations mimic ACC_PUBLIC:

      "Marked or implicitly public in source."

      But ACC_FINAL does not acknowledge that some classes may be implicitly 'final':

      "Marked final in source."

      This is almost certainly an oversight -- the only implicitly-final classes are anonymous classes, per JLS 15.9.5. But they exist, and there's not a good reason to prohibit them from being marked as such in the 'inner_class_access_flags' attribute.

      Note that the class's 'access_flags', JVMS 4.1 (table 4.1-A), doesn't bother with this "marked" vs. "implicitly" distinction, because it is not concerned with Java sources. Instead, it uses "declared" in the sense that the class file itself declares properties: e.g., "declared synthetic".

        Attachments

          Issue Links

            Activity

              People

              • Assignee:
                abuckley Alex Buckley
                Reporter:
                dlsmith Dan Smith
              • Votes:
                0 Vote for this issue
                Watchers:
                1 Start watching this issue

                Dates

                • Created:
                  Updated:
                  Resolved: