JDK-8011311 : Lambda: Support Private concrete methods in interfaces
  • Type: Enhancement
  • Component: hotspot
  • Sub-Component: runtime
  • Affected Version: hs25
  • Priority: P2
  • Status: Closed
  • Resolution: Fixed
  • Submitted: 2013-04-02
  • Updated: 2014-10-15
  • Resolved: 2013-10-01
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 8 Other
8Fixed hs25Fixed
Related Reports
Blocks :  
Blocks :  
Blocks :  
Duplicate :  
Duplicate :  
Duplicate :  
Duplicate :  
Relates :  
Relates :  
Description
Per the lambda spec, hotspot now allows non-abstract instance methods in interfaces.
Public concrete instance methods are called default methods.
For JDK8, we will also support private instance methods in bytecodes.

8006267 added support for invokestatic and invokespecial to call interface methods.
Note that at the moment, private interface methods need to be ACC_SYNTHETIC and are not supported
by javac, so any test requires bytecode patching.



Comments
Summary of changes 1. added private interface method support - which can only be invoked via invokespecial directly on the interface method reference containing the private method 2. invokevirtual and invokeinterface throw IncompatibleclassChangeError if they attempt to reference a private interface method 3. conflicting default methods throw ICCE rather than AbstractMethodError 4. invokespecial superinterface.method no longer performs additional check for shadowing of superinterfaces 5. added some debug tracing
16-10-2013

Prototyping along with JVMS spec negotiation.
14-09-2013

Latest spec proposal is to only support invokespecial for private concrete instance methods in interfaces. Note that these will be supported by the JVM, but not allowed by javac.
08-08-2013

