netty5/buffer/src
Nick Hill 1e575d7389 Fix redundant or missing checks and other inconsistencies in ByteBuf impls (#9119)
Motivation

There are a few minor inconsistencies / redundant operations in the
ByteBuf implementations which would be good to fix.

Modifications

- Unnecessary ByteBuffer.duplicate() performed in
CompositeByteBuf.nioBuffer(int,int)
- Add missing checkIndex(...) check to
ReadOnlyByteBufferBuf.nioBuffer(int,int)
- Remove duplicate bounds check in
ReadOnlyByteBufferBuf.getBytes(int,byte[],int,int)
- Omit redundant bounds check in
UnpooledHeapByteBuf.getBytes(int,ByteBuffer)

Result

More consistency and slightly less overhead
2019-05-27 15:32:42 +02:00
..
main/java/io/netty/buffer Fix redundant or missing checks and other inconsistencies in ByteBuf impls (#9119) 2019-05-27 15:32:42 +02:00
test/java/io/netty/buffer Introduce ByteBuf.maxFastWritableBytes() method (#9086) 2019-05-22 20:11:56 +02:00