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鈥檒l 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 :)

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
4 checks passed
@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.

None yet

2 participants