xmlFactory = xmlFactoryCached;
if (xmlFactory == null) {
xmlFactoryCached = xmlFactory = new XmlFactory();
}
JacksonXmlModule xmlModule = null;
NoMappingJsonFactoryObjectFactory.configureInputDecoratorAndOutputDecorator(xmlFactory, environment);
final Object xmlTextElementName = environment.get("xmlTextElementName");
if (xmlTextElementName != null) {
xmlModule = new JacksonXmlModule();
xmlModule.setXMLTextElementName((String) xmlTextElementName);
}
final Object defaultUseWrapper = environment.get("defaultUseWrapper");
if (defaultUseWrapper != null) {
if (defaultUseWrapper.equals("false")) {
if (xmlModule == null) {
xmlModule = new JacksonXmlModule();
}
xmlModule.setDefaultUseWrapper(false);
} else if (defaultUseWrapper.equals("true")) {
//default value is already true, so nothing to do
} else {
throw SupportMessages.MESSAGES.invalidReaderWriterProperty(null, (String) defaultUseWrapper, "defaultUseWrapper");
}