Skip to content

Commit

Permalink
backport: align generic of Mono.flatMapMany/onErrorMap to Flux
Browse files Browse the repository at this point in the history
partial backport of 08b9434 only modifying new public APIs
  • Loading branch information
smaldini authored and simonbasle committed Apr 19, 2017
1 parent 4cb4358 commit a13f58c
Show file tree
Hide file tree
Showing 4 changed files with 10 additions and 10 deletions.
4 changes: 2 additions & 2 deletions src/main/java/reactor/core/publisher/FluxMapSignal.java
Original file line number Diff line number Diff line change
Expand Up @@ -37,7 +37,7 @@
final class FluxMapSignal<T, R> extends FluxSource<T, R> {

final Function<? super T, ? extends R> mapperNext;
final Function<Throwable, ? extends R> mapperError;
final Function<? super Throwable, ? extends R> mapperError;
final Supplier<? extends R> mapperComplete;

/**
Expand All @@ -52,7 +52,7 @@ final class FluxMapSignal<T, R> extends FluxSource<T, R> {
*/
FluxMapSignal(Publisher<? extends T> source,
Function<? super T, ? extends R> mapperNext,
Function<Throwable, ? extends R> mapperError,
Function<? super Throwable, ? extends R> mapperError,
Supplier<? extends R> mapperComplete) {
super(source);
if(mapperNext == null && mapperError == null && mapperComplete == null){
Expand Down
8 changes: 4 additions & 4 deletions src/main/java/reactor/core/publisher/FluxRetryPredicate.java
Original file line number Diff line number Diff line change
Expand Up @@ -31,9 +31,9 @@
*/
final class FluxRetryPredicate<T> extends FluxSource<T, T> {

final Predicate<Throwable> predicate;
final Predicate<? super Throwable> predicate;

FluxRetryPredicate(Flux<? extends T> source, Predicate<Throwable> predicate) {
FluxRetryPredicate(Flux<? extends T> source, Predicate<? super Throwable> predicate) {
super(source);
this.predicate = Objects.requireNonNull(predicate, "predicate");
}
Expand All @@ -56,7 +56,7 @@ static final class RetryPredicateSubscriber<T>

final Publisher<? extends T> source;

final Predicate<Throwable> predicate;
final Predicate<? super Throwable> predicate;

volatile int wip;
@SuppressWarnings("rawtypes")
Expand All @@ -66,7 +66,7 @@ static final class RetryPredicateSubscriber<T>
long produced;

RetryPredicateSubscriber(Publisher<? extends T> source,
Subscriber<? super T> actual, Predicate<Throwable> predicate) {
Subscriber<? super T> actual, Predicate<? super Throwable> predicate) {
super(actual);
this.source = source;
this.predicate = predicate;
Expand Down
4 changes: 2 additions & 2 deletions src/main/java/reactor/core/publisher/Mono.java
Original file line number Diff line number Diff line change
Expand Up @@ -2049,7 +2049,7 @@ public final <R> Flux<R> flatMapMany(Function<? super T, ? extends Publisher<? e
* @see Flux#flatMap(Function, Function, Supplier)
*/
public final <R> Flux<R> flatMapMany(Function<? super T, ? extends Publisher<? extends R>> mapperOnNext,
Function<Throwable, ? extends Publisher<? extends R>> mapperOnError,
Function<? super Throwable, ? extends Publisher<? extends R>> mapperOnError,
Supplier<? extends Publisher<? extends R>> mapperOnComplete) {

return Flux.onAssembly(new FluxFlatMap<>(
Expand Down Expand Up @@ -2366,7 +2366,7 @@ public final Flux<T> mergeWith(Publisher<? extends T> other) {
*
* @return a transformed {@link Mono}
*/
public final Mono<T> onErrorMap(Function<Throwable, ? extends Throwable> mapper) {
public final Mono<T> onErrorMap(Function<? super Throwable, ? extends Throwable> mapper) {
return onErrorResume(e -> Mono.error(mapper.apply(e)));
}

Expand Down
4 changes: 2 additions & 2 deletions src/main/java/reactor/core/publisher/MonoRetryPredicate.java
Original file line number Diff line number Diff line change
Expand Up @@ -30,10 +30,10 @@
*/
final class MonoRetryPredicate<T> extends MonoSource<T, T> {

final Predicate<Throwable> predicate;
final Predicate<? super Throwable> predicate;

MonoRetryPredicate(Mono<? extends T> source,
Predicate<Throwable> predicate) {
Predicate<? super Throwable> predicate) {
super(source);
this.predicate = Objects.requireNonNull(predicate, "predicate");
}
Expand Down

0 comments on commit a13f58c

Please sign in to comment.