Skip to content

Force serialization always for convertValue(); avoid short-cuts #2220

@cowtowncoder

Description

@cowtowncoder

Various "optimizations" for ObjectMapper.convertValue() -- that is, short-circuit code that tries to figure out if it is possible to omit write+read handling altogether and simply return input value -- have caused much confusion, and even breakage for legit use cases (even if most cases have been resolved by more heuristics).

But it seems that best course would be to simplify things and simply always do write+read handling and let caller handle optimizations if ones are desired.

For backwards compatibility reasons let's do this for 3.0 however.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions