-
-
Notifications
You must be signed in to change notification settings - Fork 222
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
First element in unwrapped XML array is ignored during deserialization to base class #567
Comments
Version 2.11.1 is very old so I would strongly recommend upgrading to a later version, like 2.14.1. |
Yeah, the goal is to migrate to the latest, my point is that the issue was introduced in 2.11.1 and actual for all versions after it, including the latest 2.14.1 |
Ok, as long as it still fail on 2.14.1 that's all I needed; I wasn't sure from the description. Other than that couple of suggestions:
|
I've removed |
Ok. So the issue is likely combination of problems due to use of polymorphism (for both wrapper and Lists elements), unwrapped I don't know how this could have worked in earlier versions, nor exactly what is going on here. But at least there is a test that I will try to add under failing tests of this module. |
Ok, I added a failing test (reproduction) in project so at least there's slightly less set up work for investigation. But I also realized that while I suspect buffering (and inability for token stream to handle "unwrapped" case when reading from buffer) is related, this does look bit different from other failing cases, as there's "first one missing" symptom. |
During Jackson migration, I discovered an issue that looks like a regression in 2.11.1. In this version, the first element in XML array is ignored when I deserialize to the base class.
Output:
Version 2.11.0
Version 2.11.1+
Workarounds:
new XmlMapper().readValue(xmlString, Wrapper.class);
Unofortunately workarounds doesn't suit my needs as this is library code base that is used in many other projects :(
Link to the code in GitHub:
https://github.com/tetradon/jackson-xml-deserialization-issue
The text was updated successfully, but these errors were encountered: