public void changeConfig(ODocument document) {
ODocument oldConfig = configuration;
configuration = document;
try {
writeConfiguration();
<BUG>} catch (IOException e) {
OException.wrapException(new OConfigurationException("Cannot Write Mail configuration file '" + configFile
</BUG>
+ "'. Restoring old configuration."), e);
<BUG>configuration = oldConfig;</BUG>
}
configure();
}
}

public void changeConfig(ODocument document) {
ODocument oldConfig = configuration;
configuration = document;
try {
writeConfiguration();
} catch (IOException e) {
configuration = oldConfig;
throw OException.wrapException(new OConfigurationException("Cannot Write Mail configuration file '" + configFile
+ "'. Restoring old configuration."), e);
