Community
Participate
Working Groups
Using 3.1 RC1. Consider following test case: pack/def/LL.java: package pack.def; public class LL<E> implements L<E> { public Object clone() { return null; } } pack/def/L.java: package pack.def; public interface L<E> {} pack/ref/K.java: package pack.ref; public interface K {} pack/ref/X.java: package pack.ref; public class X implements K { private pack.def.LL sg; protected synchronized pack.def.L<K> getSG() { return (sg != null) ? (pack.def.L) sg.clone() : null; } } Search for references of interface L in project. 3 matches are found (OK), 2 of them are erasure ones and last one is an exact match (KO). 3 erasure matches are expected in this case...
Problem comes from method matchReportReference(QualifiedNameReference,...) in TypeReferenceLocator. It should call matchReportReference(Expression, int, TypeBinding, MatchLocator) as matchReportReference(QualifiedTypeReference,...) does.
+1 for RC2
Fixed and released in HEAD. Match rule is now correctly set to erasure on qualified name references. [jdt-core internal] Changes done in TypeReferenceLocator.matchReportReference(QualifiedNameReference, ...) Test case added in JavaSearchBugsTests
The 3 references are reported as inexact match. Verified using N20050606-0010 + JDT/Core HEAD
Verified with I20050610-0010