danepitkin commented on code in PR #37723:
URL: https://github.com/apache/arrow/pull/37723#discussion_r1434263677
##########
java/memory/memory-core/src/main/java/org/apache/arrow/memory/BufferLedger.java:
##########
@@ -333,45 +338,48 @@ public ArrowBuf retain(final ArrowBuf srcBuffer,
BufferAllocator target) {
* @param targetReferenceManager The ledger to transfer ownership account to.
* @return Whether transfer fit within target ledgers limits.
*/
- boolean transferBalance(final ReferenceManager targetReferenceManager) {
- Preconditions.checkArgument(targetReferenceManager != null,
- "Expecting valid target reference manager");
- final BufferAllocator targetAllocator =
targetReferenceManager.getAllocator();
- Preconditions.checkArgument(allocator.getRoot() ==
targetAllocator.getRoot(),
- "You can only transfer between two allocators that share the same
root.");
+ boolean transferBalance(final @Nullable ReferenceManager
targetReferenceManager) {
+ if (targetReferenceManager != null) {
Review Comment:
Ah, I think we need to add back the Preconditions check that was deleted so
we still throw an exception if null
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: [email protected]
For queries about this service, please contact Infrastructure at:
[email protected]