-
Type:
Bug
-
Resolution: Fixed
-
Priority:
P4
-
Affects Version/s: 8
-
Component/s: 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.)
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.)