Files
openide/java/java-tests/testData/codeInsight/daemonCodeAnalyzer/quickFix/simplifyBooleanExpressionFix/beforeGuard.java
Tagir Valeev dbccf5f59b [java-inspections] Delete switch branch when guard is false
Part of IDEA-326939 Support multi-pattern switch labels that define no variables

GitOrigin-RevId: 6d089c7e9f705a28f29376f1208ed39d4c8aa881
2023-08-18 08:18:08 +00:00

13 lines
281 B
Java

// "Remove switch label" "true-preview"
class X {
void test(Object obj) {
switch (obj) {
case String s when s.length()<caret> < 0:
System.out.println("oops");
break;
default:
System.out.println("something else");
break;
}
}
}