Skip to content

Commit 2a57813

Browse files
authored
Merge pull request #1044 from k163377/remove-old
Remove ValueClassUnboxSerializer
2 parents ba0116e + 7527989 commit 2a57813

File tree

2 files changed

+1
-9
lines changed

2 files changed

+1
-9
lines changed

pom.xml

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -256,6 +256,7 @@
256256
com.fasterxml.jackson.module.kotlin.KotlinModule#getEnabledSingletonSupport()
257257
</exclude>
258258
<exclude>com.fasterxml.jackson.module.kotlin.MissingKotlinParameterException</exclude>
259+
<exclude>com.fasterxml.jackson.module.kotlin.ValueClassUnboxSerializer</exclude>
259260
<!-- internal -->
260261
<exclude>
261262
com.fasterxml.jackson.module.kotlin.KotlinInstantiators#KotlinInstantiators(com.fasterxml.jackson.module.kotlin.ReflectionCache,boolean,boolean,boolean,boolean)

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

Lines changed: 0 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -48,15 +48,6 @@ object ULongSerializer : StdSerializer<ULong>(ULong::class.java) {
4848
}
4949
}
5050

51-
internal object ValueClassUnboxSerializer : StdSerializer<Any>(Any::class.java) {
52-
private fun readResolve(): Any = ValueClassUnboxSerializer
53-
54-
override fun serialize(value: Any, gen: JsonGenerator, provider: SerializerProvider) {
55-
val unboxed = value::class.java.getMethod("unbox-impl").invoke(value)
56-
provider.defaultSerializeValue(unboxed, gen)
57-
}
58-
}
59-
6051
// Class must be UnboxableValueClass.
6152
private fun Class<*>.getStaticJsonValueGetter(): Method? = this.declaredMethods.find { method ->
6253
Modifier.isStatic(method.modifiers) && method.annotations.any { it is JsonValue && it.value }

0 commit comments

Comments
 (0)