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

Fixed so that KeyDeserializer set by annotation is not overwritten by KeyDeserializer set in the mapper #4929

Merged
merged 8 commits into from
Jan 26, 2025

Conversation

k163377
Copy link
Contributor

@k163377 k163377 commented Jan 26, 2025

This is a fix for #4444 and is also relevant to FasterXML/jackson-module-kotlin#777 .

Copy link
Member

@JooHyukKim JooHyukKim left a comment

Choose a reason for hiding this comment

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

Seems like we have some problem with jdk8?

Other than that changes seem reasonable! 👍🏼 @k163377

@k163377
Copy link
Contributor Author

k163377 commented Jan 26, 2025

Seems like we have some problem with jdk8?

Fixed
37ddcf9

@@ -0,0 +1,65 @@
package com.fasterxml.jackson.databind.deser;
Copy link
Member

Choose a reason for hiding this comment

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

Even more specifically, Map-key deserialization tests are under com.fasterxml.jackson.databind.deser.jdk like existing MapKeyDeserialization3143Test

Copy link
Member

Choose a reason for hiding this comment

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

I can move the test.

@cowtowncoder
Copy link
Member

cowtowncoder commented Jan 26, 2025

---Ok this seems like something that could easily break usage (I don't trust our test coverage in this area), so let's change PR to be against 2.19 branch.---

EDIT: Actually, never mind: this looks like a safe fix -- can go in 2.18

};

@Test
void withoutForClass() throws JsonProcessingException {
Copy link
Member

Choose a reason for hiding this comment

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

Let's use throws Exception, going forward, just so merging to master is easier (exceptions are renamed plus no longer extend IOException).

Copy link
Member

@cowtowncoder cowtowncoder left a comment

Choose a reason for hiding this comment

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

LGTM: precedence of annotation-lookup must be higher than module provided ones.

@cowtowncoder cowtowncoder merged commit b1a61bb into FasterXML:2.18 Jan 26, 2025
9 checks passed
@k163377 k163377 deleted the key-deser branch February 2, 2025 04:54
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants