Community
Participate
Working Groups
The org.eclipse.core.tools plugin has a tool for finding unreferenced methods. This has been working fine for a few years, but lately it has been sometimes throwing this NPE. I realize I'm calling internal code here, but thought I should report this anyway in case there is a real problem: java.lang.NullPointerException at org.eclipse.jdt.internal.compiler.lookup.SourceTypeBinding.resolveTypesFor(SourceTypeBinding.java:1292) at org.eclipse.jdt.internal.compiler.lookup.SourceTypeBinding.methods(SourceTypeBinding.java:1087) at org.eclipse.jdt.internal.compiler.lookup.ReferenceBinding.availableMethods(ReferenceBinding.java:174) at org.eclipse.jdt.core.dom.TypeBinding.getDeclaredMethods(TypeBinding.java:231) at org.eclipse.jdt.internal.corext.dom.Bindings.findOverriddenMethodInType(Bindings.java:439) at org.eclipse.jdt.internal.corext.dom.Bindings.findOverriddenMethodInHierarchy(Bindings.java:456) at org.eclipse.jdt.internal.corext.dom.Bindings.findOverriddenMethodInHierarchy(Bindings.java:467) at org.eclipse.jdt.internal.corext.dom.Bindings.findOverriddenMethodInHierarchy(Bindings.java:467) at org.eclipse.jdt.internal.corext.dom.Bindings.findOverriddenMethod(Bindings.java:490) at org.eclipse.core.tools.search.FindUnusedMembers.methodOverrides(FindUnusedMembers.java:124) at org.eclipse.core.tools.search.FindUnusedMembers.doSearchType(FindUnusedMembers.java:139) at org.eclipse.core.tools.search.FindUnusedMembers.doSearchCU(FindUnusedMembers.java:116) at org.eclipse.core.tools.search.FindUnusedMembers.process(FindUnusedMembers.java:207) at org.eclipse.core.tools.search.FindUnusedSearchQuery.run(FindUnusedSearchQuery.java:68) at org.eclipse.search2.internal.ui.InternalSearchUI$InternalSearchJob.run(InternalSearchUI.java:93) at org.eclipse.core.internal.jobs.Worker.run(Worker.java:55)
Any steps to reproduce?
Created attachment 118112 [details] org.eclipse.core.tools bundle I changed the org.eclipse.core.tools code in HEAD to use different API so the problem no longer occurs. Here is the old version of org.eclipse.core.tools which exhibits the problem.
(steps are to install this bundle in a recent build, and select "Find Unused Members" from the context menu on some compilation unit.
(In reply to comment #3) > (steps are to install this bundle in a recent build, and select "Find Unused > Members" from the context menu on some compilation unit. > Unfortunately this doesn't throw a NPE for me.
Closing as WORKSFORME. Please reopen if you can provide steps to reproduce.
Verified for 3.6M4
Verified.