introduce parameter: don't show conflicts between new param name and parameter to remove (IDEA-140607)

This commit is contained in:
Anna Kozlova
2015-05-26 18:25:50 +02:00
parent babd111339
commit 8cdbea9abe
4 changed files with 21 additions and 1 deletions
@@ -0,0 +1,6 @@
class Test {
public void foo(final String anObject) {
bar(anObject);
}
void bar(String f){}
}
@@ -0,0 +1,6 @@
class Test {
public void foo(Object anObject) {
bar(anObject.toStrin<caret>g());
}
void bar(String f){}
}
@@ -314,6 +314,10 @@ public class IntroduceParameterTest extends LightRefactoringTestCase {
doTest(IntroduceParameterRefactoring.REPLACE_FIELDS_WITH_GETTERS_ALL, true, false, true, false);
}
public void testConflictingNameWithParameterToDelete() {
doTest(IntroduceParameterRefactoring.REPLACE_FIELDS_WITH_GETTERS_ALL, true, false, true, false);
}
private void doTestThroughHandler() {
configureByFile("/refactoring/introduceParameter/before" + getTestName(false) + ".java");
boolean enabled = true;