mirror of
https://gitflic.ru/project/openide/openide.git
synced 2026-09-13 09:19:13 +07:00
split if: ensure condition operands comparison stops at first non-equivalent sub condition (IDEA-196560)
This commit is contained in:
@@ -0,0 +1,13 @@
|
||||
class C {
|
||||
void foo(boolean a, boolean b, boolean c, boolean d, boolean e, boolean f) {
|
||||
if (a && b) {
|
||||
if (c) {
|
||||
System.out.println("1");
|
||||
} else if (d && e && f) {
|
||||
System.out.println("2");
|
||||
}
|
||||
} else if (d && e && f) {
|
||||
System.out.println("2");
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,10 @@
|
||||
class C {
|
||||
void foo(boolean a, boolean b, boolean c, boolean d, boolean e, boolean f) {
|
||||
if (a && b &<caret>& c) {
|
||||
System.out.println("1");
|
||||
}
|
||||
else if (d && e && f) {
|
||||
System.out.println("2");
|
||||
}
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user