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

9.6: Prohibit annotation interface declarations nested in anonymous classes

    Details

    • Type: Bug
    • Status: Resolved
    • Priority: P4
    • Resolution: Not an Issue
    • Affects Version/s: 16
    • Fix Version/s: 16
    • Component/s: specification
    • Labels:

      Description

      local-statics-jls prohibits annotation interface declarations from occurring anywhere in the body of a local class.

      JDK-8253374 permits static members of inner classes. With this change, it's possible for an annotation interface to be declared as a member of an *anonymous* class, and the rule doesn't prohibit it.

      The rule in 9.6 should be updated to disallow nesting in both local classes and anonymous classes.

        Attachments

          Issue Links

            Activity

              People

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

                Dates

                • Created:
                  Updated:
                  Resolved: