File tree Expand file tree Collapse file tree 1 file changed +1
-9
lines changed
src/main/kotlin/com/fasterxml/jackson/module/kotlin Expand file tree Collapse file tree 1 file changed +1
-9
lines changed Original file line number Diff line number Diff line change @@ -56,12 +56,6 @@ object ValueClassUnboxSerializer : StdSerializer<Any>(Any::class.java) {
5656
5757 override fun serialize (value : Any , gen : JsonGenerator , provider : SerializerProvider ) {
5858 val unboxed = value::class .java.getMethod(" unbox-impl" ).invoke(value)
59-
60- if (unboxed == null ) {
61- provider.defaultSerializeNull(gen)
62- return
63- }
64-
6559 provider.defaultSerializeValue(unboxed, gen)
6660 }
6761}
@@ -76,9 +70,7 @@ internal sealed class ValueClassSerializer<T : Any>(t: Class<T>) : StdSerializer
7670 val unboxed = unboxMethod.invoke(value)
7771 // As shown in the processing of the factory function, jsonValueGetter is always a static method.
7872 val jsonValue: Any? = staticJsonValueGetter.invoke(null , unboxed)
79- jsonValue
80- ?.let { provider.defaultSerializeValue(it, gen) }
81- ? : provider.defaultSerializeNull(gen)
73+ provider.defaultSerializeValue(jsonValue, gen)
8274 }
8375 }
8476
You can’t perform that action at this time.
0 commit comments