diff --git a/release-notes/CREDITS-2.x b/release-notes/CREDITS-2.x index add6d3d2..76d1c3d4 100644 --- a/release-notes/CREDITS-2.x +++ b/release-notes/CREDITS-2.x @@ -18,6 +18,7 @@ Contributors: # 2.17.0 (not yet released) WrongWrong (@k163377) +* #742: Minor performance improvements to NullToEmptyCollection/Map. * #741: Changed to allow KotlinFeature to be set in the function that registers a KotlinModule. * #740: Reduce conversion cache from Executable to KFunction. * #738: Fix JacksonInject priority. diff --git a/release-notes/VERSION-2.x b/release-notes/VERSION-2.x index 35f1d542..d9d7dc4b 100644 --- a/release-notes/VERSION-2.x +++ b/release-notes/VERSION-2.x @@ -18,6 +18,7 @@ Co-maintainers: 2.17.0 (not yet released) +#742: Minor performance improvements to NullToEmptyCollection/Map. #741: Changed to allow KotlinFeature to be set in the function that registers a KotlinModule. The `jacksonObjectMapper {}` and `registerKotlinModule {}` lambdas allow configuration for KotlinModule. #740: Reduce conversion cache from Executable to KFunction. diff --git a/src/main/kotlin/com/fasterxml/jackson/module/kotlin/KotlinValueInstantiator.kt b/src/main/kotlin/com/fasterxml/jackson/module/kotlin/KotlinValueInstantiator.kt index 5c37848b..06086531 100644 --- a/src/main/kotlin/com/fasterxml/jackson/module/kotlin/KotlinValueInstantiator.kt +++ b/src/main/kotlin/com/fasterxml/jackson/module/kotlin/KotlinValueInstantiator.kt @@ -8,7 +8,6 @@ import com.fasterxml.jackson.databind.JavaType import com.fasterxml.jackson.databind.deser.SettableBeanProperty import com.fasterxml.jackson.databind.deser.ValueInstantiator import com.fasterxml.jackson.databind.deser.ValueInstantiators -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 java.lang.reflect.TypeVariable @@ -89,7 +88,7 @@ internal class KotlinValueInstantiator( if (paramVal == null) { if (propType.requireEmptyValue()) { - paramVal = NullsAsEmptyProvider(jsonProp.valueDeserializer).getNullValue(ctxt) + paramVal = jsonProp.valueDeserializer!!.getEmptyValue(ctxt) } else { val isMissingAndRequired = isMissing && jsonProp.isRequired