Skip to content

Commit

Permalink
Add comment for calculateNewCapacity
Browse files Browse the repository at this point in the history
  • Loading branch information
zsxwing committed Dec 4, 2017
1 parent 555f88a commit bb97333
Showing 1 changed file with 6 additions and 0 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -147,6 +147,12 @@ private RuntimeException fail() {
throw new UnsupportedOperationException("Allocator doesn't support heap-based memory.");
}

/**
* This method was copied from AbstractByteBufAllocator. Netty 4.1.x moved this method from
* AbstractByteBuf to AbstractByteBufAllocator. However, as ArrowByteBufAllocator doesn't extend
* AbstractByteBufAllocator, it doesn't get the implementation automatically and we have to copy
* the codes.
*/
@Override
public int calculateNewCapacity(int minNewCapacity, int maxCapacity) {
if (minNewCapacity < 0) {
Expand Down

0 comments on commit bb97333

Please sign in to comment.