Skip to content

BeanDeserializerModifier::updateBuilder() doesn't work for beans with Creator methods #4356

@herkrath

Description

@herkrath

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.

Metadata

Metadata

Assignees

No one assigned

    Labels

    2.18Issues planned at 2.18 or laterhas-failing-testIndicates that there exists a test case (under `failing/`) to reproduce the issue

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions