SimpleXML is quite old and outdated. And it would be nice to switch to another XML bindings such as Jackson/JAXP but all of them doesn't allow xml string mutation required for property values substitutions (e.g. <executableName>${app.executable}</executableName>)
Root case:
SimpleXML issue: it allows unexpected tags to be present while parsing list, this caused side effect like empty text tags or null objects inserted into the list, for example
(also includes changes from https://github.com/MobiVM/robovm/pull/729)
NP
SimpleXML is quite old and outdated. And it would be nice to switch to another XML bindings such as Jackson/JAXP but all of them doesn't allow xml string mutation required for property values substitutions (e.g.
<executableName>${app.executable}</executableName>
)Root case:
SimpleXML issue: it allows unexpected tags to be present while parsing list, this caused side effect like empty text tags or null objects inserted into the list, for example
would result in (null, "aaaa") in list (beside the fact that structure is wrong)
The fix
General approach for a workaround is change List field type to custom POJO and make its serialization strict: E.g. instead of
list wrapper class to be used:
list wrapper class expected to be @root with strict = true, so unexpected tags will cause exception