Skip to content

Refine generic type management in AbstractMessageWriterResultHandler #30214

@Kantis

Description

@Kantis

From @sdeleuze on slack:

Looks like there is a bug in AbstractMessageWriterResultHandler#writeBody for those use cases with a confusion between leveraging bodyParameter versus actualParam. Could you please create an issue in https://github.com/spring-projects/spring-framework/issues pinging me (@sdeleuze) and linking your repro?

Reproduction repository at https://github.com/Kantis/kxs-repro

The bug

When using KotlinX serialization with Webflux, we expect that any combination of presence/absence of suspend functions and ResponseEntity to play nicely together.

As the repro demonstrates, that is not the case. KotlinX serialization is only used in one of the 4 possible setups:

Suspend with ResponseEntity ❌
Suspend without ResponseEntity ✅
No suspend with ResponseEntity ❌
No suspend without ResponseEntity ❌

Metadata

Metadata

Assignees

Labels

status: backportedAn issue that has been backported to maintenance branchestheme: kotlinAn issue related to Kotlin supporttype: bugA general bug

Type

No type

Projects

No projects

Milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions