-
-
Notifications
You must be signed in to change notification settings - Fork 1.4k
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
Fix wrapped array hanlding wrt null
by StdDeserializer
#4844
Fix wrapped array hanlding wrt null
by StdDeserializer
#4844
Conversation
public static class StringWrapper { | ||
public String value; | ||
} |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
declarations should go top
public void testDeserializeArrayWithNullElement() throws IOException { | ||
String json = "{\"value\": [null]}"; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Formatting + Exception is sort of convention now
public void testDeserializeArrayWithNullElement() throws IOException { | |
String json = "{\"value\": [null]}"; | |
public void testDeserializeArrayWithNullElement() | |
throws Exception | |
{ | |
String json = "{\"value\": [null]}"; |
src/test/java/com/fasterxml/jackson/databind/struct/UnwrapSingleArrayMiscTest.java
Outdated
Show resolved
Hide resolved
Minor suggestions, looks clean tho |
Thank you @glorrian! This is fix is correct: Aside from suggestions @JooHyukKim gave, one and only process thing we have is that we need to get CLA: https://github.com/FasterXML/jackson/blob/master/contributor-agreement.pdf (unless you have earlier sent one; CLA only needs to be sent once and is good for all contributions) The easiest way is usually to print the doc, fill & sign, scan/photo, email to Once I get it (or find existing one) I'm happy to merge this. I can also backport this in 2.18(.3) since it seems pretty safe to me. Thank you again! |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Added comment wrt import ordering, thanks!
src/test/java/com/fasterxml/jackson/databind/struct/UnwrapSingleArrayMiscTest.java
Outdated
Show resolved
Hide resolved
hi, thank y'all for review, i sent my cla to clas at fasterxml dot com from glorrian55 at yandex dot ru, hope you'll receive it. |
@JooHyukKim all your suggestions is completed |
LGMT! Thank u @glorrian |
Thanks for tracking this down! |
@glorrian Unfortunately I don't see CLA. If you used "clas", it needs to be "cla", so:
(or Could you try re-sending? |
@cowtowncoder i try to send from different mail to info and cla both, check it pls |
@glorrian Got it now, thanks! |
null
by StdDeserializer
Merged, thank you @glorrian for the report & fix! |
Motivation: We encountered a bug in Micronaut Framework, when json parsing was rewritten so that any value is wrapped in an array(micronaut-projects/micronaut-core#10070) for the convenience of parsing multi values with one key, then the behavior when parsing null values began to throw an error, because jackson does not handle VALUE_NULL cases separately when parsing from a wrapped array. this pr is needed to fix this.
fix issue: micronaut-projects/micronaut-core#11420