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 #3624 ALLOW_COERCION_OF_SCALARS allows int->float coercion #3625

Merged
merged 1 commit into from
Oct 13, 2022

Conversation

carterkozak
Copy link
Contributor

Issue reported here: #3624

Existing code which disables MapperFeature.ALLOW_COERCION_OF_SCALARS unexpectedly impacted by #3509 / #3503 which added support for coercionconfig converting from integer-shaped data into float-shaped data. I agree that the ability to control such facets of coercion is fantastic, but I'm not sure that the feature should impact MapperFeature.ALLOW_COERCION_OF_SCALARS for a case that can be considered a valid format in JSON (1 vs 1.0, I would argue both are valid representations of (float) 1).

In an ideal world, I would use the new coercion configuration type, however this is not always possible due to cross-version compatibility requirements. Dependency resolution from 2.13.x to 2.14.0 will potentially cause deserialization to fail unexpectedly.

@cowtowncoder cowtowncoder merged commit 02f8b14 into FasterXML:2.14 Oct 13, 2022
@cowtowncoder cowtowncoder added this to the 2.14.0 milestone Oct 13, 2022
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