Community
Participate
Working Groups
Using v_526. It appears that specify R_EQUIVALENT_MATCH match rule for SearchPattern has no effect. In fact search engine always works on this mode for generic types search until R_ERASURE_MATCH is specified on search pattern. So, searching List<Exception> without R_EQUIVALENT_MATCH match rule reports List (raw type) and List<? extends Throwable> although it should not!
Fixed. Now search engine handles R_EQUIVALENT_MATCH search pattern bit correctly. Reminder: by default R_EQUIVALENT_MATCH and R_ERASURE bits are not set so only perfect match will be reported. When R_EQUIVALENT_MATCH is set, it reports also references which have an equivalent signature than pattern. Also remind that R_ERASURE_MATCH overrides R_EQUIVALENT_MATCH bit and return all references whose erasure matches the pattern (which obviously includes equivalent signatures). [jdt-core-internal] Changes done in: - PatternLocator: add field isEquivalentMatch, - TypeReferenceLocator: -> #matchReportReference(Expression,IJavaElement,int,int,int,int, TypeBinding,MatchLocator) -> #matchReportImportRef(ImportReference,Binding,IJavaElement,int, MatchLocator) - TypeReferencePattern: #typeParameterNames(IType) Test cases added: class JavaSearchGenericTypeEquivalentTests
Verified in 200412140800