Conversion not applied to @RequestParam
default value if used for "null after conversion" case
#31336
Milestone
@RequestParam
default value if used for "null after conversion" case
#31336
Affects: 6.0.12 and older versions
When specifying a defaultValue for a request parameter, my understanding is that the request parameter should never be
null
. However, providing e.g. a whitespace character (%20
) for aBoolean
parameter results in a null value.I've created a small reproducible example here.
When using the latest Spring version 6.1.0-M5, I don't get a
null
value anymore. Instead, Spring returns an HTTP status code 500. While this behaviour is different, I think it's still not what should happen. I would expect a status code 400 - or maybe a 200 with the Boolean parameter set to its default value.I also found this similar issue from 2013: #14813
Looking forward to a fix :)
The text was updated successfully, but these errors were encountered: