pekko icon indicating copy to clipboard operation
pekko copied to clipboard

Add Source#ofNullable to Javadsl

Open He-Pin opened this issue 9 months ago • 0 comments

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.

or name it singleOrEmpty

He-Pin avatar Feb 27 '25 08:02 He-Pin