Community
Participate
Working Groups
Steps to Reproduce: 1. Create the following program package Package_1; public class ClassId_1 { protected long m_0( int a){ return 1; } } package Package_0; import Package_1.*; public class A_0 extends ClassId_1 { public ClassId_0 fieldid_0= new ClassId_0(); protected long m_0( int a){ return 0; } } package Package_0; public class ClassId_0 extends A_0 { public long methodid_0(){ return this.m_0(2); } } 2. Apply the move method refactoring to move method m_0(int) from class A_0 to class ClassId_0. 3. The tool does not apply the transformation and warn the following message: The method invocations to m_0 cannot be updated since the original method is used Polymorphically. 4. Another refactoring tool applies the same transformation and the resulting program (the program below) preserves the program behavior. package Package_1; public class ClassId_1 { protected long m_0( int a){ return 1; } } package Package_0; import Package_1.*; public class A_0 extends ClassId_1 { public ClassId_0 fieldid_0=new ClassId_0(); protected long m_0( int a){ return fieldid_0.m_0(a); } } package Package_0; public class ClassId_0 extends A_0 { public long methodid_0(){ return this.m_0(2); } protected long m_0( int a){ return 0; } }
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.