pekko
pekko copied to clipboard
Add Source#ofNullable to Javadsl
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