netty5/buffer
Nick Hill 4db38b4e0c Don't zero non-readable buffer regions when capacity is decreased (#9427)
Motivation

#1802 fixed ByteBuf implementations to ensure that the whole buffer
region is preserved when capacity is increased, not just the readable
part. The behaviour is still different however when the capacity is
_decreased_ - data outside the currently-readable region is zeroed.

Modifications

Update ByteBuf capacity(int) implementations to also copy the whole
buffer region when the new capacity is less than the current capacity.

Result

Consistent behaviour of ByteBuf#capacity(int) regardless of whether the
new capacity is greater than or less than the current capacity.
2019-08-16 08:18:09 +02:00
..
src Don't zero non-readable buffer regions when capacity is decreased (#9427) 2019-08-16 08:18:09 +02:00
pom.xml [maven-release-plugin] prepare for next development iteration 2019-08-13 17:16:42 +00:00