Skip to content
Merged

2.19 #1004

Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -68,7 +68,11 @@ internal class KotlinAnnotationIntrospector(
override fun findSerializationConverter(a: Annotated): Converter<*, *>? = when (a) {
// Find a converter to handle the case where the getter returns an unboxed value from the value class.
is AnnotatedMethod -> a.findValueClassReturnType()?.let {
// To make annotations that process JavaDuration work,
// it is necessary to set up the conversion to JavaDuration here.
// This conversion will cause the deserialization settings for KotlinDuration to be ignored.
if (useJavaDurationConversion && it == Duration::class) {
// For early return, the same process is placed as the branch regarding AnnotatedClass.
if (a.rawReturnType == Duration::class.java)
KotlinToJavaDurationConverter
else
Expand Down