This is an automated email from the ASF dual-hosted git repository.
davsclaus pushed a commit to branch main
in repository https://gitbox.apache.org/repos/asf/camel.git
The following commit(s) were added to refs/heads/main by this push:
new 59b48860704 camel-console - Polished
59b48860704 is described below
commit 59b48860704bd89e3c29c8074444308e91a7ad1b
Author: Claus Ibsen <[email protected]>
AuthorDate: Thu Oct 20 19:54:01 2022 +0200
camel-console - Polished
---
.../main/java/org/apache/camel/impl/console/HealthDevConsole.java | 7 +++++--
1 file changed, 5 insertions(+), 2 deletions(-)
diff --git
a/core/camel-console/src/main/java/org/apache/camel/impl/console/HealthDevConsole.java
b/core/camel-console/src/main/java/org/apache/camel/impl/console/HealthDevConsole.java
index 340db067616..727f86360b7 100644
---
a/core/camel-console/src/main/java/org/apache/camel/impl/console/HealthDevConsole.java
+++
b/core/camel-console/src/main/java/org/apache/camel/impl/console/HealthDevConsole.java
@@ -50,8 +50,11 @@ public class HealthDevConsole extends AbstractDevConsole {
if (ok) {
sb.append(String.format("\n %s: %s",
res.getCheck().getId(), res.getState()));
} else {
- String msg = res.getMessage().orElse("");
- sb.append(String.format("\n %s: %s (%s)",
res.getCheck().getId(), res.getState(), msg));
+ if (res.getMessage().isPresent()) {
+ sb.append(String.format("\n %s: %s (%s)",
res.getCheck().getId(), res.getState(), res.getMessage()));
+ } else {
+ sb.append(String.format("\n %s: %s",
res.getCheck().getId(), res.getState()));
+ }
Throwable cause = res.getError().orElse(null);
if (cause != null) {
StringWriter sw = new StringWriter();