Loading... (original) (raw)

Since JDK 8 it is possible to have static methods in interfaces. However, there is no way to execute them from debugger.
Static method in classes can be run by com.sun.jdi.ClassType.invokeMethod(). But there is missing corresponding com.sun.jdi.InterfaceType.invokeMethod().

In addition, when an invocation of a default method is attempted it results in error.

backported by

Backport - A issue that is required to port a Bug or Feature into another product release. This issue type is generally associated with the main Bug/Feature to represent each individual release of the port. JDK-8042091 Support default and static interface methods in JDI, JDWP and JDB

is cloned by

Enhancement - null JDK-8042123 Support default and static interface methods in JDI, JDWP and JDB

relates to

Bug - A problem which impairs or prevents the functions of the product. JDK-8040167 JDWP spec for ClassType#InvokeMethod contradicts JLS

Bug - A problem which impairs or prevents the functions of the product. JDK-8031379 Release Note: com.sun.jdi.InterfaceType.invokeMethod() is missing

Bug - A problem which impairs or prevents the functions of the product. JDK-8035567 ObjectReference.invokeMethod() on default method throws ClassCastException