ARTEMIS-1664 fix npe bug while getting element in the process of rehash

Apply same fix to ConcurrentLongHashSet
This commit is contained in:
Michael André Pearce 2018-02-22 23:20:56 +00:00 committed by Clebert Suconic
parent 6509c078fb
commit 2c32dda39e
1 changed files with 2 additions and 2 deletions

View File

@ -165,7 +165,7 @@ public class ConcurrentLongHashSet {
// Keys and values are stored interleaved in the table array
private long[] table;
private int capacity;
private volatile int capacity;
private volatile int size;
private int usedBuckets;
private int resizeThreshold;
@ -374,9 +374,9 @@ public class ConcurrentLongHashSet {
}
}
capacity = newCapacity;
table = newTable;
usedBuckets = size;
capacity = newCapacity;
resizeThreshold = (int) (capacity * SetFillFactor);
}