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 #643: Add ToXmlGenerator.Feature or allowing XML Schema/JAXB compatible Infinity representation #644

Merged
merged 2 commits into from
Mar 13, 2024

Conversation

ahcodedthat
Copy link
Contributor

This PR adds a ToXmlGenerator.Feature to use XML Schema-compatible representation for floating-point infinity.

Fixes #643.

*<p>
* Feature is disabled by default for backwards compatibility.
*/
XML_SCHEMA_CONFORMING_FLOATS(false),
Copy link
Member

Choose a reason for hiding this comment

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

Pretty good but maybe add WRITE_ prefix to go along with existing WRITE_NULLS_AS_XSI_NIL?

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.

Looks good; added some minor suggestions to change.

@cowtowncoder
Copy link
Member

@ahcodedthat Excellent, looks good, I like the implementation.

One process thing before I can merge this: if we do not yet have CLA from you (one is enough for all contributions so this is needed just once), we'd need one from:

https://github.com/FasterXML/jackson/blob/master/contributor-agreement.pdf

(there's also corporate CLA as an alterative if preferred).

It is usually easiest to print, fill & sign, scan/photo, email to cla at fasterxml dot com.

Once I have it, can proceed with merge and this should nicely get into 2.17.0 as one of the (if not the :)) last feature to be included.

Looking forward to merging this nice addition; thank you again for submitting it!

@cowtowncoder
Copy link
Member

cowtowncoder commented Mar 12, 2024

Hoping to get CLA resolved by tomorrow as I will need to proceed with 2.17.0 release.
Would not matter otherwise -- often things can go in patches -- but this is API change (addition) so needs to go in a minor release as per SemVer.

@cowtowncoder cowtowncoder changed the title Fix #643 Fix #643: Add ToXmlGenerator.Feature or allowing XML Schema/JAXB compatible Infinity representation Mar 12, 2024
@cowtowncoder cowtowncoder merged commit be5e719 into FasterXML:2.17 Mar 13, 2024
4 checks passed
@cowtowncoder cowtowncoder added the 2.17 Issues planned at earliest for 2.17 label Mar 13, 2024
@cowtowncoder cowtowncoder added this to the 2.17.0 milestone Mar 13, 2024
@ahcodedthat
Copy link
Contributor Author

Sorry for the delay! I just sent the filled-out CLA.

@cowtowncoder
Copy link
Member

Thank you @ahcodedthat for sending CLA -- I was counting on it getting done soon so it made it in 2.17! :)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
2.17 Issues planned at earliest for 2.17
Projects
None yet
Development

Successfully merging this pull request may close these issues.

XML serialization of floating-point infinity is incompatible with JAXB and XML Schema
2 participants