RULE vm/runtime/defmeth/scenarios/PrivateMethods_v49_none_direct_noredefine ExitCode 97 RULE vm/runtime/defmeth/scenarios/PrivateMethods_v49_none_direct_redefine ExitCode 97 RULE vm/runtime/defmeth/scenarios/PrivateMethods_v49_none_invoke_noredefine ExitCode 97 RULE vm/runtime/defmeth/scenarios/PrivateMethods_v49_none_invoke_redefine ExitCode 97 RULE vm/runtime/defmeth/scenarios/PrivateMethods_v49_none_reflect_noredefine ExitCode 97 RULE vm/runtime/defmeth/scenarios/PrivateMethods_v49_none_reflect_redefine ExitCode 97 RULE vm/runtime/defmeth/scenarios/PrivateMethods_v49_strict_direct_noredefine ExitCode 97 RULE vm/runtime/defmeth/scenarios/PrivateMethods_v49_strict_direct_redefine ExitCode 97 RULE vm/runtime/defmeth/scenarios/PrivateMethods_v49_strict_invoke_noredefine ExitCode 97 RULE vm/runtime/defmeth/scenarios/PrivateMethods_v49_strict_invoke_redefine ExitCode 97 RULE vm/runtime/defmeth/scenarios/PrivateMethods_v49_strict_reflect_noredefine ExitCode 97 RULE vm/runtime/defmeth/scenarios/PrivateMethods_v49_strict_reflect_redefine ExitCode 97 RULE vm/runtime/defmeth/scenarios/PrivateMethods_v49_sync_direct_noredefine ExitCode 97 RULE vm/runtime/defmeth/scenarios/PrivateMethods_v49_sync_direct_redefine ExitCode 97 RULE vm/runtime/defmeth/scenarios/PrivateMethods_v49_sync_invoke_noredefine ExitCode 97 RULE vm/runtime/defmeth/scenarios/PrivateMethods_v49_sync_invoke_redefine ExitCode 97 RULE vm/runtime/defmeth/scenarios/PrivateMethods_v49_sync_reflect_noredefine ExitCode 97 RULE vm/runtime/defmeth/scenarios/PrivateMethods_v49_sync_reflect_redefine ExitCode 97 RULE vm/runtime/defmeth/scenarios/PrivateMethods_v49_syncstrict_direct_noredefine ExitCode 97 RULE vm/runtime/defmeth/scenarios/PrivateMethods_v49_syncstrict_direct_redefine ExitCode 97 RULE vm/runtime/defmeth/scenarios/PrivateMethods_v49_syncstrict_invoke_noredefine ExitCode 97 RULE vm/runtime/defmeth/scenarios/PrivateMethods_v49_syncstrict_invoke_redefine ExitCode 97 RULE vm/runtime/defmeth/scenarios/PrivateMethods_v49_syncstrict_reflect_noredefine ExitCode 97 RULE vm/runtime/defmeth/scenarios/PrivateMethods_v49_syncstrict_reflect_redefine ExitCode 97 RULE vm/runtime/defmeth/scenarios/PrivateMethods_v50_none_direct_noredefine ExitCode 97 RULE vm/runtime/defmeth/scenarios/PrivateMethods_v50_none_direct_redefine ExitCode 97 RULE vm/runtime/defmeth/scenarios/PrivateMethods_v50_none_invoke_noredefine ExitCode 97 RULE vm/runtime/defmeth/scenarios/PrivateMethods_v50_none_invoke_redefine ExitCode 97 RULE vm/runtime/defmeth/scenarios/PrivateMethods_v50_none_reflect_noredefine ExitCode 97 RULE vm/runtime/defmeth/scenarios/PrivateMethods_v50_none_reflect_redefine ExitCode 97 RULE vm/runtime/defmeth/scenarios/PrivateMethods_v50_strict_direct_noredefine ExitCode 97 RULE vm/runtime/defmeth/scenarios/PrivateMethods_v50_strict_direct_redefine ExitCode 97 RULE vm/runtime/defmeth/scenarios/PrivateMethods_v50_strict_invoke_noredefine ExitCode 97 RULE vm/runtime/defmeth/scenarios/PrivateMethods_v50_strict_invoke_redefine ExitCode 97 RULE vm/runtime/defmeth/scenarios/PrivateMethods_v50_strict_reflect_noredefine ExitCode 97 RULE vm/runtime/defmeth/scenarios/PrivateMethods_v50_strict_reflect_redefine ExitCode 97 RULE vm/runtime/defmeth/scenarios/PrivateMethods_v50_sync_direct_noredefine ExitCode 97 RULE vm/runtime/defmeth/scenarios/PrivateMethods_v50_sync_direct_redefine ExitCode 97 RULE vm/runtime/defmeth/scenarios/PrivateMethods_v50_sync_invoke_noredefine ExitCode 97 RULE vm/runtime/defmeth/scenarios/PrivateMethods_v50_sync_invoke_redefine ExitCode 97 RULE vm/runtime/defmeth/scenarios/PrivateMethods_v50_sync_reflect_noredefine ExitCode 97 RULE vm/runtime/defmeth/scenarios/PrivateMethods_v50_sync_reflect_redefine ExitCode 97 RULE vm/runtime/defmeth/scenarios/PrivateMethods_v50_syncstrict_direct_noredefine ExitCode 97 RULE vm/runtime/defmeth/scenarios/PrivateMethods_v50_syncstrict_direct_redefine ExitCode 97 RULE vm/runtime/defmeth/scenarios/PrivateMethods_v50_syncstrict_invoke_noredefine ExitCode 97 RULE vm/runtime/defmeth/scenarios/PrivateMethods_v50_syncstrict_invoke_redefine ExitCode 97 RULE vm/runtime/defmeth/scenarios/PrivateMethods_v50_syncstrict_reflect_noredefine ExitCode 97 RULE vm/runtime/defmeth/scenarios/PrivateMethods_v50_syncstrict_reflect_redefine ExitCode 97 RULE vm/runtime/defmeth/scenarios/PrivateMethods_v51_none_direct_noredefine ExitCode 97 RULE vm/runtime/defmeth/scenarios/PrivateMethods_v51_none_direct_redefine ExitCode 97 RULE vm/runtime/defmeth/scenarios/PrivateMethods_v51_none_invoke_noredefine ExitCode 97 RULE vm/runtime/defmeth/scenarios/PrivateMethods_v51_none_invoke_redefine ExitCode 97 RULE vm/runtime/defmeth/scenarios/PrivateMethods_v51_none_reflect_noredefine ExitCode 97 RULE vm/runtime/defmeth/scenarios/PrivateMethods_v51_none_reflect_redefine ExitCode 97 RULE vm/runtime/defmeth/scenarios/PrivateMethods_v51_strict_direct_noredefine ExitCode 97 RULE vm/runtime/defmeth/scenarios/PrivateMethods_v51_strict_direct_redefine ExitCode 97 RULE vm/runtime/defmeth/scenarios/PrivateMethods_v51_strict_invoke_noredefine ExitCode 97 RULE vm/runtime/defmeth/scenarios/PrivateMethods_v51_strict_invoke_redefine ExitCode 97 RULE vm/runtime/defmeth/scenarios/PrivateMethods_v51_strict_reflect_noredefine ExitCode 97 RULE vm/runtime/defmeth/scenarios/PrivateMethods_v51_strict_reflect_redefine ExitCode 97 RULE vm/runtime/defmeth/scenarios/PrivateMethods_v51_sync_direct_noredefine ExitCode 97 RULE vm/runtime/defmeth/scenarios/PrivateMethods_v51_sync_direct_redefine ExitCode 97 RULE vm/runtime/defmeth/scenarios/PrivateMethods_v51_sync_invoke_noredefine ExitCode 97 RULE vm/runtime/defmeth/scenarios/PrivateMethods_v51_sync_invoke_redefine ExitCode 97 RULE vm/runtime/defmeth/scenarios/PrivateMethods_v51_sync_reflect_noredefine ExitCode 97 RULE vm/runtime/defmeth/scenarios/PrivateMethods_v51_sync_reflect_redefine ExitCode 97 RULE vm/runtime/defmeth/scenarios/PrivateMethods_v51_syncstrict_direct_noredefine ExitCode 97 RULE vm/runtime/defmeth/scenarios/PrivateMethods_v51_syncstrict_direct_redefine ExitCode 97 RULE vm/runtime/defmeth/scenarios/PrivateMethods_v51_syncstrict_invoke_noredefine ExitCode 97 RULE vm/runtime/defmeth/scenarios/PrivateMethods_v51_syncstrict_invoke_redefine ExitCode 97 RULE vm/runtime/defmeth/scenarios/PrivateMethods_v51_syncstrict_reflect_noredefine ExitCode 97 RULE vm/runtime/defmeth/scenarios/PrivateMethods_v51_syncstrict_reflect_redefine ExitCode 97 RULE vm/runtime/defmeth/scenarios/PrivateMethods_v52_none_direct_noredefine ExitCode 97 RULE vm/runtime/defmeth/scenarios/PrivateMethods_v52_none_direct_redefine ExitCode 97 RULE vm/runtime/defmeth/scenarios/PrivateMethods_v52_none_invoke_noredefine ExitCode 97 RULE vm/runtime/defmeth/scenarios/PrivateMethods_v52_none_invoke_redefine ExitCode 97 RULE vm/runtime/defmeth/scenarios/PrivateMethods_v52_none_reflect_noredefine ExitCode 97 RULE vm/runtime/defmeth/scenarios/PrivateMethods_v52_none_reflect_redefine ExitCode 97 RULE vm/runtime/defmeth/scenarios/PrivateMethods_v52_strict_direct_noredefine ExitCode 97 RULE vm/runtime/defmeth/scenarios/PrivateMethods_v52_strict_direct_redefine ExitCode 97 RULE vm/runtime/defmeth/scenarios/PrivateMethods_v52_strict_invoke_noredefine ExitCode 97 RULE vm/runtime/defmeth/scenarios/PrivateMethods_v52_strict_invoke_redefine ExitCode 97 RULE vm/runtime/defmeth/scenarios/PrivateMethods_v52_strict_reflect_noredefine ExitCode 97 RULE vm/runtime/defmeth/scenarios/PrivateMethods_v52_strict_reflect_redefine ExitCode 97 RULE vm/runtime/defmeth/scenarios/PrivateMethods_v52_sync_direct_noredefine ExitCode 97 RULE vm/runtime/defmeth/scenarios/PrivateMethods_v52_sync_direct_redefine ExitCode 97 RULE vm/runtime/defmeth/scenarios/PrivateMethods_v52_sync_invoke_noredefine ExitCode 97 RULE vm/runtime/defmeth/scenarios/PrivateMethods_v52_sync_invoke_redefine ExitCode 97 RULE vm/runtime/defmeth/scenarios/PrivateMethods_v52_sync_reflect_noredefine ExitCode 97 RULE vm/runtime/defmeth/scenarios/PrivateMethods_v52_sync_reflect_redefine ExitCode 97 RULE vm/runtime/defmeth/scenarios/PrivateMethods_v52_syncstrict_direct_noredefine ExitCode 97 RULE vm/runtime/defmeth/scenarios/PrivateMethods_v52_syncstrict_direct_redefine ExitCode 97 RULE vm/runtime/defmeth/scenarios/PrivateMethods_v52_syncstrict_invoke_noredefine ExitCode 97 RULE vm/runtime/defmeth/scenarios/PrivateMethods_v52_syncstrict_invoke_redefine ExitCode 97 RULE vm/runtime/defmeth/scenarios/PrivateMethods_v52_syncstrict_reflect_noredefine ExitCode 97 RULE vm/runtime/defmeth/scenarios/PrivateMethods_v52_syncstrict_reflect_redefine ExitCode 97
08-08-2013

Note: support for private instance methods in interfaces is not yet done. The fix for 8009130, instead of returning "Failed to reject invalid class" for resolveMethod00602m1 and resolveMethod00602m2 in fastdebug will give the assertion in klassVtable.cpp that initialized < _length. That will be fixed as part of the fix for 8011311, i.e. support for private instance methods in interfaces.
24-07-2013