-
-
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
Input mismatch with case-insensitive properties ('MapperFeature.ACCEPT_CASE_INSENSITIVE_PROPERTIES') #273
Comments
Well seems to be the same case as #255 after a closer look. I suddenly couldn't reproduce by turning case sensitivity on and off. |
Ok, part about case-insensitivity is important to rule out (if possible). I saw a mention of this possibly having to with namespace difference (same local name, diff ns uri); if so, that is (alas) a known problem at this point. But I will see whether XML module has case-insensitive tests at any rate: handling is not trivial so it better be tested. |
I ended up using JAXB but would have preferred to use Jackson due to the Kotlin module which was SUPER awesome. Hopefully, we can fix the bug and then I can switch over 👍 |
@Casz Understandable: purely considering XML part, JAXB is awesome lib/framework, since it started with and focuses solely on XML. I hope this problem (and related) can be solved as well as there's on the other hand lots of potential being able to cross formats, languages and datatypes. |
Ok, I was able to reproduce the issue (and added a failing unit test). Based on that I managed to improve things slightly so that instead of NPE you now get "unexpected end of input" exception. Actual underlying reasons is still unknown and unresolved. I did observe that replace start and end tags of |
Had another look, but still not sure what causes the problem. But since property name matching was rewritten for 3.0, including handling of case-sensitivity, seems likely this might only get fixed for 3.0. |
Having another look at this, finally. I think I know where to look now: chances are this has to do with unwrapped Lists; probably start/end tag matching is not doing case-insensitivity as it should. But the tricky part is, maybe surprisingly, that low-level XML parser (streaming API impl) has no concept of case-insensitivity, yet, all handled (currently) at databind layer. |
Besides the #252 I tried to adapt my XML to nonself-closing, some preprocessing is always good 🃏
Issue is somewhat similar to #255
My XML provider, accurev is not very friendly.
I would very much like to abstract as much XML as possible.
Sadly when case insensitivity is turned on the XML mapper it seems to add a rogue element.
In this case, it treats a "/" as an Element that then needs to chuck through to Depot class but chokes because of a null pointer.
I can easily treat the symptom by adding a null pointer check for JsonToken however I would like to know the root cause.
First element is detected like this:
Second element, notice the nextToken is null
Third rogue context who is apparently child to Element 😕
Full stack trace
The text was updated successfully, but these errors were encountered: