-
-
Notifications
You must be signed in to change notification settings - Fork 221
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
Deserialization of class inheritance depends on attributes order #242
Comments
Given that you include most pieces, would it be possible to then just add small unit test method that verifies the problem? |
I can simplify the example, but the structure is needed to reproduce.
And the test:
I am not familiar the open-source development process. Could I create a pull request with unsuccessful test-case? |
@khovanskiy Yes, failing test case is fine. There is package |
Failing unit test for issue #242
Two years opened, is there any plan to fix this BUG? It basically prevents usage of polymorphism when parsing XML produced by another party. Which basically prevetns usage of this library :( |
@jimirocks This is an open source projects, so contributions are welcome. I do not think anyone currently is working actively on this issue. As to there being a plan... typical plan for things like this follows a pattern of someone:
At this point there is a reproduction to help with (1). It is also worth noting that there may be more than person doing the steps. If you feel so strongly this should be fixed, perhaps you help fix the problem: or at least figure out what is happening. |
Looking at the problem a bit. So, the underlying trigger is that in passing case An immediate concern is that I'll dig a little more to see what exactly causes discrepancy, and perhaps it can be resolved. |
Some more info: |
Figured out a way to solve the specific problem in this case. |
@cowtowncoder Many thanks for the fix! Also sorry for not reacting while on vacation ... |
@jimirocks Np. Glad I went ahead and problem turned out relatively easy to fix. |
When I try to deserialize this xml, XmlMapper creates empty list of action-elements:
But if I put the type attribute on the first position, the list contains 2 elements.
Parent class Widget:
Child class TransitionWidget:
And its inner class:
Method "getActions" also returns empty list, when type-attribute of widget is missing while defaultImpl is specified.
This is checked with Jackson 2.8.8 and 2.9.0.pr3.
The text was updated successfully, but these errors were encountered: