Skip to content

Commit

Permalink
fix: addressing reviews v4
Browse files Browse the repository at this point in the history
  • Loading branch information
vibhatha committed Sep 3, 2024
1 parent 6fbf36c commit 317898d
Showing 1 changed file with 2 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -44,7 +44,7 @@ public class LowCostIdentityHashMap<K, V extends ValueWithKeyIncluded<K>> {
* 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;

Expand All @@ -71,7 +71,7 @@ public LowCostIdentityHashMap(int maxSize) {
}
}

private long getThreshold(@UnderInitialization LowCostIdentityHashMap<K, V> this, long maxSize) {
private int getThreshold(@UnderInitialization LowCostIdentityHashMap<K, V> this, int maxSize) {
// assign the threshold to maxSize initially, this will change to a
// higher value if rehashing occurs.
return maxSize > 2 ? maxSize : 2;
Expand Down

0 comments on commit 317898d

Please sign in to comment.