Files
openide/java/java-tests/testData/codeInsight/daemonCodeAnalyzer/quickFix/deleteSwitchLabel/beforeDeleteWhenOtherIsAlwaysTrue.java
Tagir Valeev 50abafa3f8 UnwrapSwitchLabelFix: when only one switch branch is reachable
Fixes IDEA-200651 Analysis for 'switch' statements may determine always truthy conditions on branches in addition to always falsy
Minor refactoring of reporting in DataFlowInspectionBase
2018-10-17 16:39:25 +07:00

16 lines
326 B
Java

// "Unwrap 'switch' statement" "true"
class Main {
static void fff() {
switch ("one") {
case "<caret>one":
System.out.println("one");
case "two":
System.out.println("two");
}
}
public static void main(String[] args) {
fff();
}
}