Skip to content

Commit

Permalink
Merge pull request #104 from svkm102/master
Browse files Browse the repository at this point in the history
Changed health details object from String to Map for LdapCRUDController
  • Loading branch information
derek63 committed Sep 11, 2017
2 parents 8152ef4 + 4097f1e commit d168ca3
Showing 1 changed file with 2 additions and 6 deletions.
Expand Up @@ -539,16 +539,12 @@ public CRUDHealth checkHealth() {
Map<String, Object> details = new LinkedHashMap<>();

for (Map.Entry<String, Object> connectionStatus : ldapConnnectionsStatus.entrySet()) {

if (connectionStatus.getValue() instanceof LDAPException) {
isHealthy = false;
details.put("LDAPException", new StringBuilder("LDAPConnection [DatabaseName: ").append(connectionStatus.getKey())
.append(", Status: ").append(connectionStatus.getValue()).toString());
details.put(connectionStatus.getKey(), connectionStatus.getValue());
} else {
isHealthy = (Boolean) connectionStatus.getValue();

details.put("exception", new StringBuilder("LDAPConnection [DatabaseName: ").append(connectionStatus.getKey())
.append(", Status: ").append(connectionStatus.getValue()).toString());
details.put(connectionStatus.getKey(), connectionStatus.getValue());
}
}
return new CRUDHealth(isHealthy, details);
Expand Down

0 comments on commit d168ca3

Please sign in to comment.