Skip to content
This repository was archived by the owner on Jan 9, 2025. It is now read-only.

Commit 850c818

Browse files
hg-mszdenek-jonas
authored andcommitted
Fixed issue #584 (#586)
Fixed a Nullpointer exception in one.microstream.collections.lazy.LazySegmentUnloader.remove in case of no loaded segments. (cherry picked from commit f036cb5)
1 parent d1e2bf0 commit 850c818

File tree

1 file changed

+8
-2
lines changed

1 file changed

+8
-2
lines changed

base/src/main/java/one/microstream/collections/lazy/LazySegmentUnloader.java

Lines changed: 8 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -210,7 +210,10 @@ public LazySegmentUnloader copy()
210210
@Override
211211
public void remove(final LazySegment<?> segment)
212212
{
213-
this.loadedSegments.remove(segment);
213+
if(this.loadedSegments != null)
214+
{
215+
this.loadedSegments.remove(segment);
216+
}
214217
}
215218

216219
}
@@ -313,7 +316,10 @@ public LazySegmentUnloader copy()
313316
@Override
314317
public void remove(final LazySegment<?> segment)
315318
{
316-
this.loadedSegments.remove(segment);
319+
if(this.loadedSegments != null)
320+
{
321+
this.loadedSegments.remove(segment);
322+
}
317323
}
318324

319325
}

0 commit comments

Comments
 (0)