Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

2.x: remove variance from the input source of retryWhen #4720

Merged
merged 1 commit into from
Oct 17, 2016
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion src/main/java/io/reactivex/Completable.java
Original file line number Diff line number Diff line change
Expand Up @@ -1415,7 +1415,7 @@ public final Completable retry(Predicate<? super Throwable> predicate) {
* @throws NullPointerException if handler is null
*/
@SchedulerSupport(SchedulerSupport.NONE)
public final Completable retryWhen(Function<? super Flowable<? extends Throwable>, ? extends Publisher<Object>> handler) {
public final Completable retryWhen(Function<? super Flowable<Throwable>, ? extends Publisher<Object>> handler) {
return fromPublisher(toFlowable().retryWhen(handler));
}

Expand Down
2 changes: 1 addition & 1 deletion src/main/java/io/reactivex/Flowable.java
Original file line number Diff line number Diff line change
Expand Up @@ -11105,7 +11105,7 @@ public final Flowable<T> retryUntil(final BooleanSupplier stop) {
@BackpressureSupport(BackpressureKind.FULL)
@SchedulerSupport(SchedulerSupport.NONE)
public final Flowable<T> retryWhen(
final Function<? super Flowable<? extends Throwable>, ? extends Publisher<?>> handler) {
final Function<? super Flowable<Throwable>, ? extends Publisher<?>> handler) {
ObjectHelper.requireNonNull(handler, "handler is null");

return RxJavaPlugins.onAssembly(new FlowableRetryWhen<T>(this, handler));
Expand Down
2 changes: 1 addition & 1 deletion src/main/java/io/reactivex/Maybe.java
Original file line number Diff line number Diff line change
Expand Up @@ -3390,7 +3390,7 @@ public final Maybe<T> retryUntil(final BooleanSupplier stop) {
*/
@SchedulerSupport(SchedulerSupport.NONE)
public final Maybe<T> retryWhen(
final Function<? super Flowable<? extends Throwable>, ? extends Publisher<?>> handler) {
final Function<? super Flowable<Throwable>, ? extends Publisher<?>> handler) {
return toFlowable().retryWhen(handler).singleElement();
}

Expand Down
2 changes: 1 addition & 1 deletion src/main/java/io/reactivex/Observable.java
Original file line number Diff line number Diff line change
Expand Up @@ -9196,7 +9196,7 @@ public final Observable<T> retryUntil(final BooleanSupplier stop) {
*/
@SchedulerSupport(SchedulerSupport.NONE)
public final Observable<T> retryWhen(
final Function<? super Observable<? extends Throwable>, ? extends ObservableSource<?>> handler) {
final Function<? super Observable<Throwable>, ? extends ObservableSource<?>> handler) {
ObjectHelper.requireNonNull(handler, "handler is null");
return RxJavaPlugins.onAssembly(new ObservableRedo<T>(this, ObservableInternalHelper.retryWhenHandler(handler)));
}
Expand Down
2 changes: 1 addition & 1 deletion src/main/java/io/reactivex/Single.java
Original file line number Diff line number Diff line change
Expand Up @@ -2396,7 +2396,7 @@ public final Single<T> retry(Predicate<? super Throwable> predicate) {
* @return the new Single instance
*/
@SchedulerSupport(SchedulerSupport.NONE)
public final Single<T> retryWhen(Function<? super Flowable<? extends Throwable>, ? extends Publisher<Object>> handler) {
public final Single<T> retryWhen(Function<? super Flowable<Throwable>, ? extends Publisher<Object>> handler) {
return toSingle(toFlowable().retryWhen(handler));
}

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -277,10 +277,10 @@ public boolean test(Notification<Object> t) throws Exception {

static final class RetryWhenInner
implements Function<Observable<Notification<Object>>, ObservableSource<?>> {
private final Function<? super Observable<? extends Throwable>, ? extends ObservableSource<?>> handler;
private final Function<? super Observable<Throwable>, ? extends ObservableSource<?>> handler;

RetryWhenInner(
Function<? super Observable<? extends Throwable>, ? extends ObservableSource<?>> handler) {
Function<? super Observable<Throwable>, ? extends ObservableSource<?>> handler) {
this.handler = handler;
}

Expand All @@ -293,7 +293,7 @@ public ObservableSource<?> apply(Observable<Notification<Object>> no) throws Exc
}
}

public static <T> Function<Observable<Notification<Object>>, ObservableSource<?>> retryWhenHandler(final Function<? super Observable<? extends Throwable>, ? extends ObservableSource<?>> handler) {
public static <T> Function<Observable<Notification<Object>>, ObservableSource<?>> retryWhenHandler(final Function<? super Observable<Throwable>, ? extends ObservableSource<?>> handler) {
return new RetryWhenInner(handler);
}

Expand Down