diff --git a/flying-saucer-pdf/src/main/java/org/xhtmlrenderer/pdf/DocumentSplitter.java b/flying-saucer-pdf/src/main/java/org/xhtmlrenderer/pdf/DocumentSplitter.java index 0aa88fb25..95fdde728 100644 --- a/flying-saucer-pdf/src/main/java/org/xhtmlrenderer/pdf/DocumentSplitter.java +++ b/flying-saucer-pdf/src/main/java/org/xhtmlrenderer/pdf/DocumentSplitter.java @@ -19,6 +19,7 @@ */ package org.xhtmlrenderer.pdf; +import org.jspecify.annotations.Nullable; import org.w3c.dom.Document; import org.xml.sax.Attributes; import org.xml.sax.ContentHandler; @@ -244,10 +245,12 @@ public String getUri() { } private static final class NamespaceScope { - private NamespaceScope _parent; + @Nullable + private final NamespaceScope _parent; private final List _namespaces = new LinkedList<>(); private NamespaceScope() { + _parent = null; } private NamespaceScope(NamespaceScope parent) { @@ -280,6 +283,7 @@ private void replay(ContentHandler contentHandler, Set seen, boolean sta } } + @Nullable public NamespaceScope getParent() { return _parent; }