Skip to content
Browse files
fix broken StaxItemWriter
The condition to create the parent dirs was wrong and did lead
to an Exception if the directory got freshly created
  • Loading branch information
struberg committed Mar 30, 2014
1 parent 67e63c0 commit 6f9c3c35cdac57c548c81bcb874d86f13e0a575d
Showing 1 changed file with 1 addition and 1 deletion.
@@ -83,7 +83,7 @@ public void open(final Serializable checkpoint) throws Exception {

marshaller = JAXBContextFactory.getJaxbContext(marshallingPackage, marshallingClasses).createMarshaller();
final File file = new File(output);
if (!file.getParentFile().exists() && file.getParentFile().mkdirs()) {
if (!file.getParentFile().exists() && !file.getParentFile().mkdirs()) {
throw new BatchRuntimeException("Output parent file can't be created");

0 comments on commit 6f9c3c3

Please sign in to comment.