Polishing

Fix code format
Resolves #489
This commit is contained in:
Oleg Zhurakousky
2020-04-29 15:19:12 +02:00
parent 719f3745f0
commit 5f3f0cf965
2 changed files with 5 additions and 4 deletions

View File

@@ -215,9 +215,11 @@ public class RequestProcessor {
if (Collection.class
.isAssignableFrom(this.inspector.getInputType(wrapper.handler()))) {
flux = Flux.just(body);
} else if (body instanceof Flux) {
}
else if (body instanceof Flux) {
flux = Flux.from((Flux) body);
} else {
}
else {
Iterable<?> iterable = body instanceof Collection ? (Collection<?>) body
: (body instanceof Set ? Collections.singleton(body)
: Collections.singletonList(body));

View File

@@ -100,8 +100,7 @@ public class FunctionController {
@PostMapping(path = "/**", produces = MediaType.TEXT_EVENT_STREAM_VALUE)
@ResponseBody
public Mono<ResponseEntity<?>> postStream(ServerWebExchange request,
@RequestBody(required = false) Flux<String> body) {
public Mono<ResponseEntity<?>> postStream(ServerWebExchange request, @RequestBody(required = false) Flux<String> body) {
final FunctionWrapper wrapper = wrapper(request);
return this.processor.response(wrapper, body, true);
}