extract method: do not fold params by default when they are used inside conditional stmts (IDEA-92815)

This commit is contained in:
anna
2012-10-18 17:30:55 +02:00
parent 40b110e84c
commit bfef30ff03
4 changed files with 45 additions and 2 deletions
@@ -0,0 +1,7 @@
class Test {
void foo(String[] a, int i, boolean b) {
<selection>if (b) {
System.out.println(a[i]);
}</selection>
}
}
@@ -0,0 +1,11 @@
class Test {
void foo(String[] a, int i, boolean b) {
newMethod(a, i, b);
}
private void newMethod(String[] a, int i, boolean b) {
if (b) {
System.out.println(a[i]);
}
}
}