Skip to content

Using @JsonUnwrapped annotation in builderdeserializer hangs in infinite loop #1978

@roeltje25

Description

@roeltje25

We are using a builder to deserialize a bean and one of the properties is annotated with a @JsonUnwrapped annotation. The code hangs in BuilderBasedDeserializer.java in method deserializeWithObject in the loop starting on line 307. The code of that loop differs significantly from the code i see in master where the loop starts on line 340. The 2.9.4 version of the loop that I am using hangs as there seems to be no end token. p.nextToken() returns null indicating the last token was consumed but this value is not checked making the loop stuck for eternity...

I guess the code in master improves on the behavior in the 2.9 branch. Perhaps this should be merged to 2.9?

Thanks in advance for any fix.

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