Bug 196923 - [search] Search does not work correctly
Summary: [search] Search does not work correctly
Status: VERIFIED DUPLICATE of bug 166093
Alias: None
Product: JDT
Classification: Eclipse Project
Component: Core (show other bugs)
Version: 3.3   Edit
Hardware: PC Windows XP
: P3 normal (vote)
Target Milestone: 3.4 M1   Edit
Assignee: Frederic Fusier CLA
QA Contact:
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2007-07-18 05:09 EDT by Art CLA
Modified: 2007-08-03 10:17 EDT (History)
0 users

See Also:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Art CLA 2007-07-18 05:09:02 EDT
When searching for a method reference in a java project I get this exception (bellow is the stack trace). Does not seam to be reproduceable in a predictable fashion, but it is not the first time I get this error. Once I get it I am keep getting the same error. Not even an eclipse restart sorts the problem. It seems that it only does it for the method that it originally generated the exception (other searches work fine), but it is not always the same method that causes this exception

!ENTRY org.eclipse.core.jobs 4 2 2007-07-18 12:00:00.754
!MESSAGE An internal error occurred during: "Java Search".
!STACK 0
java.lang.NullPointerException
	at org.eclipse.jdt.internal.core.search.matching.MethodLocator.matchReportReference(MethodLocator.java:339)
	at org.eclipse.jdt.internal.core.search.matching.PatternLocator.matchReportReference(PatternLocator.java:407)
	at org.eclipse.jdt.internal.core.search.matching.MatchLocator.reportMatching(MatchLocator.java:2060)
	at org.eclipse.jdt.internal.core.search.matching.MatchLocator.reportMatching(MatchLocator.java:2466)
	at org.eclipse.jdt.internal.core.search.matching.MatchLocator.reportMatching(MatchLocator.java:2213)
	at org.eclipse.jdt.internal.core.search.matching.MatchLocator.process(MatchLocator.java:1559)
	at org.eclipse.jdt.internal.core.search.matching.MatchLocator.locateMatches(MatchLocator.java:1037)
	at org.eclipse.jdt.internal.core.search.matching.MatchLocator.locateMatches(MatchLocator.java:1078)
	at org.eclipse.jdt.internal.core.search.matching.MatchLocator.locateMatches(MatchLocator.java:1199)
	at org.eclipse.jdt.internal.core.search.JavaSearchParticipant.locateMatches(JavaSearchParticipant.java:94)
	at org.eclipse.jdt.internal.core.search.BasicSearchEngine.findMatches(BasicSearchEngine.java:217)
	at org.eclipse.jdt.internal.core.search.BasicSearchEngine.search(BasicSearchEngine.java:502)
	at org.eclipse.jdt.core.search.SearchEngine.search(SearchEngine.java:550)
	at org.eclipse.jdt.internal.ui.search.JavaSearchQuery.run(JavaSearchQuery.java:143)
	at org.eclipse.search2.internal.ui.InternalSearchUI$InternalSearchJob.run(InternalSearchUI.java:94)
	at org.eclipse.core.internal.jobs.Worker.run(Worker.java:55)
Comment 1 Art CLA 2007-07-18 05:58:43 EDT
Did a complete wipe out of the ".metadata" folder from the workspace, but it does not sort the problem.
Comment 2 Frederic Fusier CLA 2007-07-18 08:28:18 EDT


*** This bug has been marked as a duplicate of bug 166093 ***
Comment 3 Frederic Fusier CLA 2007-07-18 08:29:47 EDT
Can you confirm that you're in the same context than bug 166093 (ie. targetting 1.4 runtime but compiling against JRE 1.5 or 1.6)?
Comment 4 Frederic Fusier CLA 2007-07-18 09:27:54 EDT
So, can you provide a simple test case to reproduce or at least the pattern you use for the search? Also do you have unresolved types/methods while searching?
Comment 5 Art CLA 2007-07-18 10:01:50 EDT
The method I tried to look up for references was one of my own. I could not provide you with the test case without giving you the whole project (and I am not sure how to write a test case for this, because I can not reproduce it). All I can say about it that the method was referenced from my project by other methdos, and it was a private method.

 I am not sure what do you mean by "Also do you have unresolved types/methods while searching?"
Comment 6 Frederic Fusier CLA 2007-07-18 11:36:34 EDT
(In reply to comment #5)
>  I am not sure what do you mean by "Also do you have unresolved types/methods
> while searching?"
> 
Do you have any compilation error in your workspace while doing the search?
If not, do you have some projects with a specific 1.4 compliance in your workspace?
Comment 7 Art CLA 2007-07-18 11:48:34 EDT
There are compilation errors in the workspace, but no java 1.4 compliances
Comment 8 Frederic Fusier CLA 2007-07-18 12:15:55 EDT
Thanks for the feedback.
So, I finally consider this bug as a real duplicate of bug 166093, even if the origin of the error is not exactly the same...


*** This bug has been marked as a duplicate of bug 166093 ***
Comment 9 Frederic Fusier CLA 2007-08-03 10:17:26 EDT
Verified for 3.4M1 using build I20070802-0800.