DecerializationProblemHandler
is ignored when the input is invalid null
in KotlinValueInstantiator
#875
Labels
DecerializationProblemHandler
is ignored when the input is invalid null
in KotlinValueInstantiator
#875
This is an issue regarding the following comment.
#806 (comment)
Currently
KotlinValueInstantiator.createFromObjectWith
throws an exception directly if the input is an illegalnull
.https://github.com/FasterXML/jackson-module-kotlin/blob/9d4ad6a5e85bc5eb58f69700199c7cee776d2f86/src/main/kotlin/com/fasterxml/jackson/module/kotlin/KotlinValueInstantiator.kt
On the other hand,
databind
callsDeserializationContext.handleInstantiationProblem
(DeserializationProblemHandler.handleInstantiationProblem
).https://github.com/FasterXML/jackson-databind/blob/f624751d3c4c13405c8d07051b8954a691f265f7/src/main/java/com/fasterxml/jackson/databind/deser/std/StdValueInstantiator.java#L284-L295
Therefore,
KotlinValueInstantiator
should be modified as followsparamVal
is an illegalnull
, callDeserializationContext.handleInstantiationProblem
Note that the error caused by
strictNullCheck
is assumed to be excluded from the correction because the process will be eliminated fromKotlinValueInstantiator
when the #719 correction is made.The text was updated successfully, but these errors were encountered: