Hi.
In RxJava 1.x I use Observable.just(null) when I need to create an Observable which emits a null reference. I use this approach in some unit tests as such as when the parameterized Type is Void (Observable<Void>).
But now there is a precondition when calling Observable#just which forces to the supplied item to not be a null reference.
So, how can I create an Observable which emits a null reference?
Thanks.
Hi.
In RxJava 1.x I use
Observable.just(null)when I need to create anObservablewhich emits a null reference. I use this approach in some unit tests as such as when the parameterizedTypeisVoid(Observable<Void>).But now there is a precondition when calling
Observable#justwhich forces to the supplied item to not be a null reference.So, how can I create an
Observablewhich emits a null reference?Thanks.