Skip to content

Commit

Permalink
(yegor256#1575) Immutable::iterator now returns iterator.Immutable
Browse files Browse the repository at this point in the history
  • Loading branch information
rocket-3 committed Sep 12, 2021
1 parent 4db7187 commit c7dbe12
Showing 1 changed file with 1 addition and 2 deletions.
3 changes: 1 addition & 2 deletions src/main/java/org/cactoos/collection/Immutable.java
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,6 @@

import java.util.Collection;
import java.util.Iterator;
import org.cactoos.iterable.IterableOf;

/**
* Decorator that doesn't allow any mutation of the wrapped {@link Collection}.
Expand Down Expand Up @@ -71,7 +70,7 @@ public boolean isEmpty() {

@Override
public Iterator<X> iterator() {
return new IterableOf<X>(this.col.iterator()).iterator();
return new org.cactoos.iterator.Immutable<>(this.col.iterator());
}

@Override
Expand Down

0 comments on commit c7dbe12

Please sign in to comment.