Skip to content

Commit 4ecdac2

Browse files
authored
Merge pull request #884 from k163377/mod-ex
Changed the base class of MissingKotlinParameterException to InvalidNullException
2 parents 1659969 + 95b7160 commit 4ecdac2

File tree

3 files changed

+6
-2
lines changed

3 files changed

+6
-2
lines changed

release-notes/CREDITS-2.x

+1
Original file line numberDiff line numberDiff line change
@@ -18,6 +18,7 @@ Contributors:
1818
# 2.19.0 (not yet released)
1919

2020
WrongWrong (@k163377)
21+
* #884: Changed the base class of MissingKotlinParameterException to InvalidNullException
2122
* #878: Fix for #876
2223
* #868: Added test case for FAIL_ON_NULL_FOR_PRIMITIVES
2324
* #866: Upgrade to JUnit5

release-notes/VERSION-2.x

+3
Original file line numberDiff line numberDiff line change
@@ -17,6 +17,9 @@ Co-maintainers:
1717
------------------------------------------------------------------------
1818

1919
2.19.0 (not yet released)
20+
#884: The base class for `MissingKotlinParameterException` has been changed to `InvalidNullException`.
21+
If you do not catch this exception or catch `MismatchedInputException`, the behavior is unchanged.
22+
If you are catching both `MismatchedKotlinParameterException` and `InvalidNullException`, you must catch `MismatchedKotlinParameterException` first.
2023
#883: The deprecation level has been raised to error for the `MissingKotlinParameterException` secondary constructor.
2124
This is a problematic process that has been marked as deprecated for a very long time and will be removed in 2.20 or later.
2225
#878: Fixed a problem where settings like `@JsonSetter(nulls = AS_EMPTY)` were not being applied when the input was `undefined`.

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

+2-2
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@ package com.fasterxml.jackson.module.kotlin
22

33
import com.fasterxml.jackson.core.JsonParser
44
import com.fasterxml.jackson.databind.JsonMappingException
5-
import com.fasterxml.jackson.databind.exc.MismatchedInputException
5+
import com.fasterxml.jackson.databind.exc.InvalidNullException
66
import java.io.Closeable
77
import kotlin.reflect.KParameter
88

@@ -31,7 +31,7 @@ class MissingKotlinParameterException(
3131
val parameter: KParameter,
3232
processor: JsonParser? = null,
3333
msg: String
34-
) : MismatchedInputException(processor, msg) {
34+
) : InvalidNullException(processor, msg, null) {
3535
@Deprecated(
3636
"Use main constructor, ",
3737
ReplaceWith("MissingKotlinParameterException(KParameter, JsonParser?, String)"),

0 commit comments

Comments
 (0)