Skip to content

Commit

Permalink
JAMES-2575 return cause as Optional
Browse files Browse the repository at this point in the history
  • Loading branch information
mschnitzler authored and chibenwa committed Oct 31, 2018
1 parent b89b347 commit 6056239
Showing 1 changed file with 4 additions and 3 deletions.
Expand Up @@ -19,6 +19,8 @@

package org.apache.james.webadmin.dto;

import java.util.Optional;

import org.apache.james.core.healthcheck.Result;

import com.fasterxml.jackson.annotation.JsonPropertyOrder;
Expand Down Expand Up @@ -46,9 +48,8 @@ public String getStatus() {
return healthCheckResult.getStatus().toString();
}

public String getCause() {
return healthCheckResult.getCause()
.orElse(null);
public Optional<String> getCause() {
return healthCheckResult.getCause();
}

}

0 comments on commit 6056239

Please sign in to comment.