Skip to content

Commit b4cb1f3

Browse files
sjh836fmbenhassine
authored andcommitted
Change from arrayList to immutableList in OrderedComposite#iterator
(cherry picked from commit d9bf57e)
1 parent f7c3af1 commit b4cb1f3

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

spring-batch-core/src/main/java/org/springframework/batch/core/listener/OrderedComposite.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -83,7 +83,7 @@ else if (!unordered.contains(item)) {
8383
* @return an iterator over the list of items
8484
*/
8585
public Iterator<S> iterator() {
86-
return new ArrayList<>(list).iterator();
86+
return Collections.unmodifiableList(list).iterator();
8787
}
8888

8989
/**

0 commit comments

Comments
 (0)