Skip to content

Possible regression when using @JsonIdentityInfo #499

@hgeraldino

Description

@hgeraldino

When I try to serialize/deserialize instances from a class marked with @JsonIdentityInfo using the same ObjectMapper, I get this JsonMappingException: "com.fasterxml.jackson.databind.JsonMappingException: Already had POJO for id (java.lang.Integer) [com.fasterxml.jackson.annotation.ObjectIdGenerator$IdKey@3f0456e4".

See: https://gist.github.com/hgeraldino/ed389bfacc579d1eb0c6

This very same test works on the 2.3.0 version, but breaks on the most recent 2.4.1 version. It doesn't matter if I try to deserialize different objects, as long as they have the same property value the application breaks.

Is this an issue or something somewhat expected?

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions