Lines 9743-9746
Link Here
|
9743 |
"src/Bug.java Bug.{}:Inner#1.field [ §|Row|§ field;//LINE 3] EXACT_MATCH" |
9743 |
"src/Bug.java Bug.{}:Inner#1.field [ §|Row|§ field;//LINE 3] EXACT_MATCH" |
9744 |
); |
9744 |
); |
9745 |
} |
9745 |
} |
|
|
9746 |
|
9747 |
/** |
9748 |
* @bug 221110: [search] NPE at org.eclipse.jdt.internal.compiler.util.SimpleLookupTable.removeKey |
9749 |
* @test Ensure that no NPE occurs while searching for reference to generic class |
9750 |
* when referenced in a unbound wildcard parameterized type |
9751 |
* @see "https://bugs.eclipse.org/bugs/show_bug.cgi?id=221110" |
9752 |
*/ |
9753 |
public void testBug221110() throws CoreException { |
9754 |
workingCopies = new ICompilationUnit[2]; |
9755 |
workingCopies[0] = getWorkingCopy("/JavaSearchBugs/src/X.java", |
9756 |
"public class X<T> {\n" + |
9757 |
"}\n" |
9758 |
); |
9759 |
workingCopies[1] = getWorkingCopy("/JavaSearchBugs/src/Y.java", |
9760 |
"public class Y<T extends X<?>> {\n" + |
9761 |
"}\n" |
9762 |
); |
9763 |
this.resultCollector.showSelection = true; |
9764 |
this.resultCollector.showRule = true; |
9765 |
IType type = this.workingCopies[0].getType("X"); |
9766 |
search(type, REFERENCES, SearchPattern.R_ERASURE_MATCH, getJavaSearchWorkingCopiesScope(), this.resultCollector); |
9767 |
assertSearchResults( |
9768 |
"src/Y.java Y [public class Y<T extends §|X|§<?>> {] ERASURE_MATCH" |
9769 |
); |
9770 |
} |
9771 |
public void testBug221110b() throws CoreException { |
9772 |
workingCopies = new ICompilationUnit[3]; |
9773 |
workingCopies[0] = getWorkingCopy("/JavaSearchBugs/src/I.java", |
9774 |
"public interface I<T> {\n" + |
9775 |
"}\n" |
9776 |
); |
9777 |
workingCopies[1] = getWorkingCopy("/JavaSearchBugs/src/X.java", |
9778 |
"public class X<T> {\n" + |
9779 |
"}\n" |
9780 |
); |
9781 |
workingCopies[2] = getWorkingCopy("/JavaSearchBugs/src/Z.java", |
9782 |
"public class Z<T extends X<?> & I<?>> {\n" + |
9783 |
"}\n" |
9784 |
); |
9785 |
this.resultCollector.showSelection = true; |
9786 |
this.resultCollector.showRule = true; |
9787 |
IType type = this.workingCopies[0].getType("I"); |
9788 |
search(type, REFERENCES, SearchPattern.R_ERASURE_MATCH, getJavaSearchWorkingCopiesScope(), this.resultCollector); |
9789 |
assertSearchResults( |
9790 |
"src/Z.java Z [public class Z<T extends X<?> & §|I|§<?>> {] ERASURE_MATCH" |
9791 |
); |
9792 |
} |
9746 |
} |
9793 |
} |