Community
Participate
Working Groups
3.1RC2 eg. class A { Class<Class>[] a; Class<Class>[] b = a; A() { a = null; } } While renaming the field "a", all "a"s are unchanged except the declaring one.
Created attachment 23628 [details] Patch to implement this fix ArrayBinding are not taken into account while resolving level of field declaring type. Easy and localized fix which does not impact existing search. However, this is not a stop ship defect => good candidate for 3.1.1
Dirk - do you agree with the non-critical statement ? I mean in term of impact on refactorings.
Frederic, can you confirm that - this is only a problem with arrays where the element type is a parameterized types. - methods having arrays for paramterized types as a return type or parameter type are still found so that refactoring works class A { public void foo(Class<Class>[] a) { } void bar() { foo(null); } } If the above is true then only fields are affected. Since fields are most of the time local to a class and Local rename works in this case it is OK for me to postpone to 3.1.1.
I confirm that in RC3: 1) search find references to field with non-parameterized array or simple parameterized type declaring class. => correct references are found and refactoring works well in following cases: class C { Class<Class> foo; Class<Class> bar = foo; C() { foo = null; } } class B { Class[] field; Class[] bar = field; B() { field = null; } } 2) search find references to method with return types and parameters as parameterized type arrays. => correct references are found and refactoring works well in following cases: public class X { public Class<Class>[] foo(Class<Class>[] a) { return a; } void bar() { foo(new Class[0]); } } public class Y { public void foo(Class<Class>[] a) {} void bar() { foo(new Class[0]); } } public class Z { public Class<Class>[] foo() { return new Class[0]; } void bar() { foo(); } }
Fixed and released in R3_1_maintenance. [jdt-core internal] Test cases added in JavaSearchBugsTests
Backported to HEAD stream.
Verified in 3.2M1 (I20050808-2000)
Verified for 3.1.1 using build M20050923-1430.