Skip to content

Commit c0a58ab

Browse files
committed
Fix the call would fail if the companion object was private.
1 parent b01c4bd commit c0a58ab

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

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

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -34,7 +34,7 @@ internal class MethodValueCreator<T> private constructor(
3434
instance to initialCallableAccessible
3535
} catch (ex: IllegalAccessException) {
3636
// fallback for when an odd access exception happens through Kotlin reflection
37-
possibleCompanion.java.enclosingClass.fields
37+
possibleCompanion.java.enclosingClass.declaredFields
3838
.firstOrNull { it.type.kotlin.isCompanion }
3939
?.let {
4040
it.isAccessible = true

0 commit comments

Comments
 (0)