Replies: 1 comment 8 replies
-
@herkrath At high level, there is nothing specific wrt mutable/immutable beans wrt If there are problems in actually using it, those may be flaws or limitations, but there is no intent to prevent its use. There are some known problems specifically related to Creator properties of "implicit" Creators (ones that are not annotated with There are plans to try to tackle this problem wrt (some) Creator properties: as a pre-cursor, I am working on #3719 . But full introspection rewrite has been postponed multiple times as it is likely tricky to do. Even if conceptually simple: introspection should start with location Creators, then proceed with other properties. |
Beta Was this translation helpful? Give feedback.
-
Hi @cowtowncoder, all,
Is BeanDeserializerModifier expected to work for immutable Beans? It is not documented otherwise and the BeanDeserializerModifier methods are triggered, so I would assume yes. It doesn't work though. I tested with a mutable (working) and immutable (not working) version of the same Bean with Jackson 2.14 and 2.16.1.
This is not a recently introduced bug, there are multiple older discussions about this topic, e.g. https://stackoverflow.com/questions/54086246/jacksons-beandeserializermodifier-does-not-work-with-final-fields
The suggested solution in there is not always applicable but the reference to BeanDeserializerBase::resolve seems correct. It appears to me that creator properties aren't correctly set based on BeanDeserializerModifier modifications.
I am mainly looking for a confirmation.
Thanks in advance,
Mark
Beta Was this translation helpful? Give feedback.
All reactions