Skip to content

Commit 43b31ae

Browse files
committed
Make the list of streams final in CompositeItemStream
Resolves BATCH-1969
1 parent 119ed55 commit 43b31ae

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

spring-batch-infrastructure/src/main/java/org/springframework/batch/item/support/CompositeItemStream.java

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -31,15 +31,15 @@
3131
*/
3232
public class CompositeItemStream implements ItemStream {
3333

34-
private List<ItemStream> streams = new ArrayList<>();
34+
private final List<ItemStream> streams = new ArrayList<>();
3535

3636
/**
3737
* Public setter for the {@link ItemStream}s.
3838
*
3939
* @param streams array of {@link ItemStream}.
4040
*/
4141
public void setStreams(ItemStream[] streams) {
42-
this.streams = Arrays.asList(streams);
42+
this.streams.addAll(Arrays.asList(streams));
4343
}
4444

4545
/**

0 commit comments

Comments
 (0)