Configuration config = _unitTest.getConfiguration();
if (config == null) {
config = _configuration;
}
final Unmarshaller unmar;
if (_mapping != null) {
//J unmar = new Unmarshaller(_mapping);
unmar = getXMLContext().createUnmarshaller();
unmar.setMapping(_mapping);
} else {
if (_test.getClassLoader() != null) {
//J unmar = new Unmarshaller(_rootClass, _test.getClassLoader());
unmar = getXMLContext().createUnmarshaller();
unmar.setClassLoader(_test.getClassLoader());
unmar.setClass(_rootClass);
} else {
//J unmar = new Unmarshaller(_rootClass);
unmar = getXMLContext().createUnmarshaller();
unmar.setClass(_rootClass);
}
}
if (_listener != null
&& _listener instanceof org.exolab.castor.xml.UnmarshalListener
&& _listenerType != TypeType.MARSHAL) {
unmar.setUnmarshalListener((org.exolab.castor.xml.UnmarshalListener)_listener);
}
if (_listener != null
&& _listener instanceof org.castor.xml.UnmarshalListener
&& _listenerType != TypeType.MARSHAL) {
unmar.setUnmarshalListener((org.castor.xml.UnmarshalListener)_listener);
}
unmar.setDebug(_verbose);
if (config != null) {
ConfigurationType unmarshal = config.getUnmarshal();
List returnValues = invokeEnumeratedMethods(unmar, unmarshal);
returnValues.clear(); // We don't care about the return values