Skip to content

Commit 56f264c

Browse files
committed
Minor performance improvements to NullToEmptyCollection/Map
from ProjectMapK/jackson-module-kogera@997a536
1 parent c53e606 commit 56f264c

File tree

1 file changed

+1
-2
lines changed

1 file changed

+1
-2
lines changed

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

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,6 @@ import com.fasterxml.jackson.databind.JavaType
88
import com.fasterxml.jackson.databind.deser.SettableBeanProperty
99
import com.fasterxml.jackson.databind.deser.ValueInstantiator
1010
import com.fasterxml.jackson.databind.deser.ValueInstantiators
11-
import com.fasterxml.jackson.databind.deser.impl.NullsAsEmptyProvider
1211
import com.fasterxml.jackson.databind.deser.impl.PropertyValueBuffer
1312
import com.fasterxml.jackson.databind.deser.std.StdValueInstantiator
1413
import java.lang.reflect.TypeVariable
@@ -89,7 +88,7 @@ internal class KotlinValueInstantiator(
8988

9089
if (paramVal == null) {
9190
if (propType.requireEmptyValue()) {
92-
paramVal = NullsAsEmptyProvider(jsonProp.valueDeserializer).getNullValue(ctxt)
91+
paramVal = jsonProp.valueDeserializer!!.getEmptyValue(ctxt)
9392
} else {
9493
val isMissingAndRequired = isMissing && jsonProp.isRequired
9594

0 commit comments

Comments
 (0)