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) {
ChannelBufferFactory factory = ctx.getChannel().getConfig().getBufferFactory();
if (allocateFullBuffer) {
return ChannelBuffers.dynamicBuffer(
factory.getDefaultOrder(), frameLength, ctx.getChannel().getConfig().getBufferFactory());
return ChannelBuffers.buffer(
factory.getDefaultOrder(), frameLength);
}
return super.newCumulationBuffer(ctx, minimumCapacity);
}