Fix a bug where AbstractByteBuf.order() doesn't return a swapped buffer if capacity is 0.
- Fixes #1152
This commit is contained in:
parent
644d5abbda
commit
b86d3d692a
@ -331,7 +331,7 @@ public abstract class AbstractByteBuf implements ByteBuf {
|
||||
if (endianness == null) {
|
||||
throw new NullPointerException("endianness");
|
||||
}
|
||||
if (endianness == order() || capacity() == 0) {
|
||||
if (endianness == order()) {
|
||||
return this;
|
||||
}
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user