Remove some dead code

This commit is contained in:
Norman Maurer 2013-08-11 21:37:43 +02:00
parent 73755d1233
commit 7d31943326
2 changed files with 6 additions and 9 deletions

View File

@ -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);

View File

@ -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);