mirror of
https://gitflic.ru/project/openide/openide.git
synced 2026-09-08 21:52:48 +07:00
IDEA-292909 GitOrigin-RevId: b8da95df3641add9c696b864ac624237f43a29e2
25 lines
461 B
Java
25 lines
461 B
Java
// "Replace with old style 'switch' statement" "true"
|
|
|
|
class SwitchExpressionMigration {
|
|
void test(X x) {
|
|
int i;
|
|
switch (x) {
|
|
case A:
|
|
i = 1;
|
|
break;
|
|
case B:
|
|
i = 2;
|
|
break;
|
|
case C:
|
|
i = 3;
|
|
break;
|
|
default:
|
|
throw new IllegalArgumentException();
|
|
}
|
|
System.out.println(i);
|
|
}
|
|
|
|
enum X {
|
|
A, B, C
|
|
}
|
|
} |