@Override public void onError(Throwable t) { ObjectHelper.requireNonNull(t, "onError called with null. Null values are generally not allowed in 2.x operators and sources."); if (done) { RxJavaPlugins.onError(t); return; } done = true; Object o = NotificationLite.error(t); ReplayBuffer<T> b = buffer; b.addFinal(o); for (ReplayDisposable<T> rs : terminate(o)) { b.replay(rs); } }
@Override public void onComplete() { if (done) { return; } done = true; Object o = NotificationLite.complete(); ReplayBuffer<T> b = buffer; b.addFinal(o); for (ReplayDisposable<T> rs : terminate(o)) { b.replay(rs); } }
@Override public void onError(Throwable t) { ObjectHelper.requireNonNull(t, "onError called with null. Null values are generally not allowed in 2.x operators and sources."); if (done) { RxJavaPlugins.onError(t); return; } done = true; Object o = NotificationLite.error(t); ReplayBuffer<T> b = buffer; b.addFinal(o); for (ReplayDisposable<T> rs : terminate(o)) { b.replay(rs); } }
@Override public void onComplete() { if (done) { return; } done = true; Object o = NotificationLite.complete(); ReplayBuffer<T> b = buffer; b.addFinal(o); for (ReplayDisposable<T> rs : terminate(o)) { b.replay(rs); } }