From 055bd47dcf6c754ea3731d98e2ee87b54e9afeb2 Mon Sep 17 00:00:00 2001 From: wrongwrong Date: Sun, 20 Apr 2025 18:16:08 +0900 Subject: [PATCH] Fixed to not expose internal function wrt https://github.com/FasterXML/jackson-module-kotlin/pull/937 --- .../com/fasterxml/jackson/module/kotlin/Extensions.kt | 6 ++---- 1 file changed, 2 insertions(+), 4 deletions(-) diff --git a/src/main/kotlin/com/fasterxml/jackson/module/kotlin/Extensions.kt b/src/main/kotlin/com/fasterxml/jackson/module/kotlin/Extensions.kt index c79fc3f8..dc75e7b2 100644 --- a/src/main/kotlin/com/fasterxml/jackson/module/kotlin/Extensions.kt +++ b/src/main/kotlin/com/fasterxml/jackson/module/kotlin/Extensions.kt @@ -53,10 +53,8 @@ fun ObjectMapper.registerKotlinModule(initializer: KotlinModule.Builder.() -> Un inline fun jacksonTypeRef(): TypeReference = object: TypeReference() {} -/** - * It is public due to Kotlin restrictions, but should not be used externally. - */ -inline fun Any?.checkTypeMismatch(): T { +@PublishedApi +internal inline fun Any?.checkTypeMismatch(): T { // Basically, this check assumes that T is non-null and the value is null. // Since this can be caused by both input or ObjectMapper implementation errors, // a more abstract RuntimeJsonMappingException is thrown.