File tree 1 file changed +4
-2
lines changed
src/main/kotlin/com/fasterxml/jackson/module/kotlin
1 file changed +4
-2
lines changed Original file line number Diff line number Diff line change @@ -131,8 +131,7 @@ internal class KotlinAnnotationIntrospector(private val context: Module.SetupCon
131
131
}
132
132
133
133
private fun KFunction <* >.isGetterLike (): Boolean = parameters.size == 1
134
- private fun KFunction <* >.isSetterLike (): Boolean =
135
- parameters.size == 2 && returnType == Unit ::class .createType()
134
+ private fun KFunction <* >.isSetterLike (): Boolean = parameters.size == 2 && returnType == UNIT_TYPE
136
135
137
136
private fun AnnotatedParameter.hasRequiredMarker (): Boolean? {
138
137
val member = this .member
@@ -170,4 +169,7 @@ internal class KotlinAnnotationIntrospector(private val context: Module.SetupCon
170
169
171
170
private fun KType.isRequired (): Boolean = ! isMarkedNullable
172
171
172
+ companion object {
173
+ val UNIT_TYPE : KType = Unit ::class .createType()
174
+ }
173
175
}
You can’t perform that action at this time.
0 commit comments