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

Fix REQUIRE_SETTERS_FOR_GETTERS taking no effect #4257

Merged
merged 8 commits into from
Dec 15, 2023

Conversation

JooHyukKim
Copy link
Member

fixes #736 from way back.

Notes

  • **PR is against 2.16 branch, in case we want to add to 2.16

Comment on lines 397 to 401
return (_ctorParameters != null)
|| (_setters != null)
|| ((_fields != null)
// [databind#736] Fix `REQUIRE_SETTERS_FOR_GETTERS` taking no effect
&& (_fields.isVisible));
Copy link
Member Author

@JooHyukKim JooHyukKim Dec 11, 2023

Choose a reason for hiding this comment

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

It should be that we could deserialize if _fields not null AND is visible (I think... like private field 🤔)

@JooHyukKim JooHyukKim closed this Dec 11, 2023
@JooHyukKim JooHyukKim reopened this Dec 11, 2023
@cowtowncoder
Copy link
Member

@JooHyukKim Makes sense; my only concern is whether this could lead to ignoring some fields that might not be visible but have annotations. But none of test suite fails so I think we should be good.

But I have a feeling this is too risky for 2.16 and would prefer PR against 2.17 instead.

@JooHyukKim JooHyukKim changed the base branch from 2.16 to 2.17 December 12, 2023 23:30
@JooHyukKim
Copy link
Member Author

But I have a feeling this is too risky for 2.16 and would prefer PR against 2.17 instead.

Agreed, and changed base 👍🏼

@cowtowncoder
Copy link
Member

Thank you @JooHyukKim! Will try to get this merged soon (tomorrow).

@cowtowncoder cowtowncoder merged commit 9e147a8 into FasterXML:2.17 Dec 15, 2023
5 checks passed
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.

MapperFeature.REQUIRE_SETTERS_FOR_GETTERS has no effect
2 participants