-
Bug
-
Resolution: Duplicate
-
P2
-
None
-
None
This is a regression in JDK 1.8.0 update 40.
When an interface method is invoked on a class, "IllegalArgumentException: Not a default method" exception is thrown:
Exception in thread "event-handler" java.lang.IllegalArgumentException: Not a default method
at com.sun.tools.jdi.ObjectReferenceImpl.validateIfaceMethodInvocation(ObjectReferenceImpl.java:352)
at com.sun.tools.jdi.ObjectReferenceImpl.validateMethodInvocation(ObjectReferenceImpl.java:292)
at com.sun.tools.jdi.ObjectReferenceImpl.invokeMethod(ObjectReferenceImpl.java:405)
at notadefaultmethod.EventThread.testMethodInvoke(EventThread.java:361)
The attached project can be used to reproduce the defect.
Method invocation proceeds without any problems on JDK 1.8.0 update 31. It fails just in update 40.
The interface method validation is problematic.
When an interface method is invoked on a class, "IllegalArgumentException: Not a default method" exception is thrown:
Exception in thread "event-handler" java.lang.IllegalArgumentException: Not a default method
at com.sun.tools.jdi.ObjectReferenceImpl.validateIfaceMethodInvocation(ObjectReferenceImpl.java:352)
at com.sun.tools.jdi.ObjectReferenceImpl.validateMethodInvocation(ObjectReferenceImpl.java:292)
at com.sun.tools.jdi.ObjectReferenceImpl.invokeMethod(ObjectReferenceImpl.java:405)
at notadefaultmethod.EventThread.testMethodInvoke(EventThread.java:361)
The attached project can be used to reproduce the defect.
Method invocation proceeds without any problems on JDK 1.8.0 update 31. It fails just in update 40.
The interface method validation is problematic.
- duplicates
-
JDK-8071657 JDI ObjectReferenceImpl.invokeMethod() validation fails for virtual invocations of method with declaring type being an interface
-
- Closed
-