MultiResourceItemReader executes all or none of the ItemStream methods
If no resources are found to be passed to the delegate ItemStream, ItemStream#open is not called. This commit updates the close side to not call the delegate's close method if the open was not called. BATCH-2378
This commit is contained in:
@@ -150,7 +150,11 @@ public class MultiResourceItemReader<T> extends AbstractItemStreamItemReader<T>
|
||||
@Override
|
||||
public void close() throws ItemStreamException {
|
||||
super.close();
|
||||
delegate.close();
|
||||
|
||||
if(!this.noInput) {
|
||||
delegate.close();
|
||||
}
|
||||
|
||||
noInput = false;
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user