fix longSize() implementation for closed map

This commit is contained in:
Dmitry Pisklov
2020-05-28 17:06:58 +01:00
parent d7c318986b
commit b0ef26bb58
@@ -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);