There is a case that KotlinModule
can overwrite hasRequiredMarker
incorrectly.
#922
Closed
4 tasks done
Labels
Search before asking
Describe the bug
KotlinAnnotationIntrospector.hasRequiredMarker
has following problemsnullToEmptyCollection
ornullToEmptyMap
is specified, the specification by annotation is overridden.nullToEmptyCollection
ornullToEmptyMap
is specified, theKotlinModule
specification is applied to nonKotlin
members.nullToEmptyCollection
andnullToEmptyMap
only work with parameters for now, but as forhasRequiredMarker
, it applies to fields,settersand getters.jackson-module-kotlin/src/main/kotlin/com/fasterxml/jackson/module/kotlin/KotlinAnnotationIntrospector.kt
Lines 41 to 55 in bab70c6
To Reproduce
It can be read from the code.
Expected behavior
The behavior should satisfy the following three points
Kotlin
.nullToEmptyCollection
andnullToEmptyMap
are applied only to parameters.Versions
This has not been corrected in 2.19.
Additional context
In the modification process, changes need to be made regarding the new
isRequired
property.FasterXML/jackson-databind#5020 (comment)
The text was updated successfully, but these errors were encountered: