Skip to content

Commit f426924

Browse files
line-oadamretter
authored andcommitted
[bugfix] NPE in NativeBroker.defragXMLResource
A regression introduced in 4b86978 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 a843923 commit f426924

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
@@ -3033,7 +3033,7 @@ public Object start() {
30333033
}
30343034
}.run();
30353035
// create a copy of the old doc to copy the nodes into it
3036-
final DocumentImpl tempDoc = new DocumentImpl(null, null, doc.getCollection(), doc.getDocId(), doc.getFileURI());
3036+
final DocumentImpl tempDoc = new DocumentImpl(null, doc.getDocId(), doc);
30373037
tempDoc.copyOf(this, doc, doc);
30383038
final StreamListener listener = getIndexController().getStreamListener(doc, ReindexMode.STORE);
30393039
// copy the nodes

0 commit comments

Comments
 (0)