Commit ce401be4 authored by Max's avatar Max
Browse files

Only update config if something's returned

parent 9e2112bb
......@@ -119,15 +119,19 @@ public final class ComputingElement extends Thread {
logger.info("Building new SiteMap.");
try {
config = ConfigUtils.getConfigFromLdap();
site = (String) config.get("site_accountname");
getSiteMap();
final HashMap<String, Object> newConfig = ConfigUtils.getConfigFromLdap();
if (newConfig != null) {
config = newConfig;
logger.info("New sitemap: ");
site = (String) config.get("site_accountname");
getSiteMap();
siteMap.forEach((field, entry) -> {
logger.info("[" + field + ": " + entry + "]");
});
logger.info("New sitemap: ");
siteMap.forEach((field, entry) -> {
logger.info("[" + field + ": " + entry + "]");
});
}
}
catch (Exception ex) {
logger.log(Level.WARNING, "Error syncing with LDAP: ", ex);
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment