IDEA-196805 Warn about switch statement with single 'default'

This commit is contained in:
Tagir Valeev
2018-09-25 14:19:43 +07:00
parent e02761f313
commit 9530731ea5
26 changed files with 488 additions and 39 deletions

View File

@@ -0,0 +1,13 @@
// "Unwrap 'switch' statement" "true"
class X {
String test(char c) {
s<caret>witch (c) {
default:
if(c == 'a') {
System.out.println("foo");
break;
} else break;
}
System.out.println("oops");
}
}