The pooling buffer allocator must allocate buffers with native byte order by default

This commit is contained in:
Chris Vest 2021-05-12 10:52:51 +02:00
parent 481b2ddd3d
commit 6b62b3a6c7
1 changed files with 2 additions and 1 deletions

View File

@ -32,6 +32,7 @@ import io.netty.util.internal.ThreadExecutorMap;
import io.netty.util.internal.logging.InternalLogger;
import io.netty.util.internal.logging.InternalLoggerFactory;
import java.nio.ByteOrder;
import java.util.ArrayList;
import java.util.Collections;
import java.util.List;
@ -283,7 +284,7 @@ public class PooledBufferAllocator implements BufferAllocator, BufferAllocatorMe
@Override
public Buffer allocate(int size) {
return allocate(new PooledAllocatorControl(), size);
return allocate(new PooledAllocatorControl(), size).order(ByteOrder.nativeOrder());
}
Buffer allocate(PooledAllocatorControl control, int size) {