Skip to content

Commit 46145d8

Browse files
committed
Formatting
1 parent d1b83b0 commit 46145d8

File tree

1 file changed

+4
-7
lines changed

1 file changed

+4
-7
lines changed

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

Lines changed: 4 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -130,13 +130,10 @@ internal class KotlinAnnotationIntrospector(
130130
?.let { it as JsonProperty }
131131
?.required
132132

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
140137
}
141138

142139
private fun Method.isRequiredByAnnotation(): Boolean? {

0 commit comments

Comments
 (0)