You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@camel.apache.org by da...@apache.org on 2022/07/27 08:47:30 UTC

[camel] branch main updated: Potential NPE in health check

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 dd476909827 Potential NPE in health check
dd476909827 is described below

commit dd476909827fcf723d2811b8b0fb8764838fd8a1
Author: Claus Ibsen <cl...@gmail.com>
AuthorDate: Wed Jul 27 10:46:26 2022 +0200

    Potential NPE in health check
---
 .../src/main/java/org/apache/camel/main/http/VertxHttpServer.java      | 3 +++
 1 file changed, 3 insertions(+)

diff --git a/dsl/camel-kamelet-main/src/main/java/org/apache/camel/main/http/VertxHttpServer.java b/dsl/camel-kamelet-main/src/main/java/org/apache/camel/main/http/VertxHttpServer.java
index 0d31b7b6af4..b1d20a26870 100644
--- a/dsl/camel-kamelet-main/src/main/java/org/apache/camel/main/http/VertxHttpServer.java
+++ b/dsl/camel-kamelet-main/src/main/java/org/apache/camel/main/http/VertxHttpServer.java
@@ -420,6 +420,9 @@ public final class VertxHttpServer {
             while (it.hasNext()) {
                 String k = it.next();
                 Object v = d.getDetails().get(k);
+                if (v == null) {
+                    v = ""; // in case of null value
+                }
                 boolean last = !it.hasNext();
                 sb.append("                 \"").append(k).append("\": \"").append(v).append("\"");
                 if (!last) {