Community
Participate
Working Groups
Behavior Preserving Transformation is rejected. Reproducible: Always Steps to Reproduce: 1. Create the classes package p1; public class A { } package p0; import p1.*; public class B extends A{ public C f = null; private long m(int a) { return 0; } } package p0; public class C extends B { protected long m(int a) { return 1; } public long test() { return new C().m(2) } } 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: The visibility of method p0.B.m(int) will changed to default 4. Another refactoring tool applies the same transformation and the resulting program (the program below) preserves the program behavior. package p1; public class A { } package p0; import p1.*; public class B extends A{ public C f = null; } package p0; public class C extends B { long m(B b, int a) { return 0; } protected long m(int a) { return 1; } public long test() { return new C().m(2) } }
*** This bug has been marked as a duplicate of bug 434886 ***
(In reply to Manju Mathew from comment #1) > > *** This bug has been marked as a duplicate of bug 434886 *** Why do you consider this bug as duplicate of bug 434886? In this bug, Eclipse rejects the transformation and reports the warning message: "The visibility of method p0.B.m(int) will changed to default", while in the bug 434886 Eclipse rejects the transformation and reports the message: "A method with * name already exists in the target type". Therefore, for each transformation (this bug and bug 434886) a different precondition was unsatisfied. In my point of view each bug is related to a different overly strong condition. What are the criteria that you use to classify a bug as duplicate of another bug?
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. As such, we're closing this bug. If you have further information on the current state of the bug, please add it and reopen this bug. 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.