JDK-8026213 : Reflection support for private interface methods
  • Type: Bug
  • Component: core-libs
  • Sub-Component: java.lang:reflect
  • Affected Version: 8
  • Priority: P3
  • Status: Closed
  • Resolution: Fixed
  • OS: generic
  • CPU: generic
  • Submitted: 2013-10-09
  • Updated: 2013-10-25
  • Resolved: 2013-10-11
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
8 b113Fixed
Related Reports
Blocks :  
Description
Reflection code is split across the JDK and the vm. Reflection generates code dynamically to speed up reflection processing after startup. The generated code needs to use invokespecial for private interface methods to match the JVMS specification.
Comments
Robert is adding a test to the jdk/test/java/lang/Method/invoke to go with the fix. The test uses asm. Many thanks.
11-10-2013

ReflectInvokeprivaterepeat.java is a standalone test you can use. It depends on 1. SuperIwithDefault.java 2. SuperIwithDefaultChild.java -- javac all -- then patch SuperIwithDefault.class: change "public Method bar" to "private explicit Method bar" I also changed string from I.bar to "invoked private I.bar", but that could be changed in the original source.
09-10-2013

jdk.patch attached contains the suggested fix for sun.reflect.MethodAccessorGenerator.java
09-10-2013