-
Sub-task
-
Resolution: Fixed
-
P4
-
7, 8
Overview of changes that have been identified:
- 9.4: Modify syntax, clarify that private methods are not "implicitly public" and are not "default". Error checks for conflicts between 'private' and any of 'public', 'abstract', or 'default', similar to 8.4.3.
- 9.4.1: Private methods are not inherited or overridden in a subinterface. (Inheritance definition actually works already, because it speaks of "abstract or default", but even without any spec change, this should definitely be tested.)
- 9.4.1.2: a private method can't override a public method.
- 8.4.8: Private methods are not inherited or overridden in a subclass. (Again, no spec change, but should be tested.)
- 13.5.6: Describe the binary compatibility impact of changing the access of an interface method (similar to 13.4.7)
Need to investigate other potential impacts, where interface methods have been assumed to always be public (for example, in 6.6).
- 9.4: Modify syntax, clarify that private methods are not "implicitly public" and are not "default". Error checks for conflicts between 'private' and any of 'public', 'abstract', or 'default', similar to 8.4.3.
- 9.4.1: Private methods are not inherited or overridden in a subinterface. (Inheritance definition actually works already, because it speaks of "abstract or default", but even without any spec change, this should definitely be tested.)
- 9.4.1.2: a private method can't override a public method.
- 8.4.8: Private methods are not inherited or overridden in a subclass. (Again, no spec change, but should be tested.)
- 13.5.6: Describe the binary compatibility impact of changing the access of an interface method (similar to 13.4.7)
Need to investigate other potential impacts, where interface methods have been assumed to always be public (for example, in 6.6).
- duplicates
-
JDK-8156184 Why private access specifier is not allowed for static methods in interfaces as we can access it from other static methods of that interface
-
- Closed
-
-
JDK-8179311 Allow private members for interfaces
-
- Closed
-
- relates to
-
JDK-8166422 Javac does not allow private interface methods to be declared final
-
- Closed
-
-
JDK-8043703 13.4.12: Adding methods can break binary compatibility
-
- Open
-