davisusanibar commented on code in PR #37723:
URL: https://github.com/apache/arrow/pull/37723#discussion_r1434223512
##########
java/memory/memory-core/src/main/java/org/apache/arrow/memory/Accountant.java:
##########
@@ -72,13 +73,13 @@ public Accountant(Accountant parent, String name, long
reservation, long maxAllo
this.reservation = reservation;
this.allocationLimit.set(maxAllocation);
- if (reservation != 0) {
+ if (reservation != 0 && parent != null) {
Review Comment:
[CheckerFramework](https://checkerframework.org/manual/#introduction:~:text=A%20%E2%80%9Cchecker%E2%80%9D%20is%20a%20compile%2Dtime%20tool)
is a compile-time tool, for that reason that condition `&& parent != null` is
needed to be added.
Obviously this in checked also at runtime validation for
`Preconditions.checkArgument` and also throw `throw new IllegalStateException`
if needed.
--
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]