Update Javadocs about exception handling when closing composite streams
Related to #4764 and #4750
This commit is contained in:
@@ -79,6 +79,12 @@ public class CompositeItemReader<T> implements ItemStreamReader<T> {
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* Close all delegates.
|
||||
* @throws ItemStreamException thrown if one of the delegates fails to close. Original
|
||||
* exceptions thrown by delegates are added as suppressed exceptions into this one, in
|
||||
* the same order as delegates were registered.
|
||||
*/
|
||||
@Override
|
||||
public void close() throws ItemStreamException {
|
||||
List<Exception> exceptions = new ArrayList<>();
|
||||
|
||||
@@ -102,7 +102,8 @@ public class CompositeItemStream implements ItemStream {
|
||||
/**
|
||||
* Broadcast the call to close.
|
||||
* @throws ItemStreamException thrown if one of the {@link ItemStream}s in the list
|
||||
* fails to close.
|
||||
* fails to close. Original exceptions thrown by delegates are added as suppressed
|
||||
* exceptions into this one, in the same order as delegates were registered.
|
||||
*/
|
||||
@Override
|
||||
public void close() throws ItemStreamException {
|
||||
|
||||
@@ -105,6 +105,12 @@ public class CompositeItemWriter<T> implements ItemStreamWriter<T>, Initializing
|
||||
this.delegates = delegates;
|
||||
}
|
||||
|
||||
/**
|
||||
* Close all delegates.
|
||||
* @throws ItemStreamException thrown if one of the delegates fails to close. Original
|
||||
* exceptions thrown by delegates are added as suppressed exceptions into this one, in
|
||||
* the same order as delegates were registered.
|
||||
*/
|
||||
@Override
|
||||
public void close() throws ItemStreamException {
|
||||
List<Exception> exceptions = new ArrayList<>();
|
||||
|
||||
Reference in New Issue
Block a user