return config;
}
}
try {
DefaultConfigurationBuilder builder = new DefaultConfigurationBuilder(name);
builder.clearErrorListeners();
builder.addErrorListener(new ConfigurationErrorListener() {
@Override
public void configurationError(ConfigurationErrorEvent event) {
if (event.getType() == DefaultConfigurationBuilder.EVENT_ERR_LOAD_OPTIONAL) {
LOG.debug("Could not load optional configuration file {}", event.getPropertyName(),
event.getCause());
} else {
LOG.warn("Configuration error on {}", event.getPropertyName(), event.getCause());
}
}
});
config = builder.getConfiguration(true);
buffer.put(name, config);
} catch (ConfigurationException e) {
LOG.error("Cannot load configuration {}", e, name);
}
return config;