Skip to content

Binding invalid Currency gives nonsense at end of the message #590

@Jerbell

Description

@Jerbell

This has been an issue since 2.3.4 (and 2.4.0 presumably). It was put in for fix #444.
An invalid Currency used to say:
"Can not construct instance of java.util.Currency from String value 'XYZ': not a valid textual representation"
Now it says:
"Can not construct instance of java.util.Currency from String value 'XYZ': not a valid textual representation problem: null"
The code is in com.fasterxml.jackson.databind.deser.std.FromStringDeserializer.
Perhaps a simple fix is to check:
if (cause != null && cause.getMessage() != null) { msg += " problem: "+cause.getMessage(); }
adding in: "&& cause.getMessage() != null"

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