ConvertSwitchToIfIntention: fix processing of empty blocks

IDEA-205137 `Replace Switch with If` produce exceptions
IDEA-205122 Unwrap switch fails with exception
This commit is contained in:
Tagir Valeev
2019-01-10 12:40:04 +07:00
parent 107adb48ab
commit 0835bd0976
6 changed files with 39 additions and 8 deletions

View File

@@ -0,0 +1,11 @@
// "Unwrap 'switch'" "true"
public class One {
void n() {
if (true) {
swit<caret>ch (0) {
default -> {
}
}
}
}
}