Skip to content
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

Allow primitive array deserializer to be captured by DeserializerModifier #4219

Merged
merged 4 commits into from
Nov 26, 2023

Conversation

JooHyukKim
Copy link
Member

fixes #4216

package com.fasterxml.jackson.databind.deser;

import static com.fasterxml.jackson.databind.BaseMapTest.jsonMapperBuilder;
import static junit.framework.TestCase.assertEquals;
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Can use you use org.junit.Asserts?

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

or even use the Jupiter asserts, but put the params in the right order - the ones expected by the Jupiter (actual, expected)

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Ah, thank you for pointing out! Totally missed that.

Copy link
Member Author

@JooHyukKim JooHyukKim Nov 25, 2023

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I was confused, so I looked into org.Junit.Assert.assertEquals(). It actually seems to be declared in exepected, actual order, so current format should be reasonable 🤔. If( not, could you lemme know if there is another Assert?

image

@@ -1348,13 +1348,15 @@ public JsonDeserializer<?> createArrayDeserializer(DeserializationContext ctxt,
if (contentDeser == null) {
Class<?> raw = elemType.getRawClass();
if (elemType.isPrimitive()) {
return PrimitiveArrayDeserializers.forType(raw);
deser = PrimitiveArrayDeserializers.forType(raw);
}
if (raw == String.class) {
Copy link
Member

@cowtowncoder cowtowncoder Nov 26, 2023

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

-> else if? I can change that actually. n/m

@cowtowncoder cowtowncoder merged commit 9f7abad into FasterXML:2.16 Nov 26, 2023
5 checks passed
@JooHyukKim JooHyukKim deleted the Fix-4216- branch November 26, 2023 02:39
dongjoon-hyun pushed a commit to apache/spark that referenced this pull request Dec 27, 2023
### What changes were proposed in this pull request?
This pr aims to upgrade jackson from 2.16.0 to 2.16.1

### Why are the changes needed?
The new version bring some fix:

- [#4200](FasterXML/jackson-databind#4200): JsonSetter(contentNulls = FAIL) is ignored in delegating JsonCreator argument
- [#4216](FasterXML/jackson-databind#4216): Primitive array deserializer not being captured by DeserializerModifier
- [#4219](FasterXML/jackson-databind#4219): JsonNode.findValues() and findParents() missing expected values in 2.16.0

The full release notes as follows:

- https://github.com/FasterXML/jackson/wiki/Jackson-Release-2.16.1

### Does this PR introduce _any_ user-facing change?
No

### How was this patch tested?
Pass Github Actions

### Was this patch authored or co-authored using generative AI tooling?
No

Closes #44494 from LuciferYang/SPARK-46508.

Authored-by: yangjie01 <[email protected]>
Signed-off-by: Dongjoon Hyun <[email protected]>
szehon-ho pushed a commit to szehon-ho/spark that referenced this pull request Aug 7, 2024
This pr aims to upgrade jackson from 2.16.0 to 2.16.1

The new version bring some fix:

- [apache#4200](FasterXML/jackson-databind#4200): JsonSetter(contentNulls = FAIL) is ignored in delegating JsonCreator argument
- [apache#4216](FasterXML/jackson-databind#4216): Primitive array deserializer not being captured by DeserializerModifier
- [apache#4219](FasterXML/jackson-databind#4219): JsonNode.findValues() and findParents() missing expected values in 2.16.0

The full release notes as follows:

- https://github.com/FasterXML/jackson/wiki/Jackson-Release-2.16.1

No

Pass Github Actions

No

Closes apache#44494 from LuciferYang/SPARK-46508.

Authored-by: yangjie01 <[email protected]>
Signed-off-by: Dongjoon Hyun <[email protected]>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants