danepitkin commented on code in PR #37723:
URL: https://github.com/apache/arrow/pull/37723#discussion_r1434431098
##########
java/memory/memory-core/src/main/java/org/apache/arrow/memory/BufferLedger.java:
##########
@@ -178,7 +179,7 @@ public void retain() {
@Override
public void retain(int increment) {
Preconditions.checkArgument(increment > 0, "retain(%s) argument is not
positive", increment);
- if (BaseAllocator.DEBUG) {
+ if (BaseAllocator.DEBUG && historicalLog != null) {
Review Comment:
nit: one more BaseAllocator.DEBUG we can remove!
##########
java/memory/memory-core/src/main/java/org/apache/arrow/memory/util/MemoryUtil.java:
##########
@@ -63,6 +66,9 @@ public class MemoryUtil {
// try to get the unsafe object
final Object maybeUnsafe = AccessController.doPrivileged(new
PrivilegedAction<Object>() {
@Override
+ @SuppressWarnings({"nullness:argument", "nullness:return"})
Review Comment:
Thanks for trying, I need to look deeper into how Nullable annotations work.
##########
java/memory/memory-core/src/main/java/org/apache/arrow/memory/BufferLedger.java:
##########
@@ -306,7 +311,7 @@ ArrowBuf newArrowBuf(final long length, final BufferManager
manager) {
@Override
public ArrowBuf retain(final ArrowBuf srcBuffer, BufferAllocator target) {
- if (BaseAllocator.DEBUG) {
+ if (BaseAllocator.DEBUG && historicalLog != null) {
Review Comment:
nit: one more BaseAllocator.DEBUG we can remove
##########
java/memory/memory-core/src/main/java/org/apache/arrow/memory/BufferLedger.java:
##########
@@ -481,6 +489,8 @@ public long getAccountedSize() {
* @param indent The level of indentation to position the data.
* @param verbosity The level of verbosity to print.
*/
+ @SuppressWarnings({"nullness:dereference.of.nullable",
"nullness:locking.nullable"})
Review Comment:
Thanks for trying!
##########
java/memory/memory-core/pom.xml:
##########
@@ -90,5 +94,46 @@
</plugins>
</build>
</profile>
+
+ <profile>
+ <id>checkerframework-jdk11+</id>
Review Comment:
we can save this as follow up for the next nullability annotations PR
--
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]