BATCH-2054: StaxEventItemWriter fails on a NullPointerException with
Spring OXM 3.2.x.
This commit is contained in:
@@ -658,7 +658,7 @@ ResourceAwareItemWriterItemStream<T>, InitializingBean {
|
||||
finally {
|
||||
|
||||
try {
|
||||
eventWriter.close();
|
||||
delegateEventWriter.close();
|
||||
}
|
||||
catch (XMLStreamException e) {
|
||||
log.error("Unable to close file resource: [" + resource + "] " + e);
|
||||
|
||||
@@ -39,4 +39,10 @@ public class NoStartEndDocumentStreamWriter extends AbstractEventWriterWrapper {
|
||||
wrappedEventWriter.add(event);
|
||||
}
|
||||
}
|
||||
|
||||
// prevents OXM Marshallers from closing the XMLEventWriter
|
||||
@Override
|
||||
public void close() throws XMLStreamException {
|
||||
flush();
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user