Skip to content

Honor xsi:nil in any attribute position and xs:boolean form - #888

Open
Sahana2524 wants to merge 1 commit into
FasterXML:3.xfrom
Sahana2524:xsi-nil-any-position
Open

Honor xsi:nil in any attribute position and xs:boolean form#888
Sahana2524 wants to merge 1 commit into
FasterXML:3.xfrom
Sahana2524:xsi-nil-any-position

Conversation

@Sahana2524

Copy link
Copy Markdown
Contributor

xsi:nil is only recognized as an element's first attribute
_checkXsiAttributes inspects attribute 0 only, so <price currency="USD" xsi:nil="true"/> deserializes to a populated object while the same element with those two attributes swapped gives null, and in the first form the marker leaks through as a property named nil. Since attribute order carries no meaning in XML and xsi:nil is typed xs:boolean, the lookup now scans the whole attribute list and accepts the other true forms, with the marker itself still hidden wherever it sits.

@github-actions

Copy link
Copy Markdown

🧪 Code Coverage Report

Metric Coverage Change
Instructions coverage 73.69% 📈 +0.060%
Branches branches 68.49% 📈 +0.090%

Coverage data generated from JaCoCo test results

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.

1 participant