Skip to content

Commit 00e4a63

Browse files
Delete EmptyObserver
It creates no value and confuses with Observers.empty() which throws an OnErrorNotImplementedException if onError is invoked. Fixes #1741
1 parent ea13546 commit 00e4a63

File tree

2 files changed

+2
-47
lines changed

2 files changed

+2
-47
lines changed

src/main/java/rx/internal/operators/BufferUntilSubscriber.java

Lines changed: 2 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -21,8 +21,7 @@
2121
import rx.Observer;
2222
import rx.Subscriber;
2323
import rx.functions.Action0;
24-
import rx.observers.EmptyObserver;
25-
import rx.observers.Subscribers;
24+
import rx.observers.Observers;
2625
import rx.subjects.Subject;
2726
import rx.subscriptions.Subscriptions;
2827

@@ -51,9 +50,6 @@
5150
*/
5251
public class BufferUntilSubscriber<T> extends Subject<T, T> {
5352

54-
@SuppressWarnings("rawtypes")
55-
private final static Observer EMPTY_OBSERVER = new EmptyObserver();
56-
5753
/**
5854
* @warn create() undescribed
5955
* @return
@@ -96,7 +92,7 @@ public void call(final Subscriber<? super T> s) {
9692
s.add(Subscriptions.create(new Action0() {
9793
@Override
9894
public void call() {
99-
state.observerRef = EMPTY_OBSERVER;
95+
state.observerRef = Observers.empty();
10096
}
10197
}));
10298
boolean win = false;

src/main/java/rx/observers/EmptyObserver.java

Lines changed: 0 additions & 41 deletions
This file was deleted.

0 commit comments

Comments
 (0)