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

Clarify accessibility of member types

XMLWordPrintable

    • Icon: Bug Bug
    • Resolution: Fixed
    • Icon: P4 P4
    • 8
    • 8
    • specification
    • None
    • Verified

      JLS7 8.5 incorrectly states: "A member interface in a class declaration is implicitly public (§6.6) unless an access modifier is specified."

      It should simply say: "The accessibility of a member type in a class declaration is specified in 6.6."

      Also, JLS 9.5 should clarify that it is a compile-error to specify protected or private for a member type in an interface declaration, because such a member type is implicitly public. (Historically, 9.5 merely prohibited repeating the public and static modifiers more than once, but didn't disallow protected/private.)

            abuckley Alex Buckley
            abuckley Alex Buckley
            Votes:
            0 Vote for this issue
            Watchers:
            0 Start watching this issue

              Created:
              Updated:
              Resolved:
              Imported:
              Indexed: