File tree Expand file tree Collapse file tree 1 file changed +23
-1
lines changed
src/main/java/rx/internal/operators Expand file tree Collapse file tree 1 file changed +23
-1
lines changed Original file line number Diff line number Diff line change @@ -90,9 +90,10 @@ public OnSubscribeAction(State<T> state) {
9090 public void call (final Subscriber <? super T > s ) {
9191 if (state .casObserverRef (null , s )) {
9292 s .add (Subscriptions .create (new Action0 () {
93+ @ SuppressWarnings ("unchecked" )
9394 @ Override
9495 public void call () {
95- state .observerRef = Observers . empty () ;
96+ state .observerRef = EMPTY_OBSERVER ;
9697 }
9798 }));
9899 boolean win = false ;
@@ -184,4 +185,25 @@ public void onNext(T t) {
184185 emit (state .nl .next (t ));
185186 }
186187 }
188+
189+ @ SuppressWarnings ("rawtypes" )
190+ private final static Observer EMPTY_OBSERVER = new Observer () {
191+
192+ @ Override
193+ public void onCompleted () {
194+
195+ }
196+
197+ @ Override
198+ public void onError (Throwable e ) {
199+
200+ }
201+
202+ @ Override
203+ public void onNext (Object t ) {
204+
205+ }
206+
207+ };
208+
187209}
You can’t perform that action at this time.
0 commit comments