NO-JIRA Fix possible IOE
id must be less than values.length, values[id] array access might be out of bounds, as the index might be equal to the array length.
This commit is contained in:
parent
b2d40b716d
commit
f49d3e89dc
|
@ -37,7 +37,7 @@ public enum QueueStatus {
|
|||
}
|
||||
|
||||
public static QueueStatus fromID(short id) {
|
||||
if (id < 0 || id > values.length) {
|
||||
if (id < 0 || id >= values.length) {
|
||||
return null;
|
||||
} else {
|
||||
return values[id];
|
||||
|
|
Loading…
Reference in New Issue