Files
Mikhail Pyltsinandintellij-monorepo-bot 0f76470f19 [java-inspections] IDEA-333452 Duplicate branch on switch. Improve work with comments
- now it can be suppressed properly
- show info level if the branches have different comments

GitOrigin-RevId: 5f1c5c0a67165b949b894d2d81c53800ad3b4b22
2023-09-27 19:37:38 +00:00

31 lines
548 B
Java

class C {
void foo(int n, boolean b) {
switch (n) {
case 1:
if(b) {
bar("A");
} else {
bar("z");
}
bar("o");
break;
case 2:
if(b) {
bar("B");
} else {
bar("z");
}
bar("o");
break;
case 3:
<weak_warning descr="Duplicate branch in 'switch'">if(b) {
bar("A");
} else {
bar("z");
}</weak_warning>
bar("o");
break;
}
}
void bar(String s){}
}