-
CSR
-
Resolution: Approved
-
P2
-
behavioral
-
minimal
-
Support for a new feature does not impact existing features.
-
Java API
-
SE
Summary
Update the JNI, JDWP, JDI and JDB specifications to account for private interface methods as needed.
Problem
JDK 8 introduced private interface methods at the VM level, and JDK 9 has now enabled them at the language level. The other platform interface specifications (JNI, JDWP, JDI) may need to be updated to allow for this new addition.
Solution
The JNI specification requires no change to allow for private interface methods. The implementation was fixed under JDK-8081800.
The JDWP specification also requires no changes.
The JDI specification requires one change - ObjectReference.invokeMethod states that it throws IllegalArgumentexception if the invocation mode is non-virtual and the method is either abstract or a non-default interface method. This precludes non-virtual invocation of private interface methods as they are "non-default interface methods". So we modify that clause to simply exclude abstract methods. The implementation is adjusted accordingly.
Specification
@throws java.lang.IllegalArgumentException if the method is not
a member of this object's class, if the size of the argument list
does not match the number of declared arguments for the method,
if the method is a constructor or static initializer, or
if {@link #INVOKE_NONVIRTUAL} is specified and the method is
abstract.
- csr for
-
JDK-8165827 Support private interface methods in JNI, JDWP, JDI and JDB
- Resolved