JDK-8071453 : Allow interface methods to be private
  • Type: Enhancement
  • Component: tools
  • Sub-Component: javac
  • Affected Version: 9
  • Priority: P4
  • Status: Closed
  • Resolution: Fixed
  • OS: generic
  • CPU: generic
  • Submitted: 2015-01-23
  • Updated: 2022-06-17
  • Resolved: 2015-03-02
The Version table provides details related to the release that this issue/RFE will be addressed.

Unresolved : Release in which this issue/RFE will be addressed.
Resolved: Release in which this issue/RFE has been resolved.
Fixed : Release in which this issue/RFE has been fixed. The release containing this fix may be available for download as an Early Access Release or a General Availability Release.

To download the current JDK release, click here.
JDK 9
9 b54Fixed
Related Reports
Duplicate :  
Relates :  
Relates :  
Relates :  
Relates :  
Relates :  
Relates :  
Sub Tasks
JDK-8072872 :  
Description
During the definition & development of Java 8, as a part of the Lambda expressions support Umbrella JSR
(https://bugs.openjdk.java.net/browse/JDK-7115044)  there existed experimental support to allow interface methods being private. However this experimental feature didn't make the final cut.

As part of https://bugs.openjdk.java.net/browse/JDK-8042880 targeted for Java SE 9, we would like to 
resurrect support for this feature. 
Comments
URL: http://hg.openjdk.java.net/jdk9/jdk9/langtools/rev/592d64800143 User: lana Date: 2015-03-11 02:21:17 +0000
11-03-2015

URL: http://hg.openjdk.java.net/jdk9/dev/langtools/rev/592d64800143 User: mcimadamore Date: 2015-03-02 11:25:57 +0000
02-03-2015

Having an old implementation that I can resurrect from the archives was very helpful. For the record here are the changes/fixes made in addition: - Support for static private methods was added. - Attempts to declare a private method that is override equivalent with a super inferface's public method is caught and reported as an error. (attempting to assign "weaker" access privileges) - Accessors emitted into interfaces are tagged as public as required by the VM. - Code massaged to use the new diagnostics framework. - Added several more tests. - Assorted minor clean ups.
02-03-2015