-
-
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
Annotation-provided Deserializers are not contextualized inside CreatorProperties #462
Comments
Yes, it sounds like a bug: all serializers/deserializers should be contextualized (when used for a property, i.e. when there is a context). Thanks; I will fix this. |
Added a call to contextualization; will be in 2.3.4 / 2.4.0. If you have a chance to verify from either, that'd be great, but I assume that problem is resolved. |
I have verified the fix in 2.3.4-SNAPSHOT. Thanks a bunch for the quick patch! What is the release schedule for 2.3.4? |
I am hoping to get 2.4.0 first; there are some patches for 2.3.4, but it will probably take at least couple of weeks. Thank you for verifying this! |
On this line within
BasicDeserializerFactory#constructCreatorProperty
, we create a Deserializer based on an annotation:(source)
findDeserializerFromAnnotation
will resolve, but not contextualize, the resulting Deserializer. Subsequently, inPropertyBasedCreator#construct
, we will construct a contextualized Deserializer if and only if a Deserializer is not already present:(source)
However, this returns false because we do have a value deserializer.
Finally, we attempt to deserialize using this PropertyBasedCreator, within
BeanDeserializer#_deserializeUsingPropertyBased
:(source)
This fails, however, as our Deserializer was never contextualized.
If this is indeed a bug, I think a simple fix may be to simply contextualize the Deserializer within
PropertyBasedCreator#construct
if it's present. Let me know if that is a good solution; I can make a PR if desired.The text was updated successfully, but these errors were encountered: