From 6536a0b30c9a8c93e07b6172718521125e94b8cd Mon Sep 17 00:00:00 2001 From: wrongwrong Date: Thu, 20 Mar 2025 13:59:51 +0900 Subject: [PATCH] Fixed problem of checking twice if it is defined in Kotlin Correction mistake in #923 --- .../jackson/module/kotlin/KotlinAnnotationIntrospector.kt | 3 +-- 1 file changed, 1 insertion(+), 2 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 cf5db5698..7efb65377 100644 --- a/src/main/kotlin/com/fasterxml/jackson/module/kotlin/KotlinAnnotationIntrospector.kt +++ b/src/main/kotlin/com/fasterxml/jackson/module/kotlin/KotlinAnnotationIntrospector.kt @@ -44,13 +44,12 @@ internal class KotlinAnnotationIntrospector( when { nullToEmptyCollection && m.type.isCollectionLikeType -> false nullToEmptyMap && m.type.isMapLikeType -> false - m.member.declaringClass.isKotlinClass() -> when (m) { + else -> when (m) { is AnnotatedField -> m.hasRequiredMarker() is AnnotatedMethod -> m.hasRequiredMarker() is AnnotatedParameter -> m.hasRequiredMarker() else -> null } - else -> null } } catch (_: UnsupportedOperationException) { null