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