Skip to content

Commit 432505d

Browse files
committed
Merge remote-tracking branch 'FasterXML/2.19'
2 parents 348fcbb + 4ecdac2 commit 432505d

File tree

3 files changed

+16
-5
lines changed

3 files changed

+16
-5
lines changed

release-notes/CREDITS-2.x

Lines changed: 2 additions & 0 deletions
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
@@ -29,6 +30,7 @@ WrongWrong (@k163377)
2930
# 2.18.0 (26-Sep-2024)
3031

3132
WrongWrong (@k163377)
33+
* #883: Raise the deprecation level to error for the MissingKotlinParameterException secondary constructor
3234
* #869: Replaced Enum.values with Enum.entries
3335
* #818: Optimize the search process for creators
3436
* #817: Fixed nullability of convertValue function argument

release-notes/VERSION-2.x

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -17,7 +17,11 @@ Co-maintainers:
1717
------------------------------------------------------------------------
1818

1919
2.19.0 (not yet released)
20-
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.
23+
#883: The deprecation level has been raised to error for the `MissingKotlinParameterException` secondary constructor.
24+
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.
2125
#878: Fixed a problem where settings like `@JsonSetter(nulls = AS_EMPTY)` were not being applied when the input was `undefined`.
2226
#869: By using Enum.entries in the acquisition of KotlinFeature.defaults, the initialization load was reduced, albeit slightly.
2327
#861: Kotlin has been upgraded to 1.9.24.

src/main/kotlin/tools/jackson/module/kotlin/Exceptions.kt

Lines changed: 9 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,12 +1,13 @@
11
package tools.jackson.module.kotlin
22

33
import tools.jackson.core.JsonParser
4-
import tools.jackson.databind.exc.MismatchedInputException
4+
import tools.jackson.databind.DatabindException
5+
import tools.jackson.databind.exc.InvalidNullException
56
import java.io.Closeable
67
import kotlin.reflect.KParameter
78

89
/**
9-
* Specialized [JsonMappingException] sub-class used to indicate that a mandatory Kotlin constructor
10+
* Specialized [DatabindException] sub-class used to indicate that a mandatory Kotlin constructor
1011
* parameter was missing or null.
1112
*/
1213
@Deprecated(
@@ -30,8 +31,12 @@ class MissingKotlinParameterException(
3031
val parameter: KParameter,
3132
processor: JsonParser? = null,
3233
msg: String
33-
) : MismatchedInputException(processor, msg) {
34-
@Deprecated("Use main constructor", ReplaceWith("MissingKotlinParameterException(KParameter, JsonParser?, String)"))
34+
) : InvalidNullException(processor, msg, null) {
35+
@Deprecated(
36+
"Use main constructor, ",
37+
ReplaceWith("MissingKotlinParameterException(KParameter, JsonParser?, String)"),
38+
DeprecationLevel.ERROR,
39+
)
3540
constructor(
3641
parameter: KParameter,
3742
processor: Closeable? = null,

0 commit comments

Comments
 (0)