Files
openide/java/java-tests/testData/codeInsight/daemonCodeAnalyzer/quickFix/convertSwitchToIf/beforeBreakInIf2.java
Tagir Valeev f859a4c439 Support BreakConverter in ConvertSwitchToIfIntention
Fixes IDEA-141261 'Replace 'switch' with 'if'' intention produces incorrect code if some 'case' clause contains 'break' statement inside 'if'
2018-09-26 11:58:20 +07:00

16 lines
314 B
Java

// "Replace 'switch' with 'if'" "true"
class X {
void m(String s, boolean r) {
swi<caret>tch (s) {
case "a":
System.out.println("a");
if (r) {
break;
} else {
throw new RuntimeException();
}
default:
System.out.println("d");
}
}
}