Map.Entry entry = (Map.Entry)it.next();
factory.setProperty((String)entry.getKey(), entry.getValue());
}
}
StAXDialect dialect = StAXDialectDetector.getDialect(factory.getClass());
return new ImmutableXMLOutputFactory(dialect.normalize(
dialect.makeThreadSafe(factory)));
} finally {
if (savedClassLoader != null) {
Thread.currentThread().setContextClassLoader(savedClassLoader);
}