mirror of
https://gitflic.ru/project/openide/openide.git
synced 2026-07-12 14:54:38 +07:00
83ebaa7f64
Fixes IDEA-179499 New inspection: Should break out common conjunct from "if / else if"
17 lines
411 B
Java
17 lines
411 B
Java
// "Extract if (a)" "true"
|
|
class Test {
|
|
void f(boolean a, boolean b, boolean c, boolean d){
|
|
//a
|
|
if (a) {
|
|
if (b) {
|
|
System.out.println("a&b");//first comment
|
|
} else if (c) {
|
|
System.out.println("a&c");//ac
|
|
} else {
|
|
System.out.println("a");//a
|
|
}
|
|
} else if (d) {
|
|
System.out.println("d");//d
|
|
}
|
|
}
|
|
} |