Community
Participate
Working Groups
Build Identifier: 20110615-0604 Pulling up a method enables overloading of a private method changing program behavior Reproducible: Always Steps to Reproduce: 1. Create the classes: public class A { public int k(long l) { return 1; } private int k(int l) { return 2; } } public class B extends A { public int m() { return k(2); } public int test() { return m(); } } 2. The test method returns 1. Apply the Pull up refactoring to m(). public class A { public int k(long l) { return 1; } private int k(int l) { return 2; } public int m() { return k(2); } } public class B extends A { public int test() { return m(); } } 3. After the transformation, the test method returns 2 instead of 1.
Also see Bug 316831.
*** This bug has been marked as a duplicate of bug 234980 ***