Summary: | [search] NPE in org.eclipse.jdt.internal.compiler.util.SimpleLookupTable.get() | ||||||
---|---|---|---|---|---|---|---|
Product: | [Eclipse Project] JDT | Reporter: | Ernest Mah <ernest> | ||||
Component: | Core | Assignee: | Frederic Fusier <frederic_fusier> | ||||
Status: | VERIFIED FIXED | QA Contact: | |||||
Severity: | normal | ||||||
Priority: | P3 | CC: | jarthana, jerome_lanneluc, Olivier_Thomann | ||||
Version: | 3.4 | ||||||
Target Milestone: | 3.5 M6 | ||||||
Hardware: | PC | ||||||
OS: | Windows XP | ||||||
Whiteboard: | |||||||
Attachments: |
|
Description
Ernest Mah
2008-05-21 18:15:22 EDT
Looking at the code, we lazy initialize the field that is null just before using it. So the NPE can only occurs if the same JavaSearchParticipant is used in several threads. From JDT/Core code, it looks like we create a new one per search invocation. So it must come from the client. Ernest, are you passing a search participant to SearchEngine.search(...)? If so, are you reusing the same participant? Yes, I'm using the default search participant and reusing it in the jobs. Is this incorrect usage? (In reply to comment #2) > Yes, I'm using the default search participant and reusing it in the jobs. Is > this incorrect usage? No, it is not an incorrect usage. However we did not anticipate this usage. A workaround for you would be to call 'SearchEngine.getDefaultParticipant()' and pass it to each search query instead of reusing the SearchParticipant instance. Not this should have no effect on performance. I meant "Note that this should have no effect on performance." Created attachment 126483 [details]
Proposed patch
Released for 3.5M6 in HEAD stream. Verified for 3.5M6 with build I20090309-0100 |