Files
openide/java/java-tests/testData/inspection/switchExpressionMigration/beforeToExpressionWithReadBeforeWriteDefault.java
2024-10-28 21:01:30 +00:00

18 lines
434 B
Java

// "Replace with 'switch' expression" "true-preview"
public final class A {
private void appendColored(String text) {
String style = getRegularAttributes();
switc<caret>h (text) {
case "failed":
style = "ERROR_ATTRIBUTES";
break;
case "ignored":
style = "IGNORE_ATTRIBUTES";
break;
}
}
private static String getRegularAttributes() {
return "REGULAR_ATTRIBUTES";
}
}