Closed
Description
Dave Syer opened SPR-15456 and commented
I would expect this:
@GetMapping("/empty")
public Flux<Object> empty() {
return Flux.fromIterable(Collections.emptyList());
}
to produce an identical result to this:
@GetMapping("/empty")
public Flux<String> empty() {
return Flux.fromIterable(Collections.emptyList());
}
But it doesn't (the former is "null" and the latter is "[]"). I guess maybe the "null" is a bug?
If the Flux
is not empty, then both signatures should also probably produce the same result, but doesn't (the strings get concatented and the objects get converted)? Or maybe I'm missing something.
Affects: 5.0 RC1
Issue Links:
- WebFlux should support Flux<?> and Flux<Object> rendering [SPR-15464] #20024 WebFlux should support Flux<?> and Flux rendering