-
-
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
Create reproducer test case for #509 #604
Conversation
Test Result:
|
...test/java/com/fasterxml/jackson/dataformat/xml/deser/UnexpectedNonWhitespaceText509Test.java
Outdated
Show resolved
Hide resolved
This adds two additional test cases. Those tests attempt to deserialize the two classes Data and MetaData. The MetaData class simply contains a list of Data objects. The Data class contains a "key", which is derived from the attribute of the XML node, and a "content" list, which is the arbitrary data stored inside that node.
Here's also the updated test run + stack trace. com.fasterxml.jackson.dataformat.xml.deser.UnexpectedNonWhitespaceText509Test.txt |
Ok: one quick note -- this is bit problematic as it has JAXB/Jakarta-RS annotations, which are only supported when appropriate module is registered, which is not done here. But it also ideally should be avoided as XML module does not have direct dependency to JAXB/Jakarta-RS annotations module; we do have test dep to JAXB one but not the other yet. It'd be good to instead use Jackson annotations as there are equivalents for all annotations that are supported. I hope to have time to look into this. |
Ok seems to use Java 9 methods too, will need to modify a bit. |
Ok this is not supportable at all: Jackson does not support concept of "any" XML content that With 2.16.0-SNAPSHOT I do get exception for mismatched property, which relates to textual content within What can be done is that whole I will close this PR and will see whether #509 itself is worth investigating. |
Hmmh. Actually I take this back. After using |
Ok, I think the problem is not the assertion with exception, but state handling; text segment should be handled same as within regular Object; it is not directly within Array context. |
This adds two additional test cases to reproduce #509. Those tests attempt to deserialize the two classes Data and MetaData.
The MetaData class simply contains a list of Data objects. The Data class contains a "key", which is derived from the attribute of the XML node, and a "content" list, which is the arbitrary data stored inside that node.