mirror of
https://gitflic.ru/project/openide/openide.git
synced 2026-09-26 19:06:24 +07:00
EquivalenceChecker: flexible modifier list comparison; fixes in class comparison; test (IDEA-CR-38140)
This commit is contained in:
@@ -0,0 +1,18 @@
|
||||
// "Collapse if statement " "true"
|
||||
|
||||
import java.util.List;
|
||||
import java.util.Map;
|
||||
|
||||
public class Main {
|
||||
|
||||
void test(int x) {
|
||||
Runnable r = new Runnable() {
|
||||
private final boolean field = x > 1;
|
||||
|
||||
@Override
|
||||
public void run() {
|
||||
System.out.println((x));
|
||||
}
|
||||
};
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,29 @@
|
||||
// "Collapse if statement " "true"
|
||||
|
||||
import java.util.List;
|
||||
import java.util.Map;
|
||||
|
||||
public class Main {
|
||||
|
||||
void test(int x) {
|
||||
if<caret>(x > 0) {
|
||||
Runnable r = new Runnable() {
|
||||
private final boolean field = x > 1;
|
||||
|
||||
@Override
|
||||
public void run() {
|
||||
System.out.println((x));
|
||||
}
|
||||
};
|
||||
} else {
|
||||
Runnable r = new Runnable() {
|
||||
final private boolean field = 1 < x;
|
||||
|
||||
@Override
|
||||
public void run() {
|
||||
System.out.println(x);
|
||||
}
|
||||
};
|
||||
}
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user