This Bugzilla instance is a read-only archive of historic NetBeans bug reports. To report a bug in NetBeans please follow the project's instructions for reporting issues.

Bug 240036 - Not possible to evaluate static method on interfaces in JDK 8.
Summary: Not possible to evaluate static method on interfaces in JDK 8.
Status: RESOLVED FIXED
Alias: None
Product: debugger
Classification: Unclassified
Component: Java (show other bugs)
Version: 8.0
Hardware: All All
: P3 normal (vote)
Assignee: Martin Entlicher
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2014-01-06 16:13 UTC by Martin Entlicher
Modified: 2016-03-09 02:13 UTC (History)
0 users

See Also:
Issue Type: DEFECT
Exception Reporter:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Martin Entlicher 2014-01-06 16:13:11 UTC
In JDK 8 it is possible to have static methods in interfaces.
However, debugger does not invoke such methods during evaluations in watches or code evaluation. It is possible to step into such methods without problems.

To reproduce:
consider a code like:
    public static interface TestInterface {
        
        static void test() {
            System.err.println("Test method in an interface!");
        }
    }

and try to evaluate "TestInterface.test()".
Comment 1 Martin Entlicher 2014-01-06 16:39:45 UTC
This is not possible to fix without com.sun.jdi.InterfaceType.invokeMethod().
https://bugs.openjdk.java.net/browse/JDK-8031195

http://hg.netbeans.org/core-main/rev/5705e4d11a52
Comment 2 Quality Engineering 2014-01-08 02:52:16 UTC
Integrated into 'main-silver', will be available in build *201401080002* on http://bits.netbeans.org/dev/nightly/ (upload may still be in progress)

Changeset: http://hg.netbeans.org/main-silver/rev/5705e4d11a52
User: mentlicher@netbeans.org
Log: #240036: Not able to call static methods on interfaces.
Comment 3 Martin Entlicher 2016-03-08 08:33:55 UTC
Since JDK 1.8.0 update 40 there is a possibility to invoke static methods on interfaces: https://bugs.openjdk.java.net/browse/JDK-8042121
Comment 4 Martin Entlicher 2016-03-08 08:41:55 UTC
Fixed by changeset:   295975:06e2dfab5255
http://hg.netbeans.org/core-main/rev/06e2dfab5255
Comment 5 Quality Engineering 2016-03-09 02:13:55 UTC
Integrated into 'main-silver', will be available in build *201603090002* on http://bits.netbeans.org/dev/nightly/ (upload may still be in progress)

Changeset: http://hg.netbeans.org/main-silver/rev/06e2dfab5255
User: mentlicher@netbeans.org
Log: #240036: Allow to evaluate static methods on interfaces since JDK 8u40.