jackson-module-kotlin
jackson-module-kotlin copied to clipboard
Jackson doesn't see companion object @JsonCreators unles they also have @JvmStatic
Describe the bug
Jackson doesn't see builder methods in a companion object unless they are annotate with @JvmStatic.
To Reproduce PR with repro test https://github.com/FasterXML/jackson-module-kotlin/pull/354
Expected behavior
Jackson should find @JsonCreator-annotated methods on companion objects.
Versions Kotlin: Jackson-module-kotlin: 2.11.2 Jackson-databind: 2.11.2
I was caught by this the other day, filed this, and made a repro branch, but now I'm reading the caveats section of the README and it's listed right there. Keeping those around because maybe I'll look into this, but I'm guessing since it's a listed caveat there isn't an easy solution.
@dinomite looks like src/test/kotlin/com/fasterxml/jackson/module/kotlin/test/github/failing/Github335.kt is "failing to fail" (I think?) on 2.12... was mentioned in context of #182 / #419.
Looks like it was actually issue #335 that was fixed