Community
Participate
Working Groups
Build ID: I20070503-1400 Steps To Reproduce: ---------------------------------------- * Steps to Reproduce * ---------------------------------------- 1. Use the following code: L1. public class TestClass { L2. public static void main(String[] args) { L3. SubClass subClass = new SubClass(); L4. subClass.method(); L5. } L6. } L7. L8. class SubClass extends BaseClass { L9. public void method() { L10. newMethod(); L11. } L12. } L13. L14. abstract class BaseClass { L15. public abstract void method(); L16. L17. public void newMethod() { L18. System.out.println("BaseClass::newMethod()"); L19. } L20. } 2. Select the method on line L9 3. From the Eclipse Menu select: Refactor -> Inline 3.1 Up pops the "Inline method" dialog 4. Uncheck the "Delete method declaration" check box on the dialog 5. Click "Ok" 6. A dialog pops up that notifies you that the "Method to be inlined overrides method from class BaseClass" 7. Click "Continue" 8. Refactoring finishes executing ---------------------------------------- * Actual Behaviour * ---------------------------------------- No refactoring is carried out. ---------------------------------------- * Expected Behaviour * ---------------------------------------- The method call on L4 should be inlined i.e. it should be refactored from "subClass.method();" to "subClass.newMethod();" More information: See: http://www.eclipse.org/newsportal/article.php?id=21497&group=eclipse.tools.jdt#21497 for further information. Also: The same "problem" occurs when you are inlining calls to the method (without deleting the method) and either (1) The method is overridden in a subclass (2) The method is a method from an interface that the class implements
*** This bug has been marked as a duplicate of bug 83329 ***