Skip to content

Commit

Permalink
[bugfix] NPE in NativeBroker.defragXMLResource
Browse files Browse the repository at this point in the history
A regression introduced in c553667 causes a NullPointerException to be thrown whenever an XML-resource
needs to be defragmented.
This will be triggered on frequent writes to any XML-resource and will effectively remove the file
from the database and from any indexes.
  • Loading branch information
line-o committed Apr 30, 2024
1 parent ad6636f commit 635e7aa
Showing 1 changed file with 1 addition and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -3033,7 +3033,7 @@ public Object start() {
}
}.run();
// create a copy of the old doc to copy the nodes into it
final DocumentImpl tempDoc = new DocumentImpl(null, null, doc.getCollection(), doc.getDocId(), doc.getFileURI());
final DocumentImpl tempDoc = new DocumentImpl(null, doc.getDocId(), doc);
tempDoc.copyOf(this, doc, doc);
final StreamListener listener = getIndexController().getStreamListener(doc, ReindexMode.STORE);
// copy the nodes
Expand Down

0 comments on commit 635e7aa

Please sign in to comment.