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:
Michael André Pearce 2019-01-18 08:20:14 +00:00
parent b2d40b716d
commit f49d3e89dc
1 changed files with 1 additions and 1 deletions

View File

@ -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];