Support BreakConverter in ConvertSwitchToIfIntention

Fixes IDEA-141261 'Replace 'switch' with 'if'' intention produces incorrect code if some 'case' clause contains 'break' statement inside 'if'
This commit is contained in:
Tagir Valeev
2018-09-26 11:58:20 +07:00
parent 7dd0cc4074
commit f859a4c439
13 changed files with 161 additions and 58 deletions
@@ -2,15 +2,13 @@
class X {
public void doSomething( String value) {
//comment1
//comment3
//comment4
//comment5
//comment6
//comment7
//comment8
if ("case1".equals(value)) {//comment2
} else if ("case2".equals(value)) {
} else {
//comment3
} else if ("case2".equals(value)) {//comment5
} else {//comment7
}
}
}