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

XML deserialization exception #1512

Closed
tjarls opened this issue Sep 3, 2022 · 0 comments · Fixed by #1511
Closed

XML deserialization exception #1512

tjarls opened this issue Sep 3, 2022 · 0 comments · Fixed by #1511
Labels
needs-triage Needs to be triaged by a developer and assigned a release

Comments

@tjarls
Copy link
Contributor

tjarls commented Sep 3, 2022

Some ComicInfo.xml content triggers exceptions during the deserialization. In two cases I investigated I have found that it was being triggered by an empty Count or Day element.
For example in the following sequence, the empty Count element triggers the bug, because it deserializes into a type int property and the deserialization has no default value to use, while the similarly empty element Number works fine because its target property is of type string.

<ComicInfo>
  <Title>The Right Hand of Doom</Title>
  <Series>Hellboy</Series>
  <Number />
  <Count />
  <Volume>4</Volume>

In order to fix this, all elements that can be empty (minOccurs="0") and that deserialize into a type int property should have a default value.

@tjarls tjarls added the needs-triage Needs to be triaged by a developer and assigned a release label Sep 3, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
needs-triage Needs to be triaged by a developer and assigned a release
Projects
None yet
Development

Successfully merging a pull request may close this issue.

1 participant