Skip to content

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

Closed
@spring-projects-issues

Description

@spring-projects-issues

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:

Referenced from: commits cc102c2

Metadata

Metadata

Assignees

Labels

in: webIssues in web modules (web, webmvc, webflux, websocket)type: enhancementA general enhancement

Type

No type

Projects

No projects

Milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions