-
Notifications
You must be signed in to change notification settings - Fork 38.2k
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
Adapt Jackson2ObjectMapperBuilder
documentation to mention ParameterNamesModule
registration
#31959
Comments
I think this is due to the addition of the parameter names module in #27511. Rewriting the test without involving Spring at all shows the same behavior:
The behavior is described in Jackson's documentation for the module:
Updating the class accordingly makes things work:
While this behavior change comes from a Spring Framework update, I believe the behavior itself comes from Jackson and there's nothing we can do (besides removing the default registration of that module?). |
Jackson2ObjectMapperBuilder
misbehaving after updating to 3.2.x
Jackson2ObjectMapperBuilder
misbehaving after updating to 3.2.xJackson2ObjectMapperBuilder
documentation to mention ParameterNamesModule
registration
Thanks @bclozel for your analysis. This change of behavior is indeed a side effect of the Jackson module registration, but on Spring side that was not properly documented. That's now the case in 2 places:
As a consequence, I have turned this issue into a documentation one. |
Jackson2ObjectMapperBuilder
documentation to mention ParameterNamesModule
registrationJackson2ObjectMapperBuilder
documentation to mention ParameterNamesModule
registration
I created a bug report with jackson and they seem to have accepted it as an actual issue on their end. |
Interesting, thanks for the follow up, hopefully this will be fixed on Jackson side. |
After updating to 3.2.x, deserialization seems to be broken in my project. Here is some simple code to reproduce.
Given a class:
And a unit test:
The test passes in both versions (in my actual project it fails because the value cannot be null), but
When running the unit test with Spring 3.2, it will print:
However, when running the unit test with Spring 3.1, it will print:
If I change the constructor parameter name from
somethingElse
tovalue
then 3.2 prints the same as 3.1.The text was updated successfully, but these errors were encountered: