RESOLVED - issue BATCH-1490: StaxEventItemWriter outputs invalid xml if step handling is failed and retried when handling the first chunk of data
This commit is contained in:
@@ -459,6 +459,11 @@ public class StaxEventItemWriter<T> extends ExecutionContextUserSupport implemen
|
||||
|
||||
}
|
||||
|
||||
/*
|
||||
* This forces the flush to write the end of the root element and avoids
|
||||
* an off-by-one error on restart.
|
||||
*/
|
||||
writer.add(factory.createIgnorableSpace(""));
|
||||
writer.flush();
|
||||
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user