From 317898dbc07bab1a6a3455612e65eafcf0278be2 Mon Sep 17 00:00:00 2001 From: Vibhatha Lakmal Abeykoon Date: Tue, 3 Sep 2024 10:14:38 +0530 Subject: [PATCH] fix: addressing reviews v4 --- .../java/org/apache/arrow/memory/LowCostIdentityHashMap.java | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) 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;