Deprecate SocksMessage.encodeAsByteBuf()
It was an internal use only method which became public by a mistake during the review process.
This commit is contained in:
parent
71dce0193f
commit
7457801020
@ -54,7 +54,7 @@ public class SocksCmdRequestDecoder extends ReplayingDecoder<SocksCmdRequestDeco
|
||||
protected void decode(ChannelHandlerContext ctx, ByteBuf byteBuf, List<Object> out) throws Exception {
|
||||
switch (state()) {
|
||||
case CHECK_PROTOCOL_VERSION: {
|
||||
version = SocksProtocolVersion.fromByte(byteBuf.readByte());
|
||||
version = SocksProtocolVersion.valueOf(byteBuf.readByte());
|
||||
if (version != SocksProtocolVersion.SOCKS5) {
|
||||
break;
|
||||
}
|
||||
|
@ -55,7 +55,8 @@ public abstract class SocksMessage {
|
||||
}
|
||||
|
||||
/**
|
||||
* Encode socks message into its byte representation and write it into byteBuf
|
||||
* @deprecated Do not use; this method was intended for an internal use only.
|
||||
*/
|
||||
@Deprecated
|
||||
public abstract void encodeAsByteBuf(ByteBuf byteBuf);
|
||||
}
|
||||
|
@ -39,6 +39,7 @@ public class SocksMessageEncoder extends MessageToByteEncoder<SocksMessage> {
|
||||
}
|
||||
|
||||
@Override
|
||||
@SuppressWarnings("deprecation")
|
||||
protected void encode(ChannelHandlerContext ctx, SocksMessage msg, ByteBuf out) throws Exception {
|
||||
msg.encodeAsByteBuf(out);
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user