netty5/buffer/src
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
..
main/java/io/netty/buffer Don't zero non-readable buffer regions when capacity is decreased (#9427) 2019-08-16 08:18:09 +02:00
test/java/io/netty/buffer Fix ByteBufUtil#writeUtf8 subsequence split surrogate edge-case bug (#9437) 2019-08-10 20:54:04 +02:00