mirror of
https://gitflic.ru/project/openide/openide.git
synced 2026-09-27 10:03:11 +07:00
extract enum: change types accordingly (switch cases)
This commit is contained in:
+20
@@ -0,0 +1,20 @@
|
||||
public class Test {
|
||||
public static final int FOO = 0;
|
||||
public static final int BAR = 1;
|
||||
|
||||
void foo(int i) {
|
||||
switch (i) {
|
||||
case FOO:
|
||||
break;
|
||||
case BAR:
|
||||
break;
|
||||
}
|
||||
int k = Math.max(i * i, i + i);
|
||||
switch (k) {
|
||||
case FOO:
|
||||
break;
|
||||
case BAR:
|
||||
break;
|
||||
}
|
||||
}
|
||||
}
|
||||
+20
@@ -0,0 +1,20 @@
|
||||
public class Test {
|
||||
public static final int FOO = 0;
|
||||
public static final int BAR = 1;
|
||||
|
||||
void foo(int i) {
|
||||
switch (i) {
|
||||
case FOO:
|
||||
break;
|
||||
case BAR:
|
||||
break;
|
||||
}
|
||||
int k = Math.max(i * i, i + i);
|
||||
switch (k) {
|
||||
case FOO:
|
||||
break;
|
||||
case BAR:
|
||||
break;
|
||||
}
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user