Community
Participate
Working Groups
Searching for references in my workspace to org.eclipse.jdt.internal.core.Assert leads to this error: java.lang.NullPointerException at org.eclipse.jdt.internal.compiler.lookup.MethodBinding.signature(MethodBinding.java:670) at org.eclipse.jdt.internal.compiler.lookup.MethodBinding.computeUniqueKey(MethodBinding.java:323) at org.eclipse.jdt.internal.compiler.lookup.MethodBinding.computeUniqueKey(MethodBinding.java:311) at org.eclipse.jdt.internal.compiler.lookup.Binding.computeUniqueKey(Binding.java:45) at org.eclipse.jdt.internal.core.BinaryMethod.resolved(BinaryMethod.java:328) at org.eclipse.jdt.internal.core.search.matching.MatchLocator.newTypeReferenceMatch(MatchLocator.java:1378) at org.eclipse.jdt.internal.core.search.matching.MatchLocator.newTypeReferenceMatch(MatchLocator.java:1387) at org.eclipse.jdt.internal.core.search.matching.TypeReferenceLocator.matchReportReference(TypeReferenceLocator.java:278) at org.eclipse.jdt.internal.core.search.matching.MatchLocator.reportMatching(MatchLocator.java:1870) at org.eclipse.jdt.internal.core.search.matching.MatchLocator.reportMatching(MatchLocator.java:2223) at org.eclipse.jdt.internal.core.search.matching.MatchLocator.reportMatching(MatchLocator.java:2023) at org.eclipse.jdt.internal.core.search.matching.MatchLocator.process(MatchLocator.java:1474) at org.eclipse.jdt.internal.core.search.matching.MatchLocator.locateMatches(MatchLocator.java:958) at org.eclipse.jdt.internal.core.search.matching.MatchLocator.locateMatches(MatchLocator.java:999) at org.eclipse.jdt.internal.core.search.matching.MatchLocator.locateMatches(MatchLocator.java:1102) at org.eclipse.jdt.internal.core.search.JavaSearchParticipant.locateMatches(JavaSearchParticipant.java:94) at org.eclipse.jdt.internal.core.search.BasicSearchEngine.findMatches(BasicSearchEngine.java:208) at org.eclipse.jdt.internal.core.search.BasicSearchEngine.search(BasicSearchEngine.java:464) at org.eclipse.jdt.core.search.SearchEngine.search(SearchEngine.java:532) at org.eclipse.jdt.internal.ui.search.JavaSearchQuery.run(JavaSearchQuery.java:134) at org.eclipse.search2.internal.ui.InternalSearchUI$InternalSearchJob.run(InternalSearchUI.java:94) at org.eclipse.core.internal.jobs.Worker.run(Worker.java:76)
It works well for me (ie. no NPE) in a 3.2 M3 full source workspace... Has your workspace something special?
I don't think so. This is a workspace I have for a while. Maybe something got corrupted. The problem occurs with a binary method. I can reproduce it without a problem. I will track it down here. It is a case where a targetParameters element is null.
Sounds like a problem in MatchLocator. We try to resolve although there was an AbortCompilation exception...
Fixed and released in HEAD. Unfortunately there's no test case we can write to test it... So, it needs to be verified by hand.
I'll verify it once the next integration build is done.
Verified with HEAD. I didn't get the NPE.
Thanks :-)
Sounds a good candidate for 3.1.2
What does the fix look like?
Really simple... In MatchLocator.process(PossibleMatch,boolean) method, modify following line in catch(AbortCompilation e) block: reportMatching(unit, true); // was partially resolved with reportMatching(unit, false); // do not resolve when cu has errors
Released in R3_1_maintenance stream.
Reopen for 3.1.2 verification
We need to verify that this bug is fixed using R3_1_maintenance build before 3.1.2 delivery...
Checked that the new code is included into build M20060109-1200. May consider as verified for 3.1.2, on the source code basis. If Olivier still has the workspace on which the bug was detected at hand, we could also try M20060109-1200 on it.
Verified for 3.2 M4 using build I20051215-1506. (On the basis of source code.)