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

Add tests for Record deserialization regression and related #3921

Conversation

JooHyukKim
Copy link
Member

This PR provides all cases (including both regression and work-arounds) mentioned in #3906. Thought it might help for future modification/rewrite of (Record, or property discovery in genenral) that seems to be coming.... 🙏🏼

NOTE: Feel free to close this PR if you think this is unncessary~ ✌️✌️

@JooHyukKim JooHyukKim changed the title Add tests for Recrod deser regression and related Add tests for Record deser regression and related May 8, 2023
@JooHyukKim JooHyukKim changed the title Add tests for Record deser regression and related Add tests for Record deserialization regression and related May 8, 2023
}

public void testEmptyJsonToRecordUsingModuleOther() throws JsonProcessingException {
ObjectMapper mapper = newJsonMapper().registerModule(new SimpleModule() {
Copy link
Member

Choose a reason for hiding this comment

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

Could you change this to use mapperBuilder() instead? That way it'll merge cleanly into master.

Copy link
Member Author

Choose a reason for hiding this comment

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

Changed all newJsonMapper().registerModule()... to jsonMapperBuilder().addModule().build(). Thank you 🙏🏼

Copy link
Member Author

Choose a reason for hiding this comment

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

Could you change this to use mapperBuilder() instead? That way it'll merge cleanly into master.

Hopefully jsonMapperBuilder() is what you meant, @cowtowncoder ?

Copy link
Member

Choose a reason for hiding this comment

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

Right, that one :)

@JooHyukKim JooHyukKim requested a review from cowtowncoder May 21, 2023 03:43
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.

Ok I think this works as the base, will merge. Thanks!

@cowtowncoder cowtowncoder merged commit 228bc0e into FasterXML:2.15 May 22, 2023
@JooHyukKim JooHyukKim deleted the 3906-Add-tests-for-regression-and-to-prepare-for-rewrite branch May 22, 2023 14:00
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.

2 participants