Change from arrayList to immutableList in OrderedComposite#iterator
This commit is contained in:
committed by
Mahmoud Ben Hassine
parent
11169bae10
commit
d9bf57e572
@@ -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