File tree Expand file tree Collapse file tree 2 files changed +6
-7
lines changed
src/main/kotlin/com/fasterxml/jackson/module/kotlin Expand file tree Collapse file tree 2 files changed +6
-7
lines changed Original file line number Diff line number Diff line change @@ -80,3 +80,9 @@ internal fun Int.toBitSet(): BitSet {
80
80
}
81
81
return bits
82
82
}
83
+
84
+ // In the future, value class without JvmInline will be available, and unbox may not be able to handle it.
85
+ // https://github.com/FasterXML/jackson-module-kotlin/issues/464
86
+ // The JvmInline annotation can be given to Java class,
87
+ // so the isKotlinClass decision is necessary (the order is preferable in terms of possible frequency).
88
+ internal fun Class <* >.isUnboxableValueClass () = annotations.any { it is JvmInline } && this .isKotlinClass()
Original file line number Diff line number Diff line change @@ -6,7 +6,6 @@ import com.fasterxml.jackson.core.JsonGenerator
6
6
import com.fasterxml.jackson.databind.*
7
7
import com.fasterxml.jackson.databind.ser.Serializers
8
8
import com.fasterxml.jackson.databind.ser.std.StdSerializer
9
- import com.fasterxml.jackson.module.kotlin.ValueClassUnboxSerializer.isUnboxableValueClass
10
9
import java.math.BigInteger
11
10
12
11
object SequenceSerializer : StdSerializer<Sequence<*>>(Sequence : :class.java) {
@@ -52,12 +51,6 @@ object ValueClassUnboxSerializer : StdSerializer<Any>(Any::class.java) {
52
51
53
52
provider.findValueSerializer(unboxed::class .java).serialize(unboxed, gen, provider)
54
53
}
55
-
56
- // In the future, value class without JvmInline will be available, and unbox may not be able to handle it.
57
- // https://github.com/FasterXML/jackson-module-kotlin/issues/464
58
- // The JvmInline annotation can be given to Java class,
59
- // so the isKotlinClass decision is necessary (the order is preferable in terms of possible frequency).
60
- fun Class <* >.isUnboxableValueClass () = annotations.any { it is JvmInline } && this .isKotlinClass()
61
54
}
62
55
63
56
@Suppress(" EXPERIMENTAL_API_USAGE" )
You can’t perform that action at this time.
0 commit comments