3.x: remove no-arg dematerialize(); remove replay(Scheduler) variants by akarnokd · Pull Request #6539 · ReactiveX/RxJava (original) (raw)

This PR removes some obsolete API.

The Flowable.dematerialize() and Observable.dematerialize() were inherently type-unsafe and have been removed. In Rx.NET, the extension methods allowed dematerialize() to be applied to Observable<Notification<T>> only, but there is no way for doing it in Java as it has no extension methods and one can't restrict a method to appear only with a certain type argument scheme.

Thereplay(Scheduler) and other overloads were carried over from the original Rx.NET API set but I can't rememeber if they had any use in the field. Most use cases capture the connectable anyway so there is no much benefit from inlining an observeOn into a connectable:

ConnectableFlowable connectable = source.replay();

Flowable flowable = connectable.observeOn(Schedulers.io());

// hand flowable to consumers flowable.subscribe();

connectable.connect();