Skip to content

Commit e4c030f

Browse files
committed
[bugfix] NPE in NativeBroker.defragXMLResource
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.
1 parent 734202b commit e4c030f

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

exist-core/src/main/java/org/exist/storage/NativeBroker.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3172,7 +3172,7 @@ public Object start() {
31723172
}
31733173
}.run();
31743174
// create a copy of the old doc to copy the nodes into it
3175-
final DocumentImpl tempDoc = new DocumentImpl(null, null, doc.getCollection(), doc.getDocId(), doc.getFileURI());
3175+
final DocumentImpl tempDoc = new DocumentImpl(null, pool, doc.getCollection(), doc.getDocId(), doc.getFileURI());
31763176
tempDoc.copyOf(this, doc, doc);
31773177
final StreamListener listener = getIndexController().getStreamListener(doc, ReindexMode.STORE);
31783178
// copy the nodes

0 commit comments

Comments
 (0)