Skip to content

Commit 8347577

Browse files
committed
Fix comments and deprecations
1 parent e9463e9 commit 8347577

File tree

1 file changed

+13
-4
lines changed

1 file changed

+13
-4
lines changed

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

Lines changed: 13 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,9 @@ import kotlin.reflect.KParameter
1111
* parameter was missing or null.
1212
*/
1313
@Deprecated(
14-
"It will be removed in jackson-module-kotlin 2.16. See #617 for details.",
14+
"It is recommended that MismatchedInputException be referenced when possible," +
15+
" as the change is discussed for 2.17 and later." +
16+
" See #617 for details.",
1517
ReplaceWith(
1618
"MismatchedInputException",
1719
"com.fasterxml.jackson.databind.exc.MismatchedInputException"
@@ -20,9 +22,16 @@ import kotlin.reflect.KParameter
2022
)
2123
// When deserialized by the JDK, the parameter property will be null, ignoring nullability.
2224
// This is a temporary workaround for #572 and we will eventually remove this class.
23-
class MissingKotlinParameterException(@Transient val parameter: KParameter,
24-
processor: JsonParser? = null,
25-
msg: String) : MismatchedInputException(processor, msg) {
25+
class MissingKotlinParameterException(
26+
@property:Deprecated(
27+
"KParameter is not serializable and will be removed in 2.17 or later. See #572 for details.",
28+
level = DeprecationLevel.WARNING
29+
)
30+
@Transient
31+
val parameter: KParameter,
32+
processor: JsonParser? = null,
33+
msg: String
34+
) : MismatchedInputException(processor, msg) {
2635
@Deprecated("Use main constructor", ReplaceWith("MissingKotlinParameterException(KParameter, JsonParser?, String)"))
2736
constructor(
2837
parameter: KParameter,

0 commit comments

Comments
 (0)