No need for a dynamicbuffer anymore

This commit is contained in:
norman 2012-04-23 13:17:30 +02:00
parent d126059fb4
commit bfeb9ffd9a

View File

@ -78,8 +78,8 @@ public class FixedLengthFrameDecoder extends FrameDecoder {
protected ChannelBuffer newCumulationBuffer(ChannelHandlerContext ctx, int minimumCapacity) { protected ChannelBuffer newCumulationBuffer(ChannelHandlerContext ctx, int minimumCapacity) {
ChannelBufferFactory factory = ctx.getChannel().getConfig().getBufferFactory(); ChannelBufferFactory factory = ctx.getChannel().getConfig().getBufferFactory();
if (allocateFullBuffer) { if (allocateFullBuffer) {
return ChannelBuffers.dynamicBuffer( return ChannelBuffers.buffer(
factory.getDefaultOrder(), frameLength, ctx.getChannel().getConfig().getBufferFactory()); factory.getDefaultOrder(), frameLength);
} }
return super.newCumulationBuffer(ctx, minimumCapacity); return super.newCumulationBuffer(ctx, minimumCapacity);
} }