Skip to content

Commit

Permalink
apacheGH-36332: [Java] Fix Spark integration failure due to Netty ver…
Browse files Browse the repository at this point in the history
…sion upgrade
  • Loading branch information
danepitkin committed Jul 5, 2023
1 parent ea5ce03 commit 2176273
Showing 1 changed file with 2 additions and 3 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -161,8 +161,7 @@ public InnerAllocator() {
}

private UnsafeDirectLittleEndian newDirectBufferL(int initialCapacity, int maxCapacity) {
PoolArenasCache cache = threadCache();
PoolArena<ByteBuffer> directArena = cache.directArena;
PoolArena<ByteBuffer> directArena = threadCache().directArena;

if (directArena != null) {

Expand All @@ -178,7 +177,7 @@ private UnsafeDirectLittleEndian newDirectBufferL(int initialCapacity, int maxCa
hugeBufferSize);
} else {
// within chunk, use arena.
ByteBuf buf = directArena.allocate(cache, initialCapacity, maxCapacity);
ByteBuf buf = directArena.allocate(threadCache(), initialCapacity, maxCapacity);
if (!(buf instanceof PooledUnsafeDirectByteBuf)) {
fail();
}
Expand Down

0 comments on commit 2176273

Please sign in to comment.