We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 44ad738 commit d1b83b0Copy full SHA for d1b83b0
src/main/kotlin/com/fasterxml/jackson/module/kotlin/deser/value_instantiator/KotlinValueInstantiator.kt
@@ -76,11 +76,9 @@ internal class KotlinValueInstantiator(
76
}
77
78
var paramVal = if (!isMissing || paramDef.isPrimitive || jsonProp.hasInjectableValueId()) {
79
- val tempParamVal = buffer.getParameter(jsonProp)
80
- if (nullIsSameAsDefault && tempParamVal == null && paramDef.isOptional) {
81
- return@forEachIndexed
+ buffer.getParameter(jsonProp).apply {
+ if (nullIsSameAsDefault && this == null && paramDef.isOptional) return@forEachIndexed
82
83
- tempParamVal
84
} else {
85
if (paramDef.isNullable) {
86
// do not try to create any object if it is nullable and the value is missing
0 commit comments