Remove the deprecated methods

This commit is contained in:
Trustin Lee 2014-06-24 16:37:36 +09:00
parent 824662c6ef
commit 64b8b52e2c
8 changed files with 1 additions and 57 deletions

View File

@ -28,14 +28,6 @@ public enum SocksAddressType {
this.b = b; this.b = b;
} }
/**
* @deprecated Use {@link #valueOf(byte)} instead.
*/
@Deprecated
public static SocksAddressType fromByte(byte b) {
return valueOf(b);
}
public static SocksAddressType valueOf(byte b) { public static SocksAddressType valueOf(byte b) {
for (SocksAddressType code : values()) { for (SocksAddressType code : values()) {
if (code.b == b) { if (code.b == b) {

View File

@ -28,14 +28,6 @@ public enum SocksAuthScheme {
this.b = b; this.b = b;
} }
/**
* @deprecated Use {@link #valueOf(byte)} instead.
*/
@Deprecated
public static SocksAuthScheme fromByte(byte b) {
return valueOf(b);
}
public static SocksAuthScheme valueOf(byte b) { public static SocksAuthScheme valueOf(byte b) {
for (SocksAuthScheme code : values()) { for (SocksAuthScheme code : values()) {
if (code.b == b) { if (code.b == b) {

View File

@ -26,14 +26,6 @@ public enum SocksAuthStatus {
this.b = b; this.b = b;
} }
/**
* @deprecated Use {@link #valueOf(byte)} instead.
*/
@Deprecated
public static SocksAuthStatus fromByte(byte b) {
return valueOf(b);
}
public static SocksAuthStatus valueOf(byte b) { public static SocksAuthStatus valueOf(byte b) {
for (SocksAuthStatus code : values()) { for (SocksAuthStatus code : values()) {
if (code.b == b) { if (code.b == b) {

View File

@ -45,7 +45,7 @@ public class SocksCmdRequestDecoder extends ReplayingDecoder<SocksCmdRequestDeco
protected void decode(ChannelHandlerContext ctx, ByteBuf byteBuf, List<Object> out) throws Exception { protected void decode(ChannelHandlerContext ctx, ByteBuf byteBuf, List<Object> out) throws Exception {
switch (state()) { switch (state()) {
case CHECK_PROTOCOL_VERSION: { case CHECK_PROTOCOL_VERSION: {
version = SocksProtocolVersion.fromByte(byteBuf.readByte()); version = SocksProtocolVersion.valueOf(byteBuf.readByte());
if (version != SocksProtocolVersion.SOCKS5) { if (version != SocksProtocolVersion.SOCKS5) {
break; break;
} }

View File

@ -34,14 +34,6 @@ public enum SocksCmdStatus {
this.b = b; this.b = b;
} }
/**
* @deprecated Use {@link #valueOf(byte)} instead.
*/
@Deprecated
public static SocksCmdStatus fromByte(byte b) {
return valueOf(b);
}
public static SocksCmdStatus valueOf(byte b) { public static SocksCmdStatus valueOf(byte b) {
for (SocksCmdStatus code : values()) { for (SocksCmdStatus code : values()) {
if (code.b == b) { if (code.b == b) {

View File

@ -28,14 +28,6 @@ public enum SocksCmdType {
this.b = b; this.b = b;
} }
/**
* @deprecated Use {@link #valueOf(byte)} instead.
*/
@Deprecated
public static SocksCmdType fromByte(byte b) {
return valueOf(b);
}
public static SocksCmdType valueOf(byte b) { public static SocksCmdType valueOf(byte b) {
for (SocksCmdType code : values()) { for (SocksCmdType code : values()) {
if (code.b == b) { if (code.b == b) {

View File

@ -27,14 +27,6 @@ public enum SocksProtocolVersion {
this.b = b; this.b = b;
} }
/**
* @deprecated Use {@link #valueOf(byte)} instead.
*/
@Deprecated
public static SocksProtocolVersion fromByte(byte b) {
return valueOf(b);
}
public static SocksProtocolVersion valueOf(byte b) { public static SocksProtocolVersion valueOf(byte b) {
for (SocksProtocolVersion code : values()) { for (SocksProtocolVersion code : values()) {
if (code.b == b) { if (code.b == b) {

View File

@ -26,14 +26,6 @@ public enum SocksSubnegotiationVersion {
this.b = b; this.b = b;
} }
/**
* @deprecated Use {@link #valueOf(byte)} instead.
*/
@Deprecated
public static SocksSubnegotiationVersion fromByte(byte b) {
return valueOf(b);
}
public static SocksSubnegotiationVersion valueOf(byte b) { public static SocksSubnegotiationVersion valueOf(byte b) {
for (SocksSubnegotiationVersion code : values()) { for (SocksSubnegotiationVersion code : values()) {
if (code.b == b) { if (code.b == b) {