File tree Expand file tree Collapse file tree 1 file changed +2
-6
lines changed
src/main/kotlin/com/fasterxml/jackson/module/kotlin Expand file tree Collapse file tree 1 file changed +2
-6
lines changed Original file line number Diff line number Diff line change @@ -126,8 +126,8 @@ internal class KotlinAnnotationIntrospector(
126
126
}
127
127
128
128
private fun AccessibleObject.isRequiredByAnnotation (): Boolean? = annotations
129
- ?.firstOrNull { it.annotationClass == JsonProperty :: class }
130
- ?. let { it as JsonProperty }
129
+ .filterIsInstance< JsonProperty >()
130
+ .firstOrNull()
131
131
?.required
132
132
133
133
private fun requiredAnnotationOrNullability (byAnnotation : Boolean? , byNullability : Boolean? ): Boolean? = when {
@@ -136,10 +136,6 @@ internal class KotlinAnnotationIntrospector(
136
136
else -> byAnnotation
137
137
}
138
138
139
- private fun Method.isRequiredByAnnotation (): Boolean? {
140
- return (this .annotations.firstOrNull { it.annotationClass.java == JsonProperty ::class .java } as ? JsonProperty )?.required
141
- }
142
-
143
139
private fun KmProperty.isRequiredByNullability (): Boolean = ! Flag .Type .IS_NULLABLE (this .returnType.flags)
144
140
145
141
// This could be a setter or a getter of a class property or
You can’t perform that action at this time.
0 commit comments