Remove some dead code
This commit is contained in:
parent
73755d1233
commit
7d31943326
@ -102,12 +102,10 @@ public abstract class MessageToByteEncoder<I> extends ChannelOutboundHandlerAdap
|
||||
if (acceptOutboundMessage(msg)) {
|
||||
@SuppressWarnings("unchecked")
|
||||
I cast = (I) msg;
|
||||
if (buf == null) {
|
||||
if (preferDirect) {
|
||||
buf = ctx.alloc().ioBuffer();
|
||||
} else {
|
||||
buf = ctx.alloc().heapBuffer();
|
||||
}
|
||||
if (preferDirect) {
|
||||
buf = ctx.alloc().ioBuffer();
|
||||
} else {
|
||||
buf = ctx.alloc().heapBuffer();
|
||||
}
|
||||
try {
|
||||
encode(ctx, cast, buf);
|
||||
|
@ -190,13 +190,12 @@ public class JdkZlibEncoder extends ZlibEncoder {
|
||||
}
|
||||
|
||||
@Override
|
||||
protected void encode(ChannelHandlerContext ctx, ByteBuf in, ByteBuf out) throws Exception {
|
||||
protected void encode(ChannelHandlerContext ctx, ByteBuf uncompressed, ByteBuf out) throws Exception {
|
||||
if (finished) {
|
||||
out.writeBytes(in);
|
||||
out.writeBytes(uncompressed);
|
||||
return;
|
||||
}
|
||||
|
||||
ByteBuf uncompressed = in;
|
||||
byte[] inAry = new byte[uncompressed.readableBytes()];
|
||||
uncompressed.readBytes(inAry);
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user