Fix the call would fail if callable.isAccessible was false.
MODIFY
src/main/kotlin/com/fasterxml/jackson/module/kotlin/MethodValueCreator.kt
src/main/kotlin/com/fasterxml/jackson/module/kotlin/MethodValueCreator.kt
@@ -23,11 +23,15 @@ internal class MethodValueCreator<T> private constructor(
// abort, we have some unknown case here
if (!possibleCompanion.isCompanion) return null
+ val initialCallableAccessible = callable.isAccessible
+ if (!initialCallableAccessible) callable.isAccessible = true
+
val (companionObjectInstance: Any, accessible: Boolean) = try {
// throws ex
val instance = possibleCompanion.objectInstance!!
+
// If an instance of the companion object can be obtained, accessibility depends on the KFunction
- instance to callable.isAccessible
+ instance to initialCallableAccessible
} catch (ex: IllegalAccessException) {
// fallback for when an odd access exception happens through Kotlin reflection
possibleCompanion.java.enclosingClass.fields

Fix the call would fail if callable.isAccessible was false.