Skip to content

Commit

Permalink
(yegor256#1220) Remove redundant object
Browse files Browse the repository at this point in the history
  • Loading branch information
andreoss committed Sep 4, 2020
1 parent 7c41f6a commit 7734ec0
Showing 1 changed file with 1 addition and 6 deletions.
7 changes: 1 addition & 6 deletions src/main/java/org/cactoos/iterator/Partitioned.java
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,6 @@
package org.cactoos.iterator;

import java.util.Iterator;
import java.util.LinkedList;
import java.util.List;
import java.util.NoSuchElementException;
import org.cactoos.list.Immutable;
Expand Down Expand Up @@ -73,11 +72,7 @@ public List<T> next() {
throw new IllegalArgumentException("Partition size < 1");
}
return new Immutable<>(
new LinkedList<>(
new ListOf<>(
new Sliced<>(0, this.size, this.decorated)
)
)
new ListOf<>(new Sliced<>(0, this.size, this.decorated))
);
}

Expand Down

0 comments on commit 7734ec0

Please sign in to comment.