netty5/buffer/src
Norman Maurer ad86ec798d Move calculateNewCapacity(...) to ByteBufAllocator
Motivation:

Currently we have the algorithm of calculate the new capacity of a ByteBuf implemented in AbstractByteBuf. The problem with this is that it is impossible for a user to change it if it not fits well it's use-case. We should better move it to ByteBufAllocator and so let the user implement it's own by either write his/her own ByteBufAllocator or just override the default implementation in one of our provided ByteBufAllocators.

Modifications:

Move calculateNewCapacity(...) to ByteBufAllocator and move the implementation (which was part of AbstractByteBuf) to AbstractByteBufAllocator.

Result:

The user can now override the default calculation algorithm when needed.
2014-06-17 09:35:45 +02:00
..
main/java/io/netty/buffer Move calculateNewCapacity(...) to ByteBufAllocator 2014-06-17 09:35:45 +02:00
test/java/io/netty/buffer Fix capacity check bug affecting offheap buffers 2014-05-13 07:25:15 +02:00