Closed cpuzicha closed 2 months ago
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. But this seems to be a conceptual problem if I have to patch the kotlin module because non-kotlin code changes.
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. Please see #778 for details.
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