From 07a0e4510b1d20be836d59f82f10222770732ea8 Mon Sep 17 00:00:00 2001 From: wrongwrong Date: Sat, 16 Mar 2024 03:49:19 +0900 Subject: [PATCH 1/2] Delete Duration conversion that was no longer needed Because of value class support, they are now converted elsewhere. --- .../module/kotlin/KotlinAnnotationIntrospector.kt | 14 -------------- 1 file changed, 14 deletions(-) diff --git a/src/main/kotlin/com/fasterxml/jackson/module/kotlin/KotlinAnnotationIntrospector.kt b/src/main/kotlin/com/fasterxml/jackson/module/kotlin/KotlinAnnotationIntrospector.kt index 4897517a..e4ce428b 100644 --- a/src/main/kotlin/com/fasterxml/jackson/module/kotlin/KotlinAnnotationIntrospector.kt +++ b/src/main/kotlin/com/fasterxml/jackson/module/kotlin/KotlinAnnotationIntrospector.kt @@ -86,20 +86,6 @@ internal class KotlinAnnotationIntrospector( ?.takeIf { it.wrapsNullable() } ?.let { cache.getValueClassBoxConverter(am.rawReturnType, it).delegatingSerializer } - override fun findDeserializationConverter(a: Annotated): Any? { - if (!useJavaDurationConversion) return null - - return (a as? AnnotatedParameter)?.let { param -> - val valueParameter = cache.findKotlinParameter(param) ?: return@let null - - if (valueParameter.type.classifier == Duration::class) { - JavaToKotlinDurationConverter - } else { - null - } - } - } - /** * Subclasses can be detected automatically for sealed classes, since all possible subclasses are known * at compile-time to Kotlin. This makes [com.fasterxml.jackson.annotation.JsonSubTypes] redundant. From 79b62013aec4e1539cf28ed2d71cbd66b44be735 Mon Sep 17 00:00:00 2001 From: wrongwrong Date: Sat, 16 Mar 2024 03:59:36 +0900 Subject: [PATCH 2/2] Update release notes wrt #776 --- release-notes/CREDITS-2.x | 7 ++++++- release-notes/VERSION-2.x | 4 ++++ 2 files changed, 10 insertions(+), 1 deletion(-) diff --git a/release-notes/CREDITS-2.x b/release-notes/CREDITS-2.x index e6e11ff8..c25c4fce 100644 --- a/release-notes/CREDITS-2.x +++ b/release-notes/CREDITS-2.x @@ -15,7 +15,12 @@ Authors: Contributors: -# 2.17.0 (not yet released) +# 2.17.1 (not yet released) + +WrongWrong (@k163377) +* #776: Delete Duration conversion that was no longer needed + +# 2.17.0 WrongWrong (@k163377) * #768: Added value class deserialization support. diff --git a/release-notes/VERSION-2.x b/release-notes/VERSION-2.x index 15cee9d5..f2fa135a 100644 --- a/release-notes/VERSION-2.x +++ b/release-notes/VERSION-2.x @@ -16,6 +16,10 @@ Co-maintainers: === Releases === ------------------------------------------------------------------------ +2.17.1 (not yet released) + +#776: Delete Duration conversion that was no longer needed. + 2.17.0 (12-Mar-2024) #768: Added value class deserialization support.