Skip to content

Commit c24010a

Browse files
committed
move method
1 parent 4c18e43 commit c24010a

File tree

2 files changed

+6
-7
lines changed

2 files changed

+6
-7
lines changed

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

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -80,3 +80,9 @@ internal fun Int.toBitSet(): BitSet {
8080
}
8181
return bits
8282
}
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()

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

Lines changed: 0 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,6 @@ import com.fasterxml.jackson.core.JsonGenerator
66
import com.fasterxml.jackson.databind.*
77
import com.fasterxml.jackson.databind.ser.Serializers
88
import com.fasterxml.jackson.databind.ser.std.StdSerializer
9-
import com.fasterxml.jackson.module.kotlin.ValueClassUnboxSerializer.isUnboxableValueClass
109
import java.math.BigInteger
1110

1211
object SequenceSerializer : StdSerializer<Sequence<*>>(Sequence::class.java) {
@@ -52,12 +51,6 @@ object ValueClassUnboxSerializer : StdSerializer<Any>(Any::class.java) {
5251

5352
provider.findValueSerializer(unboxed::class.java).serialize(unboxed, gen, provider)
5453
}
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()
6154
}
6255

6356
@Suppress("EXPERIMENTAL_API_USAGE")

0 commit comments

Comments
 (0)