File tree 1 file changed +5
-5
lines changed
src/main/kotlin/com/fasterxml/jackson/module/kotlin
1 file changed +5
-5
lines changed Original file line number Diff line number Diff line change @@ -99,7 +99,7 @@ internal class KotlinAnnotationIntrospector(private val context: Module.SetupCon
99
99
// This could be a setter or a getter of a class property or
100
100
// a setter-like/getter-like method.
101
101
private fun AnnotatedMethod.hasRequiredMarker (): Boolean? = this .getRequiredMarkerFromCorrespondingAccessor()
102
- ? : this .member.kotlinFunction?. getRequiredMarkerFromAccessorLikeMethod()
102
+ ? : this .member.getRequiredMarkerFromAccessorLikeMethod()
103
103
104
104
private fun AnnotatedMethod.getRequiredMarkerFromCorrespondingAccessor (): Boolean? {
105
105
member.declaringClass.kotlin.declaredMemberProperties.forEach { kProperty1 ->
@@ -121,11 +121,11 @@ internal class KotlinAnnotationIntrospector(private val context: Module.SetupCon
121
121
}
122
122
123
123
// Is the member method a regular method of the data class or
124
- private fun KFunction < * > .getRequiredMarkerFromAccessorLikeMethod (): Boolean? {
125
- val byAnnotation = this .javaMethod?. isRequiredByAnnotation()
124
+ private fun Method .getRequiredMarkerFromAccessorLikeMethod (): Boolean? = this .kotlinFunction?. let { method ->
125
+ val byAnnotation = this .isRequiredByAnnotation()
126
126
return when {
127
- this .isGetterLike() -> requiredAnnotationOrNullability(byAnnotation, this .returnType.isRequired())
128
- this .isSetterLike() -> requiredAnnotationOrNullability(byAnnotation, this .isMethodParameterRequired(0 ))
127
+ method .isGetterLike() -> requiredAnnotationOrNullability(byAnnotation, method .returnType.isRequired())
128
+ method .isSetterLike() -> requiredAnnotationOrNullability(byAnnotation, method .isMethodParameterRequired(0 ))
129
129
else -> null
130
130
}
131
131
}
You can’t perform that action at this time.
0 commit comments