Skip to content

Commit 6b8c2ec

Browse files
committed
Remove unnecessary functions
1 parent 5561aba commit 6b8c2ec

File tree

1 file changed

+0
-4
lines changed

1 file changed

+0
-4
lines changed

src/main/kotlin/com/fasterxml/jackson/module/kotlin/KotlinAnnotationIntrospector.kt

Lines changed: 0 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -177,13 +177,11 @@ internal class KotlinAnnotationIntrospector(
177177
private fun Method.getRequiredMarkerFromAccessorLikeMethod(): Boolean? = this.kotlinFunction?.let { method ->
178178
val byAnnotation = this.isRequiredByAnnotation()
179179
return when {
180-
method.isGetterLike() -> requiredAnnotationOrNullability(byAnnotation, method.returnType.isRequired())
181180
method.isSetterLike() -> requiredAnnotationOrNullability(byAnnotation, method.isMethodParameterRequired(0))
182181
else -> null
183182
}
184183
}
185184

186-
private fun KFunction<*>.isGetterLike(): Boolean = parameters.size == 1
187185
private fun KFunction<*>.isSetterLike(): Boolean = parameters.size == 2 && returnType == UNIT_TYPE
188186

189187
private fun AnnotatedParameter.hasRequiredMarker(): Boolean? {
@@ -220,8 +218,6 @@ internal class KotlinAnnotationIntrospector(
220218
!(isPrimitive && !context.isEnabled(DeserializationFeature.FAIL_ON_NULL_FOR_PRIMITIVES))
221219
}
222220

223-
private fun KType.isRequired(): Boolean = !isMarkedNullable
224-
225221
companion object {
226222
val UNIT_TYPE: KType = Unit::class.createType()
227223
}

0 commit comments

Comments
 (0)