| Summary: | java.lang.reflect.InvocationTargetException thrown when invoking Open from Clipboard | ||||||
|---|---|---|---|---|---|---|---|
| Product: | [Eclipse Project] JDT | Reporter: | Ankur Sharma <ankur_sharma> | ||||
| Component: | Debug | Assignee: | Deepak Azad <deepakazad> | ||||
| Status: | RESOLVED FIXED | QA Contact: | |||||
| Severity: | normal | ||||||
| Priority: | P2 | CC: | daniel_megert, markus.kell.r | ||||
| Version: | 3.7 | Flags: | daniel_megert:
review+
|
||||
| Target Milestone: | 3.7 M7 | ||||||
| Hardware: | PC | ||||||
| OS: | Windows XP | ||||||
| Whiteboard: | |||||||
| Attachments: |
|
||||||
|
Description
Ankur Sharma
> org.eclipse.pde.internal.ui.wizards.imports.RepositoryImportWizard.addPages()) One ')' too much at the end makes SearchPattern#createPattern(..) return null. > at > org.eclipse.jdt.internal.debug.ui.actions.OpenFromClipboardAction.doMemberSearch(OpenFromClipboardAction.java:655) Created attachment 192929 [details] fix (In reply to comment #0) > Caused by: java.lang.NullPointerException > at > org.eclipse.jdt.internal.core.search.matching.MatchLocator.findIndexMatches(MatchLocator.java:264) > at > org.eclipse.jdt.internal.core.search.PatternSearchJob.search(PatternSearchJob.java:96) > at > org.eclipse.jdt.internal.core.search.PatternSearchJob.execute(PatternSearchJob.java:63) > at > org.eclipse.jdt.internal.core.search.processing.JobManager.performConcurrentJob(JobManager.java:277) > at > org.eclipse.jdt.internal.core.search.BasicSearchEngine.findMatches(BasicSearchEngine.java:214) > at > org.eclipse.jdt.internal.core.search.BasicSearchEngine.search(BasicSearchEngine.java:515) > at org.eclipse.jdt.core.search.SearchEngine.search(SearchEngine.java:584) > at > org.eclipse.jdt.internal.debug.ui.actions.OpenFromClipboardAction.doMemberSearch(OpenFromClipboardAction.java:655) > at > org.eclipse.jdt.internal.debug.ui.actions.OpenFromClipboardAction.access$1(OpenFromClipboardAction.java:616) > at > org.eclipse.jdt.internal.debug.ui.actions.OpenFromClipboardAction$2.run(OpenFromClipboardAction.java:372) > at > org.eclipse.jface.operation.ModalContext$ModalContextThread.run(ModalContext.java:121) If the search pattern is null, a search is not performed anymore which gets rid of the above NPE. This check is same as in org.eclipse.jdt.internal.ui.search.JavaSearchPage.isValidSearchPattern(). The dialog will still come because there is an extra ')' but there will be no exception in the error log. Dani, please commit the patch if you are ok with it. Comment on attachment 192929 [details]
fix
The patch goes into the right direction but has some issues:
- it changes the work units of one progress monitor
- 'doMemberSearch1' is not really a good name
- imports are mangled
Committed patch to HEAD with fixes for the above mentioned issued.
. |