Skip to content

2.x: Consumer contract is violated when using doOnEvent #5442

@ansman

Description

@ansman

The following code showcases the problem:

Completable.complete()
  .doOnEvent(t -> {})

t in this case is annotated with @NonNull but it will be null since the completable completes.

This is a real pain in Kotlin since the following code crashes in runtime:

Completable.complete()
  .doOnEvent {}

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions