mirror of
https://gitflic.ru/project/openide/openide.git
synced 2026-08-25 14:25:04 +07:00
field can be local: group by top level blocks (IDEA-121490)
This commit is contained in:
+21
@@ -0,0 +1,21 @@
|
||||
// "Convert to local" "true"
|
||||
import java.util.ArrayList;
|
||||
|
||||
class ITest {
|
||||
|
||||
public IntelliJBugConvertToLocal(int x, int z) {
|
||||
|
||||
ArrayList<String> mayBeLocal = new ArrayList<String>();
|
||||
if (x == 5) {
|
||||
mayBeLocal.add("jjj");
|
||||
}
|
||||
|
||||
if (x > z) {
|
||||
useIt(mayBeLocal);
|
||||
}
|
||||
}
|
||||
@SuppressWarnings("UnusedParameters")
|
||||
private void useIt(Object data) {
|
||||
System.out.println(data);
|
||||
}
|
||||
}
|
||||
+22
@@ -0,0 +1,22 @@
|
||||
// "Convert to local" "true"
|
||||
import java.util.ArrayList;
|
||||
|
||||
class ITest {
|
||||
|
||||
private ArrayList<String> may<caret>BeLocal = new ArrayList<String>();
|
||||
|
||||
public IntelliJBugConvertToLocal(int x, int z) {
|
||||
|
||||
if (x == 5) {
|
||||
mayBeLocal.add("jjj");
|
||||
}
|
||||
|
||||
if (x > z) {
|
||||
useIt(mayBeLocal);
|
||||
}
|
||||
}
|
||||
@SuppressWarnings("UnusedParameters")
|
||||
private void useIt(Object data) {
|
||||
System.out.println(data);
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user