mirror of
https://gitflic.ru/project/openide/openide.git
synced 2026-08-26 11:00:04 +07:00
extract enum: do not migrate other constants to enum
This commit is contained in:
+19
@@ -0,0 +1,19 @@
|
||||
public class Test {
|
||||
public static final int OK = 0;
|
||||
public static final int ERROR = 1;
|
||||
|
||||
void foo(int status) {
|
||||
switch (status) {
|
||||
case OK:
|
||||
break;
|
||||
case ERROR:
|
||||
break;
|
||||
case Node.WARNING:
|
||||
break;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
interface Node {
|
||||
int WARNING = 2;
|
||||
}
|
||||
+19
@@ -0,0 +1,19 @@
|
||||
public class Test {
|
||||
public static final int OK = 0;
|
||||
public static final int ERROR = 1;
|
||||
|
||||
void foo(int status) {
|
||||
switch (status) {
|
||||
case OK:
|
||||
break;
|
||||
case ERROR:
|
||||
break;
|
||||
case Node.WARNING:
|
||||
break;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
interface Node {
|
||||
int WARNING = 2;
|
||||
}
|
||||
Reference in New Issue
Block a user