mirror of
https://github.com/github/codeql.git
synced 2026-04-28 02:05:14 +02:00
Migrate Java code to separate QL repo.
This commit is contained in:
23
java/ql/src/DeadCode/DeadEnumConstant.java
Normal file
23
java/ql/src/DeadCode/DeadEnumConstant.java
Normal file
@@ -0,0 +1,23 @@
|
||||
public enum Result {
|
||||
SUCCESS,
|
||||
FAILURE,
|
||||
ERROR
|
||||
}
|
||||
|
||||
public Result runOperation(String value) {
|
||||
if (value == 1) {
|
||||
return SUCCESS;
|
||||
} else {
|
||||
return FAILURE;
|
||||
}
|
||||
}
|
||||
|
||||
public static void main(String[] args) {
|
||||
Result operationResult = runOperation(args[0]);
|
||||
if (operationResult == Result.ERROR) {
|
||||
exit(1);
|
||||
} else {
|
||||
exit(0);
|
||||
}
|
||||
|
||||
}
|
||||
Reference in New Issue
Block a user