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 #807 by enabling MapperFeature.ALLOW_FINAL_FIELDS_AS_MUTATORS on selected tests #811

Merged
merged 2 commits into from
Jun 23, 2024

Conversation

cowtowncoder
Copy link
Member

No description provided.

@cowtowncoder
Copy link
Member Author

@k163377 @JooHyukKim here are changes to work around the issues. But tests suggest that there are many cases where forcing setting of final Fields is expected for Kotlin usage. Ideally this should not be required as JVM may well stop allowing this to be done; plus, usually value should be passed through constructor anyway.
Unfortunately I wasn't able to really properly fix any of failing tests in that regard.

@JooHyukKim
Copy link
Member

Unfortunately I wasn't able to really properly fix any of failing tests in that regard.

Yeah the handling of final fields seems to be required of Kotlin module at the moment. I also failed to come up with module-level solution that we can integrate into pre-Jackson 3.

This issue may be a blocker problem- Jackson 3 🤔

@cowtowncoder
Copy link
Member Author

cowtowncoder commented Jun 23, 2024

@JooHyukKim it is a concern yes. But I think we are ok for now -- change in defaults is not causing an issue as much as exposing it, I think (one really should not modify final field values).

@cowtowncoder cowtowncoder merged commit 89f251b into master Jun 23, 2024
15 checks passed
@cowtowncoder cowtowncoder deleted the tatu/3.0/807-fix-tests-wrt-immutable-fields branch June 23, 2024 19:27
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