Change from arrayList to immutableList in OrderedComposite#iterator
(cherry picked from commit d9bf57e572)
This commit is contained in:
committed by
Mahmoud Ben Hassine
parent
f7c3af1f90
commit
b4cb1f3d56
@@ -83,7 +83,7 @@ class OrderedComposite<S> {
|
||||
* @return an iterator over the list of items
|
||||
*/
|
||||
public Iterator<S> iterator() {
|
||||
return new ArrayList<>(list).iterator();
|
||||
return Collections.unmodifiableList(list).iterator();
|
||||
}
|
||||
|
||||
/**
|
||||
|
||||
Reference in New Issue
Block a user