mirror of
https://gitflic.ru/project/openide/openide.git
synced 2026-09-22 07:32:21 +07:00
17 lines
387 B
Java
17 lines
387 B
Java
// "Replace with 'switch' expression" "true"
|
|
import java.util.*;
|
|
|
|
class SwitchExpressionMigration {
|
|
private static void m() {
|
|
int result;
|
|
System.out.println("adasd");
|
|
/*before label*/
|
|
/*after label*/
|
|
/*in switch*/
|
|
result = switch (s) {
|
|
case "a" -> 1;
|
|
case "b" -> throw new NullPointerException();
|
|
default -> 0;
|
|
};
|
|
}
|
|
} |