netty5/buffer
Nikolay Fedorovskikh 81a7d1413b Makes EmptyByteBuf#hashCode and AbstractByteBuf#hashCode consistent (#7870)
Motivation:
The `AbstractByteBuf#equals` method doesn't take into account the
class of buffer instance. So the two buffers with different classes
must have the same `hashCode` values if `equals` method returns `true`.
But `EmptyByteBuf#hashCode` is not consistent with `#hashCode`
of the empty `AbstractByteBuf`, that is violates the contract and
can lead to errors.

Modifications:
Return `1` in `EmptyByteBuf#hashCode`.

Result:
Consistent behavior of `EmptyByteBuf#hashCode` and `AbstractByteBuf#hashCode`.
2018-04-16 12:11:42 +02:00
..
src Makes EmptyByteBuf#hashCode and AbstractByteBuf#hashCode consistent (#7870) 2018-04-16 12:11:42 +02:00
pom.xml [maven-release-plugin] prepare for next development iteration 2018-04-04 10:44:46 +00:00