When calling XStream.fromXML() to deserialize an object, XStream by default will use ReflectionConverter to populate the fields of the given root object instead of instantiating a new one. To force instantiation of a new object, use
XStream xstream = XStream(new PureJavaReflectionProvider());
Subscribe to:
Post Comments (Atom)
No comments:
Post a Comment