Skip to content

Commit

Permalink
Fixed to process without using NullAsEmptyProvider
Browse files Browse the repository at this point in the history
Because no features specific to NullAsEmptyProvider were used
  • Loading branch information
k163377 committed Dec 16, 2023
1 parent ac6b904 commit 997a536
Showing 1 changed file with 1 addition and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,6 @@ import com.fasterxml.jackson.databind.JavaType
import com.fasterxml.jackson.databind.JsonMappingException
import com.fasterxml.jackson.databind.deser.SettableBeanProperty
import com.fasterxml.jackson.databind.deser.ValueInstantiator
import com.fasterxml.jackson.databind.deser.impl.NullsAsEmptyProvider
import com.fasterxml.jackson.databind.deser.impl.PropertyValueBuffer
import com.fasterxml.jackson.databind.deser.std.StdValueInstantiator
import com.fasterxml.jackson.databind.exc.MismatchedInputException
Expand Down Expand Up @@ -82,7 +81,7 @@ internal class KotlinValueInstantiator(

if (paramVal == null) {
if (jsonProp.type.requireEmptyValue()) {
paramVal = NullsAsEmptyProvider(jsonProp.valueDeserializer).getNullValue(ctxt)
paramVal = jsonProp.valueDeserializer!!.getEmptyValue(ctxt)
} else {
val isMissingAndRequired = isMissing && jsonProp.isRequired
if (isMissingAndRequired || !(paramDef.isNullable || paramDef.isGenericType)) {
Expand Down

0 comments on commit 997a536

Please sign in to comment.