Skip to content

Improve description included in by DeserializationContext.handleUnexpectedToken() #2707

@cowtowncoder

Description

@cowtowncoder

Currently handleUnexpectedToken() method creates somewhat vague exception message like:

com.fasterxml.jackson.databind.exc.MismatchedInputException: Cannot deserialize instance of `java.util.ArrayList<java.lang.Object>`
out of FIELD_NAME token

where raw token name is not as information as it should be. But it seems simple enough to change this to something like

com.fasterxml.jackson.databind.exc.MismatchedInputException: Cannot deserialize instance of `java.util.ArrayList<java.lang.Object>`
from Object value (token `JsonToken.FIELD_NAME`)

Since this changes observed API slightly, needs to go in 2.12 (instead of next 2.11 patch).

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