Commit af56f9bf authored by Max's avatar Max
Browse files

Catch possible NPE if sync fails

parent 59493223
...@@ -118,15 +118,20 @@ public final class ComputingElement extends Thread { ...@@ -118,15 +118,20 @@ public final class ComputingElement extends Thread {
logger.info("Time to sync with LDAP"); logger.info("Time to sync with LDAP");
logger.info("Building new SiteMap."); logger.info("Building new SiteMap.");
config = ConfigUtils.getConfigFromLdap(); try {
site = (String) config.get("site_accountname"); config = ConfigUtils.getConfigFromLdap();
getSiteMap(); site = (String) config.get("site_accountname");
getSiteMap();
logger.info("New sitemap: "); logger.info("New sitemap: ");
siteMap.forEach((field, entry) -> { siteMap.forEach((field, entry) -> {
logger.info("[" + field + ": " + entry + "]"); logger.info("[" + field + ": " + entry + "]");
}); });
}
catch (Exception ex) {
logger.log(Level.WARNING, "Error syncing with LDAP: ", ex);
}
lastLdapRefresh = System.currentTimeMillis(); lastLdapRefresh = System.currentTimeMillis();
} }
......
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