Skip to content

Improve error handling of "joda-money" MoneyDeserializer, CurrencyUnitDeserializer #8

Closed
@cowtowncoder

Description

@cowtowncoder

As of 2.12, no validation is done for case of missing monetary amount or unit, and failure propagates as NPE -- unit test even verifies that. But that seems like a pretty bad user experience. Instead, let's validate this properly and indicate using DeserializationContext.reportInputMismatch().
Probably also makes sense to check handling of currency unit as well; seems better to give Jackson-specific exception for unknown unit than expose library-specific one.

Metadata

Metadata

Assignees

No one assigned

    Labels

    joda-moneyIssue related joda-money datatype module

    Type

    No type

    Projects

    No projects

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions