mirror of
https://gitflic.ru/project/openide/openide.git
synced 2026-09-06 01:43:57 +07:00
GitOrigin-RevId: 411e4842d0ecf8cf4db0308f854e179dee46ced3
17 lines
401 B
Java
17 lines
401 B
Java
// "Replace with 'switch' expression" "true-preview"
|
|
import java.util.*;
|
|
|
|
class SwitchExpressionMigration {
|
|
private static void m() {
|
|
int result;
|
|
System.out.println("adasd");
|
|
/*before label*/
|
|
foo:/*after label*/
|
|
switch<caret>(s) {/*in switch*/
|
|
case "a": result = 1; break foo;
|
|
case "b":
|
|
throw new NullPointerException();
|
|
default: result = 0;
|
|
}
|
|
}
|
|
} |