mirror of
https://gitflic.ru/project/openide/openide.git
synced 2026-09-18 09:34:34 +07:00
Java: Don't fold method parameters when replacing duplicate fragments (IDEA-179519, IDEA-180673)
This commit is contained in:
+26
@@ -0,0 +1,26 @@
|
||||
class RenamedParameter {
|
||||
private boolean c;
|
||||
|
||||
public void foo() {
|
||||
String a = "s";
|
||||
String b = "t";
|
||||
newMethod(a, b);
|
||||
}
|
||||
|
||||
private void newMethod(String a, String b) {
|
||||
if (c) {
|
||||
String t = b;
|
||||
x(t);
|
||||
} else if (!b.equals(a)) {
|
||||
x(b);
|
||||
}
|
||||
}
|
||||
|
||||
public void bar() {
|
||||
String a = "t";
|
||||
String b = "s";
|
||||
newMethod(a, b);
|
||||
}
|
||||
|
||||
void x(String s) {}
|
||||
}
|
||||
Reference in New Issue
Block a user