Skip to content

Commit f3d2945

Browse files
Clarify Javadoc on Observers.empty()
It throws an Exception ... and now EmptyObserver is gone.
1 parent 00e4a63 commit f3d2945

File tree

1 file changed

+3
-5
lines changed

1 file changed

+3
-5
lines changed

src/main/java/rx/observers/Observers.java

Lines changed: 3 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -46,9 +46,7 @@ public final void onNext(Object args) {
4646

4747
/**
4848
* Returns an inert {@link Observer} that does nothing in response to the emissions or notifications from
49-
* any {@code Observable} it subscribes to. This is different, however, from an {@link EmptyObserver}, in
50-
* that it will throw an exception if its {@link Observer#onError onError} method is called (whereas
51-
* {@code EmptyObserver} will swallow the error in such a case).
49+
* any {@code Observable} it subscribes to but will throw an exception if its {@link Observer#onError onError} method is called.
5250
*
5351
* @return an inert {@code Observer}
5452
*/
@@ -59,8 +57,8 @@ public static <T> Observer<T> empty() {
5957

6058
/**
6159
* Creates an {@link Observer} that receives the emissions of any {@code Observable} it subscribes to via
62-
* {@link Observer#onNext onNext} but ignores {@link Observer#onError onError} and
63-
* {@link Observer#onCompleted onCompleted} notifications.
60+
* {@link Observer#onNext onNext} but ignores {@link Observer#onCompleted onCompleted} notifications.
61+
* It will throws an {@link OnErrorNotImplementedException} if {@link Observer#onError onError} is invoked.
6462
*
6563
* @param onNext
6664
* a function that handles each item emitted by an {@code Observable}

0 commit comments

Comments
 (0)