netty5/buffer
Nick Hill 4ba75b99af De-duplicate UnpooledDirectByteBuf/UnpooledUnsafeDirectByteBuf (#9085)
Motivation

While digging around looking at something else I noticed that these
share a lot of logic and it would be nice to reduce that duplication.

Modifications

Have UnpooledUnsafeDirectByteBuf extend UnpooledDirectByteBuf and make
adjustments to ensure existing behaviour remains unchanged.

The most significant addition needed to UnpooledUnsafeDirectByteBuf was
re-overriding the getPrimitive/setPrimitive methods to revert back to
the AbstractByteBuf versions which include bounds checks
(UnpooledDirectByteBuf excludes these as an optimization, relying on
those done by underlying ByteBuffer).

Result

~200 fewer lines, less duplicate logic.
2019-06-03 13:15:43 +02:00
..
src De-duplicate UnpooledDirectByteBuf/UnpooledUnsafeDirectByteBuf (#9085) 2019-06-03 13:15:43 +02:00
pom.xml Update version number to start working on Netty 5 2018-11-20 15:49:57 +01:00