Skip to content

Commit 64b491d

Browse files
authored
Merge pull request #1004 from FasterXML/2.19
2.19
2 parents fbf557e + 7cf0f24 commit 64b491d

File tree

1 file changed

+4
-0
lines changed

1 file changed

+4
-0
lines changed

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

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -68,7 +68,11 @@ internal class KotlinAnnotationIntrospector(
6868
override fun findSerializationConverter(a: Annotated): Converter<*, *>? = when (a) {
6969
// Find a converter to handle the case where the getter returns an unboxed value from the value class.
7070
is AnnotatedMethod -> a.findValueClassReturnType()?.let {
71+
// To make annotations that process JavaDuration work,
72+
// it is necessary to set up the conversion to JavaDuration here.
73+
// This conversion will cause the deserialization settings for KotlinDuration to be ignored.
7174
if (useJavaDurationConversion && it == Duration::class) {
75+
// For early return, the same process is placed as the branch regarding AnnotatedClass.
7276
if (a.rawReturnType == Duration::class.java)
7377
KotlinToJavaDurationConverter
7478
else

0 commit comments

Comments
 (0)