| Summary: | NPE when searching for method (with '*' wildcard character) | ||||||||||
|---|---|---|---|---|---|---|---|---|---|---|---|
| Product: | [Eclipse Project] JDT | Reporter: | Krzysztof Kosmatka <krzysztof.kosmatka+eclipse> | ||||||||
| Component: | Core | Assignee: | Satyam Kandula <satyam.kandula> | ||||||||
| Status: | VERIFIED FIXED | QA Contact: | |||||||||
| Severity: | normal | ||||||||||
| Priority: | P3 | CC: | jarthana, Olivier_Thomann | ||||||||
| Version: | 3.6.1 | ||||||||||
| Target Milestone: | 3.7 M7 | ||||||||||
| Hardware: | PC | ||||||||||
| OS: | Windows XP | ||||||||||
| Whiteboard: | |||||||||||
| Attachments: |
|
||||||||||
Could you please provide your build id ? Created attachment 191119 [details]
JavaSearch settings dialog
This is JavaSearch settings dialog, that causes the problem
Version: 3.6.1.r361_v20100909-9gF78GrkFqw7GrsZnvz0JWNTeb6fue6896L Build id: M20100909-0800 Created attachment 191120 [details]
Test java file
This is simple java file to show the problem. When i have this file in workspace, select it in Package Explorer an perform search with settings shown on screenshot, then i get error.
Previous build id was for Eclipse Platform. Following is build id for Eclipse Java EE IDE: Version: 1.3.1.20100916-1202 Build id: 20100917-0705 Satyam, please investigate if you can reproduce with 3.6.2 and 3.7? Thanks. I am able to reproduce this issue with 3.7. I will look into the problem. Created attachment 191377 [details]
Patch
The method name from the pattern is being used in some checks. In this patch, I have made changes to make use of the method name that needs to be used rather than the name from the pattern.
Released on HEAD Verified for 3.7M7 using build I20110421-1800 |
When I try to find a mathod using a wildcard ('*') as a method name, I get NullPointerException. What steps will reproduce the problem? 1. Select java file in Package Explorer 2. Open search dialog and set everything according to screenshot. Search string must be a qualified class name folowed by ".*" (dot and asterisk). This have to be a pattern of any method that is referenced in selected java file. 3. Search -- Error Details -- Date: Mon Mar 14 14:58:26 CET 2011 Message: An internal error occurred during: "Java Search". Severity: Error Product: Eclipse 1.3.1.20100913-1228 (org.eclipse.epp.package.jee.product) Plugin: org.eclipse.core.jobs Exception Stack Trace: java.lang.NullPointerException at org.eclipse.jdt.internal.compiler.lookup.ReferenceBinding.binarySearch(ReferenceBinding.java:102) at org.eclipse.jdt.internal.compiler.lookup.SourceTypeBinding.getMethods(SourceTypeBinding.java:957) at org.eclipse.jdt.internal.core.search.matching.MethodLocator.getMethodBinding(MethodLocator.java:54) at org.eclipse.jdt.internal.core.search.matching.MethodLocator.resolveLevelAsSubtype(MethodLocator.java:684) at org.eclipse.jdt.internal.core.search.matching.MethodLocator.resolveLevel(MethodLocator.java:651) at org.eclipse.jdt.internal.core.search.matching.MethodLocator.resolveLevel(MethodLocator.java:574) at org.eclipse.jdt.internal.core.search.matching.MatchLocator.reportMatching(MatchLocator.java:2350) at org.eclipse.jdt.internal.core.search.matching.MatchLocator.process(MatchLocator.java:1669) at org.eclipse.jdt.internal.core.search.matching.MatchLocator.locateMatches(MatchLocator.java:1079) at org.eclipse.jdt.internal.core.search.matching.MatchLocator.locateMatches(MatchLocator.java:1120) at org.eclipse.jdt.internal.core.search.matching.MatchLocator.locateMatches(MatchLocator.java:1252) at org.eclipse.jdt.internal.core.search.JavaSearchParticipant.locateMatches(JavaSearchParticipant.java:94) at org.eclipse.jdt.internal.core.search.BasicSearchEngine.findMatches(BasicSearchEngine.java:231) at org.eclipse.jdt.internal.core.search.BasicSearchEngine.search(BasicSearchEngine.java:515) at org.eclipse.jdt.core.search.SearchEngine.search(SearchEngine.java:582) at org.eclipse.jdt.internal.ui.search.JavaSearchQuery.run(JavaSearchQuery.java:144) at org.eclipse.search2.internal.ui.InternalSearchUI$InternalSearchJob.run(InternalSearchUI.java:91) at org.eclipse.core.internal.jobs.Worker.run(Worker.java:54)