diff --git a/java/memory/memory-core/src/main/java/org/apache/arrow/memory/LowCostIdentityHashMap.java b/java/memory/memory-core/src/main/java/org/apache/arrow/memory/LowCostIdentityHashMap.java index 2be82d33fc205..c54b635138e91 100644 --- a/java/memory/memory-core/src/main/java/org/apache/arrow/memory/LowCostIdentityHashMap.java +++ b/java/memory/memory-core/src/main/java/org/apache/arrow/memory/LowCostIdentityHashMap.java @@ -44,7 +44,7 @@ public class LowCostIdentityHashMap> { * maximum number of elements that can be put in this map before having to * rehash. */ - private long threshold; + private int threshold; private static final int DEFAULT_MIN_SIZE = 1; @@ -71,7 +71,7 @@ public LowCostIdentityHashMap(int maxSize) { } } - private long getThreshold(@UnderInitialization LowCostIdentityHashMap this, long maxSize) { + private int getThreshold(@UnderInitialization LowCostIdentityHashMap this, int maxSize) { // assign the threshold to maxSize initially, this will change to a // higher value if rehashing occurs. return maxSize > 2 ? maxSize : 2;