Skip to content

Commit 7211947

Browse files
committed
Polish
1 parent 73ca736 commit 7211947

File tree

1 file changed

+3
-7
lines changed

1 file changed

+3
-7
lines changed

spring-batch-infrastructure/src/main/java/org/springframework/batch/item/xml/StaxEventItemWriter.java

+3-7
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
/*
2-
* Copyright 2006-2013 the original author or authors.
2+
* Copyright 2006-2017 the original author or authors.
33
*
44
* Licensed under the Apache License, Version 2.0 (the "License");
55
* you may not use this file except in compliance with the License.
@@ -751,7 +751,7 @@ private void closeStream() {
751751
*
752752
* @param items the value object
753753
*
754-
* @throws Exception thrown if general error occurs.
754+
* @throws IOException thrown if general error occurs.
755755
* @throws XmlMappingException thrown if error occurs during XML Mapping.
756756
*/
757757
@Override
@@ -775,13 +775,9 @@ public void write(List<? extends T> items) throws XmlMappingException, IOExcepti
775775
channel.force(false);
776776
}
777777
}
778-
catch (XMLStreamException e) {
778+
catch (XMLStreamException | IOException e) {
779779
throw new WriteFailedException("Failed to flush the events", e);
780780
}
781-
catch (IOException e) {
782-
throw new WriteFailedException("Failed to flush the events", e);
783-
}
784-
785781
}
786782

787783
/**

0 commit comments

Comments
 (0)