FasterXML / jackson-module-kotlin

Module that adds support for serialization/deserialization of Kotlin (http://kotlinlang.org) classes and data classes.
Apache License 2.0
1.12k stars 175 forks source link

Minor performance improvements to NullToEmptyCollection/Map #742

Closed k163377 closed 8 months ago

k163377 commented 8 months ago

I checked the implementation and found that NullsAsEmptyProvider simply calls valueDeserializer.getEmptyValue, so there was no need to specifically wrap it. https://github.com/FasterXML/jackson-databind/blob/15fa6ec14608790664f214ab53688b68aad23dbd/src/main/java/com/fasterxml/jackson/databind/deser/impl/NullsAsEmptyProvider.java#L30

Skipping this process will improve performance, albeit slightly.

From https://github.com/ProjectMapK/jackson-module-kogera/pull/195/commits/997a5369c245045d98d5cd0444d0a3581c669cb1