Skip to content

Commit 23e8185

Browse files
committed
Move TODO
1 parent 3b6d46a commit 23e8185

File tree

2 files changed

+2
-11
lines changed

2 files changed

+2
-11
lines changed

src/main/kotlin/com/fasterxml/jackson/module/kotlin/KotlinAnnotationIntrospector.kt

-11
Original file line numberDiff line numberDiff line change
@@ -1,11 +1,9 @@
11
package com.fasterxml.jackson.module.kotlin
22

3-
import com.fasterxml.jackson.annotation.JsonCreator
43
import com.fasterxml.jackson.annotation.JsonProperty
54
import com.fasterxml.jackson.databind.DeserializationFeature
65
import com.fasterxml.jackson.databind.JsonSerializer
76
import com.fasterxml.jackson.databind.Module
8-
import com.fasterxml.jackson.databind.cfg.MapperConfig
97
import com.fasterxml.jackson.databind.introspect.*
108
import com.fasterxml.jackson.databind.jsontype.NamedType
119
import com.fasterxml.jackson.databind.util.Converter
@@ -59,15 +57,6 @@ internal class KotlinAnnotationIntrospector(
5957
return hasRequired
6058
}
6159

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-
7160
override fun findSerializationConverter(a: Annotated): Converter<*, *>? = when (a) {
7261
// Find a converter to handle the case where the getter returns an unboxed value from the value class.
7362
is AnnotatedMethod -> a.findValueClassReturnType()?.let {

src/main/kotlin/com/fasterxml/jackson/module/kotlin/KotlinNamesAnnotationIntrospector.kt

+2
Original file line numberDiff line numberDiff line change
@@ -112,6 +112,8 @@ internal class KotlinNamesAnnotationIntrospector(
112112
}
113113
}
114114

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.
115117
override fun findCreatorAnnotation(config: MapperConfig<*>, ann: Annotated): JsonCreator.Mode? {
116118
if (ann !is AnnotatedConstructor || !ann.isKotlinConstructorWithParameters()) return null
117119

0 commit comments

Comments
 (0)