Skip to content

Commit

Permalink
(#1224) Simplifying Immutable.subList method
Browse files Browse the repository at this point in the history
  • Loading branch information
iakunin committed Nov 11, 2019
1 parent 66d59b7 commit b77e9cc
Showing 1 changed file with 1 addition and 2 deletions.
3 changes: 1 addition & 2 deletions src/main/java/org/cactoos/list/Immutable.java
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,6 @@
import java.util.List;
import java.util.ListIterator;
import org.cactoos.Scalar;
import org.cactoos.collection.Sliced;
import org.cactoos.iterable.IterableOf;
import org.cactoos.scalar.And;
import org.cactoos.scalar.Folded;
Expand Down Expand Up @@ -250,7 +249,7 @@ public ListIterator<T> listIterator(final int index) {
@Override
public List<T> subList(final int start, final int end) {
return new Immutable<>(
new Sliced<>(start, end - start, this.list)
this.list.subList(start, end)
);
}

Expand Down

0 comments on commit b77e9cc

Please sign in to comment.