-
Notifications
You must be signed in to change notification settings - Fork 117
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
java.time.DateTimeException
serialization fails
#319
Comments
Thank you for reporting this issue! I'll have to think of the best way to handle this. |
Created FasterXML/jackson-databind#4718 for jackson-databind change(s); this issue can remain to allow for adding tests on module side (if any needed) |
cowtowncoder
changed the title
jackson-datatype-jsr310 fails java.time.DateTimeException serialization with wrong message
Sep 29, 2024
java.time.DateTimeException
serialization fails
cowtowncoder
added a commit
that referenced
this issue
Sep 29, 2024
Fixed via FasterXML/jackson-databind#4718 for 2.18(.1). .. . actually will backport in 2.17 (for 2.17.3) as well. |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
This code (using version 2.17.2, 2.16.2 and 2.13.5):
will throw
InvalidDefinitionException
with messageJava 8 date/time type 'java.time.DateTimeException' not supported by default: add Module "com.fasterxml.jackson.datatype:jackson-datatype-jsr310" to enable handling
which is obviously wrong as JavaTimeModule is added above.
This can be fixed in
BeanUtil#checkUnsupportedType(JavaType)
by for example changing line:
if (className.indexOf('.', 10) >= 0) {
to:
if (className.indexOf('.', 10) >= 0 || className.equals("java.time.DateTimeException")) {
The text was updated successfully, but these errors were encountered: