Files
openide/java/java-tests/testData/inspection/duplicateBranchesInSwitchFix/afterDuplicateAfterDefaultDelete.java
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

16 lines
355 B
Java

// "Delete redundant 'switch' branch" "INFORMATION"
class C {
void foo(int n) {
switch (n) {
case 2:
bar("B");
break;
default:
/*comment 2*/
bar("A");
break;/*comment 1*/
/*comment 3*/
}
}
void bar(String s){}
}