mirror of
https://github.com/OpenHFT/Chronicle-Map.git
synced 2021-09-13 01:26:12 +00:00
fix longSize() implementation for closed map
This commit is contained in:
@@ -203,7 +203,7 @@ public class VanillaChronicleMap<K, V, R>
|
||||
@Override
|
||||
public final long longSize() {
|
||||
long result = 0L;
|
||||
if (!isClosed())
|
||||
if (!isClosed() && this.cxt != null)
|
||||
try (IterationContext<K, V, ?> c = iterationContext()) {
|
||||
for (int segmentIndex = 0; segmentIndex < segments(); segmentIndex++) {
|
||||
c.initSegmentIndex(segmentIndex);
|
||||
|
||||
Reference in New Issue
Block a user