Skip to content

1.x and 2.x Javadoc for Completable's retryWhen differs from Observable, Single and Docs #4809

@aballano

Description

@aballano

While trying to use the retryWhen operator of the Completable I had problems understanding the behaviour detailed in it´s javadoc:

Returns a Completable which given a Publisher and when this Completable emits an error, delivers that error through an Observable and the Publisher should return a value indicating a retry in response or a terminal event indicating a termination.

Which highly differs from the documentation of Observable, Single and the docs, where the need of calling the provided observable's onNext/onError/onCompleted is more detailed:

Returns an Observable that emits the same values as the source observable with the exception of an {@code onError}. An {@code onError} notification from the source will result in the emission of a {@link Throwable} item to the Observable provided as an argument to the {@code notificationHandler} function. If that Observable calls {@code onComplete} or {@code onError} then {@code retry} will call {@code onCompleted} or {@code onError} on the child subscription. Otherwise, this Observable will resubscribe to the source Observable.

I could prepare a PR for both 1.x and 2.x versions if needed.

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions