Skip to content

Deserializing java.time.Month from an int causes an off-by-one error (0->Jan,11->Dec), because it's an enum #274

@kreiger

Description

@kreiger

I found an issue with deserializing java.time.Month from an integer, or from a string containing an integer.

Since it's an enum, 0 deserializes as Month.JANUARY, 1/"01" as Month.FEBRUARY, 11/"11" as Month.DECEMBER, and so on.

I have a PR with a failing test that proves this: kreiger#1

Metadata

Metadata

Assignees

No one assigned

    Labels

    2.17good first issueIssue that seems easy to resolve and is likely a good candidate for contributors new to projecthas-failing-testIndicates that there exists a test case (under `failing/`) to reproduce the issue

    Type

    No type

    Projects

    No projects

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions