mirror of
https://github.com/apache/activemq-artemis.git
synced 2025-02-06 10:09:01 +00:00
ARTEMIS-1664 fix npe bug while getting element in the process of rehash
Apply same fix to ConcurrentLongHashSet
This commit is contained in:
parent
6509c078fb
commit
2c32dda39e
@ -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);
|
||||
}
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user