mirror of
https://gitflic.ru/project/openide/openide.git
synced 2026-09-07 15:35:40 +07:00
GitOrigin-RevId: 7562bb688c2bf6e93bab7537113bb54246949006
15 lines
418 B
Java
15 lines
418 B
Java
// "Replace with 'switch' expression" "true-preview"
|
|
public final class A {
|
|
private void appendColored(String text) {
|
|
String style = getRegularAttributes();
|
|
style = switch (text) {
|
|
case "failed" -> "ERROR_ATTRIBUTES";
|
|
case "ignored" -> "IGNORE_ATTRIBUTES";
|
|
default -> style;
|
|
};
|
|
}
|
|
|
|
private static String getRegularAttributes() {
|
|
return "REGULAR_ATTRIBUTES";
|
|
}
|
|
} |