-
Notifications
You must be signed in to change notification settings - Fork 122
Deserialization of Month in ONE_BASED_MONTHS mode fails for value "12" #364
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Comments
bbobcik
pushed a commit
to bbobcik/jackson-modules-java8
that referenced
this issue
Mar 26, 2025
bbobcik
pushed a commit
to bbobcik/jackson-modules-java8
that referenced
this issue
Mar 27, 2025
cowtowncoder
added a commit
that referenced
this issue
Mar 30, 2025
cowtowncoder
added a commit
that referenced
this issue
Mar 30, 2025
cowtowncoder
added a commit
that referenced
this issue
Mar 30, 2025
cowtowncoder
added a commit
to pjfanning/jackson-databind
that referenced
this issue
Apr 4, 2025
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
When
JavaTimeFeature.ONE_BASED_MONTHS
is in effect, I expect to convert strings"1"
toMonth.JANUARY
..."12"
toMonth.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 withzeroBaseMonth.minus(1)
. The original deserializer can handle values"0"
to"11"
, but"12"
is obviously out of range.The text was updated successfully, but these errors were encountered: