Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

WebFlux should support Flux<?> and Flux<Object> rendering [SPR-15464] #20024

spring-projects-issues opened this issue Apr 19, 2017 · 0 comments
in: web type: enhancement


Copy link

@spring-projects-issues spring-projects-issues commented Apr 19, 2017

Rossen Stoyanchev opened SPR-15464 and commented

Currently Flux<?> causes NullPointerException's in message writers where there is general assumption about the generic type always being present.

Closely related to that is the rendering of Flux<Object> which logically should be possible to handle through Jackson for example but the Jackson2Encoder rejects it because ObjectMapper#canSerialize returns false for java.lang.Object.

For Flux<?> or Flux<Object> we can reasonably assume that the actual values will be some sub-class of Object so we need to explicitly allow it in the Jackson encoder. This is also consistent with the treatment of {List.class which Jackson's ObjectMapper approves of.

Affects: 5.0 M5

Issue Links:

  • #20017 Spring MVC @ResponseBody handling of Flux<?> inconsistent when type of result is unknown

Referenced from: commits cc102c2

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
in: web type: enhancement
None yet

No branches or pull requests

2 participants