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

Remove recoverWith operators that were deprecated in #1435 #1635

Merged
merged 1 commit into from
Jun 23, 2021
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
Original file line number Diff line number Diff line change
Expand Up @@ -572,32 +572,6 @@ public final Publisher<T> onErrorResume(Predicate<? super Throwable> predicate,
return new OnErrorResumePublisher<>(this, predicate, nextFactory);
}

/**
* Recover from any error emitted by this {@link Publisher} by using another {@link Publisher} provided by the
* passed {@code nextFactory}.
* <p>
* This method provides similar capabilities to a try/catch block in sequential programming:
* <pre>{@code
* List<T> results;
* try {
* results = resultOfThisPublisher();
* } catch (Throwable cause) {
* // Note that nextFactory returning a error Publisher is like re-throwing (nextFactory shouldn't throw).
* results = nextFactory.apply(cause);
* }
* return results;
* }</pre>
* @deprecated Use {@link #onErrorResume(Function)}.
* @param nextFactory Returns the next {@link Publisher}, when this {@link Publisher} emits an error.
* @return A {@link Publisher} that recovers from an error from this {@code Publisher} by using another
* {@link Publisher} provided by the passed {@code nextFactory}.
* @see <a href="http://reactivex.io/documentation/operators/catch.html">ReactiveX catch operator.</a>
*/
@Deprecated
public final Publisher<T> recoverWith(Function<Throwable, ? extends Publisher<? extends T>> nextFactory) {
return onErrorResume(nextFactory);
}

/**
* Map each element of this {@link Publisher} into a {@link Publisher}&lt;{@link R}&gt; and flatten all signals
* emitted from each mapped {@link Publisher}&lt;{@link R}&gt; into the returned
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -353,31 +353,6 @@ public final Single<T> onErrorResume(Predicate<? super Throwable> predicate,
return new OnErrorResumeSingle<>(this, predicate, nextFactory);
}

/**
* Recover from any error emitted by this {@link Single} by using another {@link Single} provided by the
* passed {@code nextFactory}.
* <p>
* This method provides similar capabilities to a try/catch block in sequential programming:
* <pre>{@code
* T result;
* try {
* result = resultOfThisSingle();
* } catch (Throwable cause) {
* // Note that nextFactory returning a error Single is like re-throwing (nextFactory shouldn't throw).
* result = nextFactory.apply(cause);
* }
* return result;
* }</pre>
* @deprecated Use {@link #onErrorResume(Function)}.
* @param nextFactory Returns the next {@link Single}, when this {@link Single} emits an error.
* @return A {@link Single} that recovers from an error from this {@link Single} by using another
* {@link Single} provided by the passed {@code nextFactory}.
*/
@Deprecated
public final Single<T> recoverWith(Function<? super Throwable, ? extends Single<? extends T>> nextFactory) {
return onErrorResume(nextFactory);
}

/**
* Returns a {@link Single} that mirrors emissions from the {@link Single} returned by {@code next}.
* Any error emitted by this {@link Single} is forwarded to the returned {@link Single}.
Expand Down