Related to: https://github.com/spring-projects/spring-framework/issues/31669 and https://github.com/spring-projects/spring-framework/commit/9ade52dbe25bdcf5751590c98bacfe7053f5dddf
WebFlux has same issue with nullable multipart file handling. MultipartFile and Part should be excluded from nested constructor binding in WebExchangeDataBinder.
Comment From: pivotal-cla
@HeartPattern Please sign the Contributor License Agreement!
Click here to manually synchronize the status of this Pull Request.
See the FAQ for frequently asked questions.
Comment From: pivotal-cla
@HeartPattern Thank you for signing the Contributor License Agreement!
Comment From: HeartPattern
However, it seems like Part and FilePart is not the only problem. Any other nullable types is not bind properly through constructor after ea398d7b7e72d1e1a9f7a002a291f4e0b8660e70. For example, in kotlin
data class MyBean(
val anotherBean: AnotherBean?,
)
Maybe checking param.isOptional() == false
before shouldConstructArgument() is proper fix for this issue.
Comment From: sbrannen
However, it seems like Part and FilePart is not the only problem. Any other nullable types is not bind properly through constructor after ea398d7. For example, in kotlin
@HeartPattern, can you please create a separate issue to discuss that?
Comment From: HeartPattern
Open another PR addressing that problem. https://github.com/spring-projects/spring-framework/pull/31800
Comment From: rstoyanchev
I'm processing this locally as we are close to the 6.1.2 release. No need send further updates.