Skip to content

Commit

Permalink
Remove duplicated checks (#51)
Browse files Browse the repository at this point in the history
  • Loading branch information
pivovarit authored Oct 16, 2024
1 parent 180b3b5 commit 2dece9c
Showing 1 changed file with 0 additions and 2 deletions.
2 changes: 0 additions & 2 deletions src/main/java/com/pivovarit/gatherers/MoreGatherers.java
Original file line number Diff line number Diff line change
Expand Up @@ -126,7 +126,6 @@ private MoreGatherers() {
*/
public static <T1, T2, R> Gatherer<T1, ?, R> zip(Stream<T2> other, BiFunction<? super T1, ? super T2, ? extends R> mapper) {
Objects.requireNonNull(other, "other can't be null");
Objects.requireNonNull(mapper, "mapper can't be null");
return zip(other.iterator(), mapper);
}

Expand Down Expand Up @@ -174,7 +173,6 @@ private MoreGatherers() {
* @return a {@link Gatherer} that pairs elements from the two iterators
*/
public static <T1, T2> Gatherer<T1, ?, Map.Entry<T1, T2>> zip(Iterator<T2> iterator) {
Objects.requireNonNull(iterator, "iterator can't be null");
return zip(iterator, Map::entry);
}

Expand Down

0 comments on commit 2dece9c

Please sign in to comment.