This blog is about issue in parsing int data from an xml.
While working with XStream I experienced a problem, if the xml comprises an int data beginning from 0 XStream was throwing an Exception ConversionException. On digging deeper I patterned out that the converter(IntConverter) used to convert the string value into corresponding integer value was causing problem. If the string had 0 as prefix then that string is treated as an octal value and it try to decode it as an octal value. That's why when a value such as 089 is processed by this converter, the converter processed that value as an octal and tried to decode it and since 8 & 9 are not in octal base that's why converter was throwing this exception. To get the better of this problem you can either have the numeric values in xml without following 0s or you can write your own converter.
A blog site on our Real life experiences with various phases of DevOps starting from VCS, Build & Release, CI/CD, Cloud, Monitoring, Containerization
Subscribe to:
Post Comments (Atom)
Git Inside Out
Git Inside-Out Git is basically a file-system where you can retrieve your content through addresses. It simply means ...


Popular Posts
-
When ssh: connect to host ip_address port 22 Connection refused Unable to access server??? Exactly when you see the error - “ s...
-
Introduction As a DevOps I need a smooth way to release the java application, so I compared two maven plugin that are used to release th...
-
This blog talks about the two possible ways of hosting your infrastructure in Cloud, though it will be more close to hosting on AWS as it ...

No comments:
Post a Comment