Project: JDT
Bug 6680 extract method: incorrect return statement inserted - compile errors
Reported: 2001-12-07 12:42:57 | Status: resolved fixed

class A { int i(){ return 0;} void m(){ /*[*/i(); m();/*]*/ } } refactors incorectly to: class A { int i(){ return 0;} void m(){ xxx();/*]*/ } private int xxx() { return /*[*/i(); m(); } }

Files changed in fix:
org.eclipse.jdt.ui.tests.refactoring/resources/ExtractMethodWorkSpace/ExtractMethodTests/A.java org.eclipse.jdt.ui.tests.refactoring/resources/ExtractMethodWorkSpace/ExtractMethodTests/validSelection_in/A_test364.java org.eclipse.jdt.ui.tests.refactoring/resources/ExtractMethodWorkSpace/ExtractMethodTests/validSelection_out/A_test364.java org.eclipse.jdt.ui.tests.refactoring/test cases/org/eclipse/jdt/ui/tests/refactoring/ExtractMethodTests.java org.eclipse.jdt.ui/core refactoring/org/eclipse/jdt/internal/corext/refactoring/util/NewSelectionAnalyzer.java