Skip to content

Commit

Permalink
内存优化
Browse files Browse the repository at this point in the history
  • Loading branch information
夜色 committed Dec 12, 2016
1 parent 4c101f7 commit 882ed42
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion mpush-api/src/main/java/com/mpush/api/protocol/Command.java
Expand Up @@ -56,8 +56,10 @@ public enum Command {

public final byte cmd;

private static final Command[] values = values();

public static Command toCMD(byte b) {
if (b > 0 && b < values().length) return values()[b - 1];
if (b > 0 && b < values.length) return values[b - 1];
return UNKNOWN;
}
}

0 comments on commit 882ed42

Please sign in to comment.