Skip to content

Commit

Permalink
(yegor256#1220) Return immutable iterator
Browse files Browse the repository at this point in the history
  • Loading branch information
andreoss committed Sep 4, 2020
1 parent 9f5acb1 commit 072fdcb
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/main/java/org/cactoos/list/Immutable.java
Original file line number Diff line number Diff line change
Expand Up @@ -76,7 +76,7 @@ public boolean contains(final Object item) {

@Override
public Iterator<T> iterator() {
return this.list.iterator();
return new org.cactoos.iterator.Immutable<>(this.list.iterator());
}

@Override
Expand Down

0 comments on commit 072fdcb

Please sign in to comment.