| Summary: | [pull up] enables overloading + private method | ||
|---|---|---|---|
| Product: | [Eclipse Project] JDT | Reporter: | Gustavo Soares <gsoares> |
| Component: | UI | Assignee: | JDT-UI-Inbox <jdt-ui-inbox> |
| Status: | CLOSED DUPLICATE | QA Contact: | |
| Severity: | normal | ||
| Priority: | P3 | CC: | raksha.vasisht |
| Version: | 3.6.1 | ||
| Target Milestone: | --- | ||
| Hardware: | PC | ||
| OS: | All | ||
| Whiteboard: | |||
Also see Bug 316831. *** This bug has been marked as a duplicate of bug 234980 *** |
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.