Skip to content

Commit d1b83b0

Browse files
committed
Formatting
1 parent 44ad738 commit d1b83b0

File tree

1 file changed

+2
-4
lines changed

1 file changed

+2
-4
lines changed

src/main/kotlin/com/fasterxml/jackson/module/kotlin/deser/value_instantiator/KotlinValueInstantiator.kt

Lines changed: 2 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -76,11 +76,9 @@ internal class KotlinValueInstantiator(
7676
}
7777

7878
var paramVal = if (!isMissing || paramDef.isPrimitive || jsonProp.hasInjectableValueId()) {
79-
val tempParamVal = buffer.getParameter(jsonProp)
80-
if (nullIsSameAsDefault && tempParamVal == null && paramDef.isOptional) {
81-
return@forEachIndexed
79+
buffer.getParameter(jsonProp).apply {
80+
if (nullIsSameAsDefault && this == null && paramDef.isOptional) return@forEachIndexed
8281
}
83-
tempParamVal
8482
} else {
8583
if (paramDef.isNullable) {
8684
// do not try to create any object if it is nullable and the value is missing

0 commit comments

Comments
 (0)