mirror of
https://gitflic.ru/project/openide/openide.git
synced 2026-09-27 10:03:11 +07:00
EnumSwitchStatementWhichMissesCasesInspection: isDefaultSwitchLabelStatement fixed (IDEA-CR-40700)
This commit is contained in:
+1
-1
@@ -364,7 +364,7 @@ public class EnumSwitchStatementWhichMissesCasesInspection extends AbstractBaseJ
|
||||
}
|
||||
|
||||
private static boolean isDefaultSwitchLabelStatement(PsiElement element) {
|
||||
return element instanceof PsiSwitchLabelStatement && ((PsiSwitchLabelStatement)element).isDefaultCase();
|
||||
return element instanceof PsiSwitchLabelStatementBase && ((PsiSwitchLabelStatementBase)element).isDefaultCase();
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
+1
@@ -13,6 +13,7 @@ class BeforeDefault {
|
||||
case C, D -> System.out.println("foo");
|
||||
case E -> {
|
||||
}
|
||||
default -> System.out.println("bar");
|
||||
}
|
||||
}
|
||||
}
|
||||
+1
@@ -9,6 +9,7 @@ class BeforeDefault {
|
||||
case A -> System.out.println("foo");
|
||||
case F -> System.out.println("foo");
|
||||
case C, D -> System.out.println("foo");
|
||||
default -> System.out.println("bar");
|
||||
}
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user