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:
dsyer
2010-01-19 10:08:14 +00:00
parent fc09b8c33f
commit 7c19e7aef3
2 changed files with 59 additions and 1 deletions

View File

@@ -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();
}