Summary: | [1.5][search] NPE while searching type parameter reference in workspace | ||||||
---|---|---|---|---|---|---|---|
Product: | [Eclipse Project] JDT | Reporter: | Tom Hofmann <eclipse> | ||||
Component: | Core | Assignee: | Frederic Fusier <frederic_fusier> | ||||
Status: | VERIFIED FIXED | QA Contact: | |||||
Severity: | normal | ||||||
Priority: | P3 | ||||||
Version: | 3.1 | ||||||
Target Milestone: | 3.1 M6 | ||||||
Hardware: | PC | ||||||
OS: | All | ||||||
Whiteboard: | |||||||
Attachments: |
|
Description
Tom Hofmann
2005-02-16 10:13:16 EST
Cannot reproduce. Can you provide entire project? I suspect there's something special with access restriction in classpath... Created attachment 17998 [details]
project.zip
The attached project shows the described behavior when searching references to
the type variable 'T' in searching.TestGeneric (in searching/Test.java).
Cannot reproduce either on a fresh project.
ok, I got it, thanks A simpler test case is: .classpath: <?xml version="1.0" encoding="UTF-8"?> <classpath> <classpathentry excluding="tmp" kind="src" path=""/> <classpathentry kind="con" path="org.eclipse.jdt.launching.JRE_CONTAINER"/> <classpathentry kind="output" path=""/> </classpath> Test.java: public class Test<E> implements In<Test<E>> { E e; } interface In<T> {} NPE occurs while searching reference of E in project... Fixed. Type parameter references are found even if access restriction is set on classpath. Problem came from comparison of this access restriction with not initialized access restriction from JavaSearchScope... [jdt-core-internal] Change done in findIndexMatches method of TypeParameterPattern and LocalVariablePattern. No test case added but add an access restriction to classpath of JavaSearch15 project in org.eclipse.jdt.core.tests.model to get same context. Verified in I20050330-0500 |