Skip to content

Commit 29331b3

Browse files
authored
Fix possible NPE in LazyReferenceManager.Default.updateStatistics (eclipse-serializer#171)
1 parent 57f0a82 commit 29331b3

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed

base/src/main/java/org/eclipse/serializer/reference/LazyReferenceManager.java

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -436,7 +436,8 @@ private void updateStatistics()
436436
for(Entry e = this.head; (e = e.nextLazyManagerEntry) != null;)
437437
{
438438
lazyReferences++;
439-
if(e.get().isLoaded())
439+
final Lazy<?> ref = e.get();
440+
if(ref != null && ref.isLoaded())
440441
{
441442
loadedLazyReferences++;
442443
}

0 commit comments

Comments
 (0)