Project: JDT
Bug 72178 extract local variable doesn't resolve name conflicts [refactoring]
Reported: 2004-08-18 12:25:08 | Status: resolved fixed

eclise 3.1 M1, JDK 1.5 --------a.A------- package a; public class A {} ------------------ --------b.A------- package b; public class A {} ----------------- --------c.C------ package c; import a.A; public class C { b.A method() { return new b.A(); } void failHere() { method(); //extract local variable here } } -------------------- if you extract local variable where indicated in c.C the result is: -------------------- void failHere() { final A method = method(); } ----------------------------- but it should be: -------------------- void failHere() { final b.A method = method(); } -----------------------------

Files changed in fix:
org.eclipse.jdt.ui.tests.refactoring/resources/ExtractTemp/canExtract/A_test89_in.java org.eclipse.jdt.ui.tests.refactoring/resources/ExtractTemp/canExtract/A_test89_out.java org.eclipse.jdt.ui.tests.refactoring/test cases/org/eclipse/jdt/ui/tests/refactoring/ExtractTempTests.java