JAMES-2575 return cause as Optional

Project: http://git-wip-us.apache.org/repos/asf/james-project/repo
Commit: http://git-wip-us.apache.org/repos/asf/james-project/commit/60562390
Tree: http://git-wip-us.apache.org/repos/asf/james-project/tree/60562390
Diff: http://git-wip-us.apache.org/repos/asf/james-project/diff/60562390

Branch: refs/heads/master
Commit: 60562390703fe93279fba20e20e87f758afcc9ba
Parents: b89b347
Author: Michael Schnitzler <[email protected]>
Authored: Sat Oct 27 12:07:41 2018 +0200
Committer: Benoit Tellier <[email protected]>
Committed: Wed Oct 31 08:48:29 2018 +0700

----------------------------------------------------------------------
 .../james/webadmin/dto/HealthCheckExecutionResultDto.java     | 7 ++++---
 1 file changed, 4 insertions(+), 3 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/james-project/blob/60562390/server/protocols/webadmin/webadmin-core/src/main/java/org/apache/james/webadmin/dto/HealthCheckExecutionResultDto.java
----------------------------------------------------------------------
diff --git 
a/server/protocols/webadmin/webadmin-core/src/main/java/org/apache/james/webadmin/dto/HealthCheckExecutionResultDto.java
 
b/server/protocols/webadmin/webadmin-core/src/main/java/org/apache/james/webadmin/dto/HealthCheckExecutionResultDto.java
index 4fb3a12..1512cb4 100644
--- 
a/server/protocols/webadmin/webadmin-core/src/main/java/org/apache/james/webadmin/dto/HealthCheckExecutionResultDto.java
+++ 
b/server/protocols/webadmin/webadmin-core/src/main/java/org/apache/james/webadmin/dto/HealthCheckExecutionResultDto.java
@@ -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;
@@ -46,9 +48,8 @@ public class HealthCheckExecutionResultDto {
         return healthCheckResult.getStatus().toString();
     }
     
-    public String getCause() {
-        return healthCheckResult.getCause()
-                                .orElse(null);
+    public Optional<String> getCause() {
+        return healthCheckResult.getCause();
     }
     
 }


---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]

Reply via email to