Community
Participate
Working Groups
Did a find references in workspace (Cmd-shift-G) on a toString() method for one of my classes. eclipse 3.2RC1 on osx 10.4.6, java 1.4.2_09 java.lang.NullPointerException at org.eclipse.jdt.internal.core.util.Util.indexOfJavaLikeExtension(Util.java:1183) at org.eclipse.jdt.internal.core.search.matching.PossibleMatch.getQualifiedName(PossibleMatch.java:110) at org.eclipse.jdt.internal.core.search.matching.PossibleMatch.<init>(PossibleMatch.java:41) at org.eclipse.jdt.internal.core.search.matching.MatchLocator.locateMatches(MatchLocator.java:1189) at org.eclipse.jdt.internal.core.search.JavaSearchParticipant.locateMatches(JavaSearchParticipant.java:94) at org.eclipse.jdt.internal.core.search.BasicSearchEngine.findMatches(BasicSearchEngine.java:212) at org.eclipse.jdt.internal.core.search.BasicSearchEngine.search(BasicSearchEngine.java:501) at org.eclipse.jdt.core.search.SearchEngine.search(SearchEngine.java:538) at org.eclipse.jdt.internal.ui.search.JavaSearchQuery.run(JavaSearchQuery.java:143) at org.eclipse.search2.internal.ui.InternalSearchUI$InternalSearchJob.run(InternalSearchUI.java:93) at org.eclipse.core.internal.jobs.Worker.run(Worker.java:58)
This could be possible if there is a member type without enclosing type. In this case, the source file name can be null.
Sounds like a duplicate of bug 130241 but while searching for a method...
I cannot reproduce this exception even using a member type without enclosing type. Is there any chance that you can provide a simple test case to help me to reproduce? Thanks
Even if there is no reproducable test case for now, there is a path in the code that could lead to a NPE. I think this should be protected.
Created attachment 39539 [details] Proposed patch I agree this should be fixed
Philippe, may you accept this bug for RC2?
+1 for 3.2RC2
Patch released in HEAD. Note that no test case was added.
Verified with I20060427-1600 for 3.2RC2 (checking the source code)
Changing OS from Mac OS to Mac OS X as per bug 185991