Skip to content

Deserialization of Month in ONE_BASED_MONTHS mode fails for value "12" #364

Description

@bbobcik

When JavaTimeFeature.ONE_BASED_MONTHS is in effect, I expect to convert strings "1" to Month.JANUARY ... "12" to Month.DECEMBER. For values 1-11 it works, but "12" raises error.

The cause is that com.fasterxml.jackson.datatype.jsr310.deser.OneBasedMonthDeserializer first invokes the original, 0-based deserializer and then it tweaks its output with zeroBaseMonth.minus(1). The original deserializer can handle values "0" to "11", but "12" is obviously out of range.

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

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