File tree 2 files changed +2
-11
lines changed
src/main/kotlin/com/fasterxml/jackson/module/kotlin
2 files changed +2
-11
lines changed Original file line number Diff line number Diff line change 1
1
package com.fasterxml.jackson.module.kotlin
2
2
3
- import com.fasterxml.jackson.annotation.JsonCreator
4
3
import com.fasterxml.jackson.annotation.JsonProperty
5
4
import com.fasterxml.jackson.databind.DeserializationFeature
6
5
import com.fasterxml.jackson.databind.JsonSerializer
7
6
import com.fasterxml.jackson.databind.Module
8
- import com.fasterxml.jackson.databind.cfg.MapperConfig
9
7
import com.fasterxml.jackson.databind.introspect.*
10
8
import com.fasterxml.jackson.databind.jsontype.NamedType
11
9
import com.fasterxml.jackson.databind.util.Converter
@@ -59,15 +57,6 @@ internal class KotlinAnnotationIntrospector(
59
57
return hasRequired
60
58
}
61
59
62
- override fun findCreatorAnnotation (config : MapperConfig <* >, a : Annotated ): JsonCreator .Mode ? {
63
-
64
- // TODO: possible work around for JsonValue class that requires the class constructor to have the JsonCreator(Mode.DELEGATED) set?
65
- // since we infer the creator at times for these methods, the wrong mode could be implied.
66
-
67
- // findCreatorBinding used to be a clearer way to set this, but we need to set the mode here to disambugiate the intent of the constructor
68
- return super .findCreatorAnnotation(config, a)
69
- }
70
-
71
60
override fun findSerializationConverter (a : Annotated ): Converter <* , * >? = when (a) {
72
61
// Find a converter to handle the case where the getter returns an unboxed value from the value class.
73
62
is AnnotatedMethod -> a.findValueClassReturnType()?.let {
Original file line number Diff line number Diff line change @@ -112,6 +112,8 @@ internal class KotlinNamesAnnotationIntrospector(
112
112
}
113
113
}
114
114
115
+ // TODO: possible work around for JsonValue class that requires the class constructor to have the JsonCreator(DELEGATED) set?
116
+ // since we infer the creator at times for these methods, the wrong mode could be implied.
115
117
override fun findCreatorAnnotation (config : MapperConfig <* >, ann : Annotated ): JsonCreator .Mode ? {
116
118
if (ann !is AnnotatedConstructor || ! ann.isKotlinConstructorWithParameters()) return null
117
119
You can’t perform that action at this time.
0 commit comments