mirror of
https://github.com/hierynomus/sshj.git
synced 2025-12-06 15:20:54 +03:00
enum reverse cache objects
This commit is contained in:
@@ -67,8 +67,7 @@ public enum Message {
|
||||
|
||||
static {
|
||||
for (Message c : Message.values())
|
||||
if (cache[c.toByte()] == null)
|
||||
cache[c.toByte()] = c;
|
||||
cache[c.toByte()] = c;
|
||||
}
|
||||
|
||||
public static Message fromByte(byte b) {
|
||||
|
||||
@@ -27,8 +27,7 @@ public enum Signal {
|
||||
INT("INT"),
|
||||
KILL("KILL"),
|
||||
PIPE("PIPE"),
|
||||
QUIT(
|
||||
"QUIT"),
|
||||
QUIT("QUIT"),
|
||||
SEGV("SEGV"),
|
||||
TERM("TERM"),
|
||||
USR1("USR1"),
|
||||
|
||||
@@ -52,8 +52,7 @@ public enum PacketType {
|
||||
|
||||
static {
|
||||
for (PacketType t : PacketType.values())
|
||||
if (cache[t.toByte() & 0xff] == null)
|
||||
cache[t.toByte() & 0xff] = t;
|
||||
cache[t.toByte() & 0xff] = t;
|
||||
}
|
||||
|
||||
private PacketType(int b) {
|
||||
|
||||
Reference in New Issue
Block a user