Skip to content

Commit

Permalink
Fix Observable javadoc (#5944) (#5948)
Browse files Browse the repository at this point in the history
* Replace `doOnCancel` by `doOnDispose`
  • Loading branch information
RomanWuattier authored and akarnokd committed Apr 3, 2018
1 parent 2770e4d commit 54c281a
Showing 1 changed file with 9 additions and 9 deletions.
18 changes: 9 additions & 9 deletions src/main/java/io/reactivex/Observable.java
Original file line number Diff line number Diff line change
Expand Up @@ -1736,8 +1736,8 @@ public static <T> Observable<T> fromCallable(Callable<? extends T> supplier) {
* <p>
* <em>Important note:</em> This ObservableSource is blocking; you cannot dispose it.
* <p>
* Unlike 1.x, cancelling the Observable won't cancel the future. If necessary, one can use composition to achieve the
* cancellation effect: {@code futureObservableSource.doOnCancel(() -> future.cancel(true));}.
* Unlike 1.x, disposing the Observable won't cancel the future. If necessary, one can use composition to achieve the
* cancellation effect: {@code futureObservableSource.doOnDispose(() -> future.cancel(true));}.
* <dl>
* <dt><b>Scheduler:</b></dt>
* <dd>{@code fromFuture} does not operate by default on a particular {@link Scheduler}.</dd>
Expand Down Expand Up @@ -1767,8 +1767,8 @@ public static <T> Observable<T> fromFuture(Future<? extends T> future) {
* return value of the {@link Future#get} method of that object, by passing the object into the {@code from}
* method.
* <p>
* Unlike 1.x, cancelling the Observable won't cancel the future. If necessary, one can use composition to achieve the
* cancellation effect: {@code futureObservableSource.doOnCancel(() -> future.cancel(true));}.
* Unlike 1.x, disposing the Observable won't cancel the future. If necessary, one can use composition to achieve the
* cancellation effect: {@code futureObservableSource.doOnDispose(() -> future.cancel(true));}.
* <p>
* <em>Important note:</em> This ObservableSource is blocking; you cannot dispose it.
* <dl>
Expand Down Expand Up @@ -1805,8 +1805,8 @@ public static <T> Observable<T> fromFuture(Future<? extends T> future, long time
* return value of the {@link Future#get} method of that object, by passing the object into the {@code from}
* method.
* <p>
* Unlike 1.x, cancelling the Observable won't cancel the future. If necessary, one can use composition to achieve the
* cancellation effect: {@code futureObservableSource.doOnCancel(() -> future.cancel(true));}.
* Unlike 1.x, disposing the Observable won't cancel the future. If necessary, one can use composition to achieve the
* cancellation effect: {@code futureObservableSource.doOnDispose(() -> future.cancel(true));}.
* <p>
* <em>Important note:</em> This ObservableSource is blocking; you cannot dispose it.
* <dl>
Expand Down Expand Up @@ -1846,8 +1846,8 @@ public static <T> Observable<T> fromFuture(Future<? extends T> future, long time
* return value of the {@link Future#get} method of that object, by passing the object into the {@code from}
* method.
* <p>
* Unlike 1.x, cancelling the Observable won't cancel the future. If necessary, one can use composition to achieve the
* cancellation effect: {@code futureObservableSource.doOnCancel(() -> future.cancel(true));}.
* Unlike 1.x, disposing the Observable won't cancel the future. If necessary, one can use composition to achieve the
* cancellation effect: {@code futureObservableSource.doOnDispose(() -> future.cancel(true));}.
* <dl>
* <dt><b>Scheduler:</b></dt>
* <dd>You specify which {@link Scheduler} this operator will use.</dd>
Expand Down Expand Up @@ -7497,7 +7497,7 @@ public final Observable<T> delaySubscription(long delay, TimeUnit unit, Schedule
* returned Observable cancels the flow and terminates with that type of terminal event:
* <pre><code>
* Observable.just(createOnNext(1), createOnComplete(), createOnNext(2))
* .doOnCancel(() -&gt; System.out.println("Cancelled!"));
* .doOnDispose(() -&gt; System.out.println("Cancelled!"));
* .test()
* .assertResult(1);
* </code></pre>
Expand Down

0 comments on commit 54c281a

Please sign in to comment.