Add support for single valued Supplier as well

This commit is contained in:
Dave Syer
2017-05-24 10:29:47 +01:00
parent 20a6796793
commit 5589804d2c
4 changed files with 49 additions and 24 deletions

View File

@@ -58,9 +58,6 @@ public class FluxSupplier<T> implements Supplier<Flux<T>> {
if (result instanceof Stream) {
return Flux.fromStream((Stream) result);
}
if (result instanceof Iterable) {
return Flux.fromIterable((Iterable) result);
}
return Flux.just((T) result);
}
}