Files
openide/java/java-tests/testData/codeInsight/daemonCodeAnalyzer/quickFix/convertSwitchToIf/afterBreakInIfBranches.java
Tagir Valeev 9ca4341d7f [java-intention] BreakConverter#process fixed
isRemovable must be called before any modifications. Otherwise, previous modifications may affect its results.

GitOrigin-RevId: d05be1e54ba62e5ac18003bf54dab2abb16124ce
2020-08-03 09:51:38 +00:00

16 lines
339 B
Java

// "Replace 'switch' with 'if'" "true"
class X {
void test(int x) {
if (x > 0) {
if (x == 1) {
if (Math.random() > 0.5) {
System.out.println(1);
} else {
}
} else if (x == 2) {
System.out.println(2);
}
}
System.out.println("Exit");
}
}