mirror of
https://gitflic.ru/project/openide/openide.git
synced 2026-09-27 10:03:11 +07:00
disable fall through inspection for switch statements with old and new syntax
IDEA-CR-40565
This commit is contained in:
+4
@@ -97,6 +97,10 @@ public class FallthruInSwitchStatementInspection extends BaseInspection {
|
||||
if (!(statement instanceof PsiSwitchLabelStatement)) {
|
||||
continue;
|
||||
}
|
||||
//enhanced switch statements forbid fallthrough implicitly
|
||||
if (statement instanceof PsiSwitchLabeledRuleStatement) {
|
||||
return;
|
||||
}
|
||||
final PsiElement previousSibling = PsiTreeUtil.skipWhitespacesBackward(statement);
|
||||
if (previousSibling instanceof PsiComment) {
|
||||
final PsiComment comment = (PsiComment)previousSibling;
|
||||
|
||||
Reference in New Issue
Block a user