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 11, 2024
1 parent 7c3ea3b commit d145f29
Showing 1 changed file with 1 addition and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -3172,7 +3172,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, pool, doc.getCollection(), doc.getDocId(), doc.getFileURI());
tempDoc.copyOf(this, doc, doc);
final StreamListener listener = getIndexController().getStreamListener(doc, ReindexMode.STORE);
// copy the nodes
Expand Down

0 comments on commit d145f29

Please sign in to comment.