Skip to content
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

BeanDeserializerModifier::updateBuilder doesn't work for immutable beans #4356

Open
1 task done
herkrath opened this issue Feb 1, 2024 · 1 comment
Open
1 task done
Labels
2.18 has-failing-test Indicates that there exists a test case (under `failing/`) to reproduce the issue

Comments

@herkrath
Copy link
Contributor

herkrath commented Feb 1, 2024

Search before asking

  • I searched in the issues and found nothing similar.

Describe the bug

Custom JsonDeserializers set via BeanDeserializerModifier::updateBuilder work for mutable beans only. They are ignored for immutable ones. This issue originates from #4351.

Version Information

At least 2.14 - 2.16.1, likely since much longer

Reproduction

Explanatory unit tests, as well as a potential fix, are part of my PR #4357.

Expected behavior

Custom JsonDeserializers set via BeanDeserializerModifier::updateBuilder shall work for mutable and immutable beans.

Additional context

Note: My suggested fix does work for this very scenario and doesn't break any of the existing unit tests. However, it may not fix other, related issues with BeanDeserializerModifier. Also, as I don't know every single Jackson feature and this part of the code is very delicate and complex, it may interfere with other features. Please review detailed.

@herkrath herkrath added the to-evaluate Issue that has been received but not yet evaluated label Feb 1, 2024
@cowtowncoder cowtowncoder added has-failing-test Indicates that there exists a test case (under `failing/`) to reproduce the issue 2.18 and removed to-evaluate Issue that has been received but not yet evaluated labels Mar 12, 2024
cowtowncoder added a commit that referenced this issue Mar 12, 2024
@cowtowncoder
Copy link
Member

Added failing test from #4357 -- timing-wise cannot fix for 2.17 due to release going out soon but depending on things might be possible for 2.17.x patch (if not, 2.18)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
2.18 has-failing-test Indicates that there exists a test case (under `failing/`) to reproduce the issue
Projects
None yet
Development

No branches or pull requests

2 participants