Skip to content

Add Flux#justOrEmpty method #4001

@He-Pin

Description

@He-Pin

Motivation:
I have some cases when I'm using Flux.

    if (resp == null) {
        return Flux.empty();
    } else {
        return Flux.just(resp);
    }

There is an Stream#ofNullable, so I think this method would be helpful.

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