-
-
Notifications
You must be signed in to change notification settings - Fork 1.4k
In CollectionDeserializer
, JsonSetter.contentNulls
is sometimes ignored
#5139
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
Comments
Hmmmh. I am not quite sure, this is unfortunately... not clear cut. The problem is actually with coercion of empty String into But I can see how it's problem for end users. Big problem tho is that now we have tons of places where check needs to be done twice: first for input At the same time, although ideally coercion would not be done in cases where So perhaps it is necessary to apply |
Fixed for inclusion 2.19.1 (and 3.0.0) |
Search before asking
Describe the bug
There seems to be a problem with the following code
jackson-databind/src/main/java/com/fasterxml/jackson/databind/deser/std/CollectionDeserializer.java
Lines 409 to 423 in 896c1cf
Jackson
may deserialize empty characters in an array onJSON
tonull
.In this case,
JsonToken
will beVALUE_STRING
instead ofVALUE_NULL
.On the other hand, in the code presented,
Nulls.SKIP
andNulls.FAIL
are only applied if it isVALUE_NULL
.(To be precise,
Nulls.SKIP
works. However, it seems that the decision regarding_skipNullValues
is being made in two places, which I feel should be improved).Version Information
2.19.0
Reproduction
Expected behavior
The
JsonSetter.contentNulls
must function properly.Additional context
This was discovered by a bug report to
kotlin-module
.FasterXML/jackson-module-kotlin#976
The text was updated successfully, but these errors were encountered: