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 XML deserialization for over-consumption #29

Merged
merged 1 commit into from
May 16, 2024

Conversation

mristin
Copy link
Contributor

@mristin mristin commented May 16, 2024

We read a token too much in unmarshalXxx functions. The bug went unnoticed as all our examples used indented XML, which eclipsed the over-consumption.

In this patch, we remove the unmarshalXxx, as they turn out to be redundant, and use readXxxWithLookahead to appropriately read the tokens without over-consumption.

Fixes #24.

@mristin mristin force-pushed the mristin/Fix-XML-deserialization-for-discriminator branch from 74adb43 to 0c3ecf0 Compare May 16, 2024 14:22
We read a token too much in `unmarshalXxx` functions. The bug went
unnoticed as all our examples used indented XML, which eclipsed the
over-consumption.

In this patch, we remove the `unmarshalXxx`, as they turn out to be
redundant, and use `readXxxWithLookahead` to appropriately read the
tokens without over-consumption.

Fixes #24.
@mristin mristin force-pushed the mristin/Fix-XML-deserialization-for-discriminator branch from 0c3ecf0 to c50225f Compare May 16, 2024 14:24
@mristin mristin merged commit 6620ab1 into main May 16, 2024
1 check passed
@mristin mristin deleted the mristin/Fix-XML-deserialization-for-discriminator branch May 16, 2024 14:28
@impact-merlinzerbe impact-merlinzerbe mentioned this pull request Jun 14, 2024
mristin added a commit that referenced this pull request Jun 19, 2024
This is a patch release concerning the fixes for the bugs revealed in
the field by the pioneer users.

* Ignore attributes prefixed with `xmlns` (#27)
* Fix XML deserialization for over-consumption (#29)
* Return only abstract errors (#30)
@mristin mristin mentioned this pull request Jun 19, 2024
mristin added a commit that referenced this pull request Jun 19, 2024
This is a patch release concerning the fixes for the bugs revealed in
the field by the pioneer users.

* Ignore attributes prefixed with `xmlns` (#27)
* Fix XML deserialization for over-consumption (#29)
* Return only abstract errors (#30)
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.

fails to parse dataSpecificationContent if xml has no line breaks
1 participant