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 2023/03/22 08:17:23 UTC

[camel] branch main updated: camel-jbang - Fix potential NPE

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 5c2c2219534 camel-jbang - Fix potential NPE
5c2c2219534 is described below

commit 5c2c22195344f16e2c640e3d26e4c9064b2557d3
Author: Claus Ibsen <cl...@gmail.com>
AuthorDate: Wed Mar 22 09:16:58 2023 +0100

    camel-jbang - Fix potential NPE
---
 .../src/main/java/org/apache/camel/cli/connector/LocalCliConnector.java | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/dsl/camel-cli-connector/src/main/java/org/apache/camel/cli/connector/LocalCliConnector.java b/dsl/camel-cli-connector/src/main/java/org/apache/camel/cli/connector/LocalCliConnector.java
index ac1bd4e48e4..e2172bde9ab 100644
--- a/dsl/camel-cli-connector/src/main/java/org/apache/camel/cli/connector/LocalCliConnector.java
+++ b/dsl/camel-cli-connector/src/main/java/org/apache/camel/cli/connector/LocalCliConnector.java
@@ -432,7 +432,7 @@ public class LocalCliConnector extends ServiceSupport implements CliConnector, C
                             return jo.getLong("uid") <= traceFilePos;
                         });
                     }
-                    if (!arr.isEmpty()) {
+                    if (arr != null && !arr.isEmpty()) {
                         // store traces in a special file
                         LOG.trace("Updating trace file: {}", traceFile);
                         String data = json.toJson() + System.lineSeparator();