-
Notifications
You must be signed in to change notification settings - Fork 175
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge branch '2.13' of github.com:FasterXML/jackson-module-kotlin int…
…o 2.13
- Loading branch information
Showing
12 changed files
with
757 additions
and
156 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
13 changes: 13 additions & 0 deletions
13
src/main/kotlin/com/fasterxml/jackson/module/kotlin/ConstructorValueCreator.kt
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,13 @@ | ||
package com.fasterxml.jackson.module.kotlin | ||
|
||
import kotlin.reflect.KFunction | ||
import kotlin.reflect.jvm.isAccessible | ||
|
||
internal class ConstructorValueCreator<T>(override val callable: KFunction<T>) : ValueCreator<T>() { | ||
override val accessible: Boolean = callable.isAccessible | ||
|
||
init { | ||
// To prevent the call from failing, save the initial value and then rewrite the flag. | ||
if (!accessible) callable.isAccessible = true | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.