From 35de158ee6210c20d7566e18a9e35a8c8fe221d0 Mon Sep 17 00:00:00 2001 From: wrongwrong Date: Sat, 18 Jan 2025 23:50:53 +0900 Subject: [PATCH 1/2] Changed the base class of MissingKotlinParameterException to InvalidNullException --- .../kotlin/com/fasterxml/jackson/module/kotlin/Exceptions.kt | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/main/kotlin/com/fasterxml/jackson/module/kotlin/Exceptions.kt b/src/main/kotlin/com/fasterxml/jackson/module/kotlin/Exceptions.kt index 4b91b426..120ad0f0 100644 --- a/src/main/kotlin/com/fasterxml/jackson/module/kotlin/Exceptions.kt +++ b/src/main/kotlin/com/fasterxml/jackson/module/kotlin/Exceptions.kt @@ -2,7 +2,7 @@ package com.fasterxml.jackson.module.kotlin import com.fasterxml.jackson.core.JsonParser import com.fasterxml.jackson.databind.JsonMappingException -import com.fasterxml.jackson.databind.exc.MismatchedInputException +import com.fasterxml.jackson.databind.exc.InvalidNullException import java.io.Closeable import kotlin.reflect.KParameter @@ -31,7 +31,7 @@ class MissingKotlinParameterException( val parameter: KParameter, processor: JsonParser? = null, msg: String -) : MismatchedInputException(processor, msg) { +) : InvalidNullException(processor, msg, null) { @Deprecated( "Use main constructor, ", ReplaceWith("MissingKotlinParameterException(KParameter, JsonParser?, String)"), From 95b7160669af76852ff88549a2393fd95a076196 Mon Sep 17 00:00:00 2001 From: wrongwrong Date: Sun, 19 Jan 2025 00:10:25 +0900 Subject: [PATCH 2/2] Update release notes wrt #884 --- release-notes/CREDITS-2.x | 1 + release-notes/VERSION-2.x | 3 +++ 2 files changed, 4 insertions(+) diff --git a/release-notes/CREDITS-2.x b/release-notes/CREDITS-2.x index 27fb1ddc..26f66e30 100644 --- a/release-notes/CREDITS-2.x +++ b/release-notes/CREDITS-2.x @@ -18,6 +18,7 @@ Contributors: # 2.19.0 (not yet released) WrongWrong (@k163377) +* #884: Changed the base class of MissingKotlinParameterException to InvalidNullException * #878: Fix for #876 * #868: Added test case for FAIL_ON_NULL_FOR_PRIMITIVES * #866: Upgrade to JUnit5 diff --git a/release-notes/VERSION-2.x b/release-notes/VERSION-2.x index edc02a6d..61397af7 100644 --- a/release-notes/VERSION-2.x +++ b/release-notes/VERSION-2.x @@ -17,6 +17,9 @@ Co-maintainers: ------------------------------------------------------------------------ 2.19.0 (not yet released) +#884: The base class for `MissingKotlinParameterException` has been changed to `InvalidNullException`. + If you do not catch this exception or catch `MismatchedInputException`, the behavior is unchanged. + If you are catching both `MismatchedKotlinParameterException` and `InvalidNullException`, you must catch `MismatchedKotlinParameterException` first. #883: The deprecation level has been raised to error for the `MissingKotlinParameterException` secondary constructor. 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. #878: Fixed a problem where settings like `@JsonSetter(nulls = AS_EMPTY)` were not being applied when the input was `undefined`.