Community
Participate
Working Groups
If you search for type references using the query 'x.y.*' it finds too many type references. To reproduce: 1. Add source for batch compiler in a Java project 2. Search for reference to type 'x.y.*' You will get references even if there is no such package in your workspace. NOTES: JBL (3/22/2001 6:17:12 PM) One reproducable test case: 1. In package p1, create X.java: [package p1; public class X { }] and Y.java: [package p1; public class Y { X f[]; }] 2. In package p2, create X.java: [package p2; public class X { }] and Z.java: [package p2; public class Z { X f[]; } ] 3. Search for references to p1.X It finds references in p1.Y (right) and p2.Z (wrong) JBL (6/18/2001 3:49:05 PM) Problem is still present in 125. JBL (6/18/2001 4:27:25 PM) The binding for type reference X is null, where the binding for array type reference X[] isn't.
Is this one still a problem ? I think we did persist the binding inside a type reference for refactoring purpose since then.
Added JavaSearchTests.testTypeReferenceInArray2()
Problem was that a SingleTypeReference was created and identified as a potential match, but the parser noticed that it was an array and put an ArrayTypeReference in place. Changed Parser to do it through copyDims(TypeReference, int) and changed MatchLocatorParser to override this method and replace the SingleTypeReference with the ArrayTypeReference in the match set.
PRODUCT VERSION: JT 035