Files
openide/java/java-tests/testData/codeInsight/daemonCodeAnalyzer/quickFix/convertSwitchToIf/beforeBreakInIfBranches.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

20 lines
387 B
Java

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