@@ -11,7 +11,9 @@ import kotlin.reflect.KParameter
11
11
* parameter was missing or null.
12
12
*/
13
13
@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." ,
15
17
ReplaceWith (
16
18
" MismatchedInputException" ,
17
19
" com.fasterxml.jackson.databind.exc.MismatchedInputException"
@@ -20,9 +22,16 @@ import kotlin.reflect.KParameter
20
22
)
21
23
// When deserialized by the JDK, the parameter property will be null, ignoring nullability.
22
24
// 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) {
26
35
@Deprecated(" Use main constructor" , ReplaceWith (" MissingKotlinParameterException(KParameter, JsonParser?, String)" ))
27
36
constructor (
28
37
parameter: KParameter ,
0 commit comments