Project: JDT
Bug 127665 Introduce Indirection refactoring results in compile error
Reported: 2006-02-14 06:33:42 | Status: resolved fixed

I20060214-0010 0. create Java project 'P' 1. add Test.java: public class Test { int foo() { return 1; } int useFoo() { return foo(); } } class TestO extends Test { int useFoo() { return foo(); } } 2. select foo() in TestO.useFoo() 3. Refactor > Introduce Indirection ==> creates source with compile error: public class Test { protected int foo() { return 1; } int useFoo() { return TestO.foo(this); } } class TestO extends Test { /* * @see Test#foo() * @since 3.2 */ public static int foo(Test test) { return test.foo(); } int useFoo() { return TestO.foo(Test.this); } }

Files changed in fix:
org.eclipse.jdt.ui.tests.refactoring/resources/IntroduceIndirection/test31/in/Test.java org.eclipse.jdt.ui.tests.refactoring/resources/IntroduceIndirection/test31/out/Test.java org.eclipse.jdt.ui.tests.refactoring/test cases/org/eclipse/jdt/ui/tests/refactoring/IntroduceIndirectionTests.java org.eclipse.jdt.ui/core refactoring/org/eclipse/jdt/internal/corext/refactoring/RefactoringAvailabilityTester.java org.eclipse.jdt.ui/core refactoring/org/eclipse/jdt/internal/corext/refactoring/code/IntroduceIndirectionRefactoring.java