-
-
Notifications
You must be signed in to change notification settings - Fork 1.4k
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
StdValueInstantiator.withArgsCreator
is now set for creators with no arguments.
#4777
Comments
I don't really like this test, as it tries to verify internal state, instead of showing externally observable problem: something users would hit. But perhaps this is because issue is otherwise hard to reproduce outside Kotlin module? But even without that, test logic is pretty obscure: I don't think it really tests something documented to behave certain way. But I'll play with the test, see what I can find. |
That is correct. |
Ok that makes sense then. |
Uhhh. Realized one mistake I made with naming: "Default Creator" already had a meaning in Jackson, pre-2.18 -- 0-argument Constructor/Factory method. So calling Record type's Canonical Contructor Default Creator adds unfortunate overloading. It really should have been called maybe Primary Creator. Not sure how I missed this conflict when thinking about naming because now:
Since I cannot really change API, some of this remains. But I may try to change code comments to better reflect new addition. |
As to the change itself: I think only Constructors are detected as "default creators" on 2.18: explicitly annotated factory methods will all be considered as such, no special handling for 0-arg one. Databind works fine with that. To change this, two approaches, both in
|
Search before asking
Describe the bug
This changes the behavior of
StdValueInstantiator
when deserializing, resulting in the following problem inkotlin-module
.FasterXML/jackson-module-kotlin#841
From @JooHyukKim 's research, this has changed the result of the
_vanillaProcessing
determination.FasterXML/jackson-module-kotlin#841 (comment)
I have confirmed that this value is populated by
StdValueInstantiator.configurationFromObjectSettings
, but have not been able to do a deeper analysis.Version Information
2.18
Reproduction
The following code succeeds in 2.17 but fails in 2.18.
Expected behavior
It must be the same as in 2.17.
Additional context
No response
The text was updated successfully, but these errors were encountered: