XStream Zero length string

classic Classic list List threaded Threaded
1 message Options
Reply | Threaded
Open this post in threaded view

XStream Zero length string

This post has NOT been accepted by the mailing list yet.
This post was updated on .
Hello, I receive an XML stream from the server and sometimes it happens that a tag is empty. This form:

When XStream reads this tag, there is an exception that starts:
Caused by: com.thoughtworks.xstream.converters.ConversionException: Zero length string: Zero length string

---- Debugging information ---- Post: Zero length string because-exception: java.lang.NumberFormatException Because-Post: Zero length string Class: java.lang.Integer required standard: java.lang.Integer converter deviation: com.thoughtworks.xstream.converters.SingleValueConverterWrapper wrapped-converter: com.thoughtworks.xstream.converters.basic.IntConverter path: / prestashop / category / id_parent class [1] xml.models.test.Category converter deviation [1] com.thoughtworks.xstream.converters.reflection.ReflectionConverter class [2]: xml.models.test.Prestashop Version: null

I have read many post about this problem and I have not found answers. I know you can hide the element with @ XStreamOmitField but it does not solve my problem. Should there be a converter to solve this problem? Thank you for your help