-
Notifications
You must be signed in to change notification settings - Fork 175
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
Kotlin Module interferes with Java record deserialization #794
Comments
KotlinNamesAnnotationIntrospector probably needs code to stop it trying to handle non-Kotlin classes. @cpuzicha do you want to try this yourself? I maintain jackson-module-scala and found that I had to make that module ignore non-Scala classes because it could affect the processing of pure Java classes (for instance) if Scala module mistakenly treated those classes like they were Scala classes. |
Sorry - will not be able find a slot for a timely patch. |
Interesting 🤔 Could u tell us which class/module/codepath does such non-Scala validation in the Scala module? @pjfanning Nvm, probably named like XxxxIntrospector. Will look for it myself, sorry for the fuss 👍🏼 |
This will be resolved in the next release. |
Search before asking
Describe the bug
In a mixed environment with Java records and Kotlin data-classes,
deserializing a Java record with a primitive field fails with error message "com.fasterxml.jackson.databind.exc.InvalidDefinitionException: Can't compute ClassId for primitive type: boolean" inside the Kotlin module.
To Reproduce
Expected behavior
No Issue
Versions
Gradle 8.7
Java 21 (Temurin 21.0.2)
Kotlin: 1.7.22
Jackson-module-kotlin: 2.17.0 (Regression somewhere between 2.15.4)
Jackson-databind: 2.17.0
Additional context
This problem seems to not exist with Jackson 2.15.4
Stacktrace:
Dependencies
The text was updated successfully, but these errors were encountered: