This is a method invocation issue on debugger backend in JDK 9.
Method invocation of a private method declared in an interface gives AbstractMethodError.
The issue can be reproduced via the attached test case. Unzip the project and run it via:
/opt/java/jdk1.9.0/bin/java -classpath .../AbstractMethodErrorTest/build/classes abstractmethoderrortest.AbstractMethodErrorTest
After
Breakpoint hit at abstractmethoderrortest.App:31
it throws:
com.sun.jdi.InvocationException: Exception occurred in target VM
at com.sun.tools.jdi.ObjectReferenceImpl.invokeMethod(ObjectReferenceImpl.java:436)
at abstractmethoderrortest.EventThread.testMethodInvoke(EventThread.java:362)
at abstractmethoderrortest.EventThread.access$200(EventThread.java:57)
at abstractmethoderrortest.EventThread$ThreadTrace.breakpointEvent(EventThread.java:321)
at abstractmethoderrortest.EventThread.breakpointEvent(EventThread.java:474)
at abstractmethoderrortest.EventThread.handleEvent(EventThread.java:414)
at abstractmethoderrortest.EventThread.run(EventThread.java:121)
Exception: instance of java.lang.AbstractMethodError(id=157)
The method invocation is performed in EventThread.testMethodInvoke().
Method invocation of a private method declared in an interface gives AbstractMethodError.
The issue can be reproduced via the attached test case. Unzip the project and run it via:
/opt/java/jdk1.9.0/bin/java -classpath .../AbstractMethodErrorTest/build/classes abstractmethoderrortest.AbstractMethodErrorTest
After
Breakpoint hit at abstractmethoderrortest.App:31
it throws:
com.sun.jdi.InvocationException: Exception occurred in target VM
at com.sun.tools.jdi.ObjectReferenceImpl.invokeMethod(ObjectReferenceImpl.java:436)
at abstractmethoderrortest.EventThread.testMethodInvoke(EventThread.java:362)
at abstractmethoderrortest.EventThread.access$200(EventThread.java:57)
at abstractmethoderrortest.EventThread$ThreadTrace.breakpointEvent(EventThread.java:321)
at abstractmethoderrortest.EventThread.breakpointEvent(EventThread.java:474)
at abstractmethoderrortest.EventThread.handleEvent(EventThread.java:414)
at abstractmethoderrortest.EventThread.run(EventThread.java:121)
Exception: instance of java.lang.AbstractMethodError(id=157)
The method invocation is performed in EventThread.testMethodInvoke().
- relates to
-
JDK-8071453 Allow interface methods to be private
- Closed
-
JDK-8165827 Support private interface methods in JNI, JDWP, JDI and JDB
- Resolved