Community
Participate
Working Groups
Behavior Preserving Transformation is rejected. Reproducible: Always Steps to Reproduce: 1. Create the classes package p1; import p0.*; public class A { public long test(){ return new C().m(2); } } package p1; import p0.*; public class B extends A{ public C f = null; private long m(int a) { return 0; } } package p0; import p1.*; public class C extends B { public long m(int a) { return 1; } } 2. Apply the move method refactoring to move method m(int) from class B to class C. 3. The tool does not apply the transformation and warn the following message: A method with * name already exists in the target type 4. Another refactoring tool applies the same transformation and the resulting program (the program below) preserves the program behavior. package p1; import p0.*; public class A { public long test(){ return new C().m(2); } } package p1; import p0.*; public class B extends A{ public C f = null; } package p0; import p1.*; public class C extends B { public long m(int a) { return 1; } private long m(B b, int a) { return 0; } }
*** Bug 434881 has been marked as a duplicate of this bug. ***
(In reply to Melina Mongiovi from comment #0) > 4. Another refactoring tool applies the same transformation and the > resulting program (the program below) preserves the program behavior. > private long m(B b, int a) { > return 0; > } > } FYI: Moving the private method and leave it private would be useless.
This bug hasn't had any activity in quite some time. Maybe the problem got resolved, was a duplicate of something else, or became less pressing for some reason - or maybe it's still relevant but just hasn't been looked at yet. If you have further information on the current state of the bug, please add it. The information can be, for example, that the problem still occurs, that you still want the feature, that more information is needed, or that the bug is (for whatever reason) no longer relevant. -- The automated Eclipse Genie.