File tree Expand file tree Collapse file tree 1 file changed +4
-7
lines changed
src/main/kotlin/com/fasterxml/jackson/module/kotlin Expand file tree Collapse file tree 1 file changed +4
-7
lines changed Original file line number Diff line number Diff line change @@ -130,13 +130,10 @@ internal class KotlinAnnotationIntrospector(
130
130
?.let { it as JsonProperty }
131
131
?.required
132
132
133
- private fun requiredAnnotationOrNullability (byAnnotation : Boolean? , byNullability : Boolean? ): Boolean? {
134
- if (byAnnotation != null && byNullability != null ) {
135
- return byAnnotation || byNullability
136
- } else if (byNullability != null ) {
137
- return byNullability
138
- }
139
- return byAnnotation
133
+ private fun requiredAnnotationOrNullability (byAnnotation : Boolean? , byNullability : Boolean? ): Boolean? = when {
134
+ byAnnotation != null && byNullability != null -> byAnnotation || byNullability
135
+ byNullability != null -> byNullability
136
+ else -> byAnnotation
140
137
}
141
138
142
139
private fun Method.isRequiredByAnnotation (): Boolean? {
You can’t perform that action at this time.
0 commit comments