Skip to content

Changed the base class of MissingKotlinParameterException to InvalidNullException #884

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 2 commits into from
Jan 18, 2025
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions release-notes/CREDITS-2.x
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
3 changes: 3 additions & 0 deletions release-notes/VERSION-2.x
Original file line number Diff line number Diff line change
Expand Up @@ -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`.
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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

Expand Down Expand Up @@ -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)"),
Expand Down