netty5/buffer
Chris Vest 1eb9a9764e
Buffer should not expose nativeAddress() directly (#11665)
Motivation:
Accessing the native address, if a buffer has any, violates the no-aliasing rule for Buffers.
Also, it inherently assumes that a buffer has a single, native memory allocation.
The native address, or addresses, are already available via the Readable- and WritableComponents.
Accessing these via forEachReadable and forEachWritable will also ensure that composite buffers will be handled correctly.

Modification:
Remove the nativeAddress() method from the Buffer API.
Update the ByteBufAdaptor and a few tests to cope with this change.

Result:
Less error prone code, and make unsafe APIs a bit more hidden.
2021-09-08 20:02:59 +02:00
..
src Buffer should not expose nativeAddress() directly (#11665) 2021-09-08 20:02:59 +02:00
pom.xml Use http in xmlns URIs to make maven release plugin happy again (#10788) 2020-11-10 10:51:05 +01:00