Skip to content

2.x Emit null reference item using Observable.just #4475

@VictorAlbertos

Description

@VictorAlbertos

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.

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions