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 { ...@@ -119,15 +119,19 @@ public final class ComputingElement extends Thread {
logger.info("Building new SiteMap."); logger.info("Building new SiteMap.");
try { try {
config = ConfigUtils.getConfigFromLdap(); final HashMap<String, Object> newConfig = ConfigUtils.getConfigFromLdap();
site = (String) config.get("site_accountname"); if (newConfig != null) {
getSiteMap(); config = newConfig;
logger.info("New sitemap: "); site = (String) config.get("site_accountname");
getSiteMap();
siteMap.forEach((field, entry) -> { logger.info("New sitemap: ");
logger.info("[" + field + ": " + entry + "]");
}); siteMap.forEach((field, entry) -> {
logger.info("[" + field + ": " + entry + "]");
});
}
} }
catch (Exception ex) { catch (Exception ex) {
logger.log(Level.WARNING, "Error syncing with LDAP: ", 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