Skip to content

Commit 5eca9cd

Browse files
committed
add comments
1 parent 3428cd3 commit 5eca9cd

File tree

2 files changed

+2
-0
lines changed

2 files changed

+2
-0
lines changed

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

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -7,6 +7,7 @@ internal class ConstructorValueCreator<T>(override val callable: KFunction<T>) :
77
override val accessible: Boolean = callable.isAccessible
88

99
init {
10+
// To prevent the call from failing, save the initial value and then rewrite the flag.
1011
if (!accessible) callable.isAccessible = true
1112
}
1213
}

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

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -23,6 +23,7 @@ internal class MethodValueCreator<T> private constructor(
2323
// abort, we have some unknown case here
2424
if (!possibleCompanion.isCompanion) return null
2525

26+
// To prevent the call from failing, save the initial value and then rewrite the flag.
2627
val initialCallableAccessible = callable.isAccessible
2728
if (!initialCallableAccessible) callable.isAccessible = true
2829

0 commit comments

Comments
 (0)