Skip to content

Commit

Permalink
use extends
Browse files Browse the repository at this point in the history
  • Loading branch information
Scottmitch committed Mar 7, 2023
1 parent d973281 commit 152aff5
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 5 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -1551,7 +1551,7 @@ public final <R> Publisher<R> flatMapConcatIterable(Function<? super T, ? extend
* @see #mergeWithDelayError(Publisher)
* @see #merge(Publisher[])
*/
public final Publisher<T> mergeWith(Publisher<T> other) {
public final Publisher<T> mergeWith(Publisher<? extends T> other) {
return from(this, other).flatMapMerge(identity(), 2);
}

Expand Down Expand Up @@ -1590,7 +1590,7 @@ public final Publisher<T> mergeWith(Publisher<T> other) {
* @see #mergeWith(Publisher)
* @see #mergeDelayError(Publisher[])
*/
public final Publisher<T> mergeWithDelayError(Publisher<T> other) {
public final Publisher<T> mergeWithDelayError(Publisher<? extends T> other) {
return from(this, other).flatMapMergeDelayError(identity(), 2, 2);
}

Expand Down Expand Up @@ -4117,7 +4117,7 @@ public static <T> Publisher<T> defer(Supplier<? extends Publisher<? extends T>>
* @see #mergeDelayError(Publisher[])
*/
@SafeVarargs
public static <T> Publisher<T> merge(Publisher<T>... publishers) {
public static <T> Publisher<T> merge(Publisher<? extends T>... publishers) {
return from(publishers).flatMapMerge(identity(), publishers.length);
}

Expand Down Expand Up @@ -4158,7 +4158,7 @@ public static <T> Publisher<T> merge(Publisher<T>... publishers) {
* @see #merge(Publisher[])
*/
@SafeVarargs
public static <T> Publisher<T> mergeDelayError(Publisher<T>... publishers) {
public static <T> Publisher<T> mergeDelayError(Publisher<? extends T>... publishers) {
return from(publishers).flatMapMergeDelayError(identity(), publishers.length, publishers.length);
}

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -267,7 +267,7 @@ private static void throwOnNextAfterTrailersException(HttpHeaders trailers, @Nul
* @param s The {@link Single} to merge.
* @return The result of the merge operation.
*/
private static Publisher<?> merge(Publisher<?> p, Single<HttpHeaders> s) {
private static Publisher<Object> merge(Publisher<?> p, Single<HttpHeaders> s) {
// We filter null from the Single in case the publisher completes and we didn't find trailers.
return from(p, s.toPublisher().filter(Objects::nonNull)).flatMapMerge(identity(), 2);
}
Expand Down

0 comments on commit 152aff5

Please sign in to comment.