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