You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@streampipes.apache.org by ri...@apache.org on 2021/05/22 06:53:32 UTC

[incubator-streampipes] 02/02: [STREAMPIPES-245] Avoid NullPointerException in production config

This is an automated email from the ASF dual-hosted git repository.

riemer pushed a commit to branch dev
in repository https://gitbox.apache.org/repos/asf/incubator-streampipes.git

commit 3a18374427b1dcf2f366d62523800585b12283e3
Author: Dominik Riemer <ri...@fzi.de>
AuthorDate: Sat May 22 08:42:04 2021 +0200

    [STREAMPIPES-245] Avoid NullPointerException in production config
---
 .../streampipes/manager/monitoring/pipeline/TopicInfoCollector.java  | 5 ++++-
 1 file changed, 4 insertions(+), 1 deletion(-)

diff --git a/streampipes-pipeline-management/src/main/java/org/apache/streampipes/manager/monitoring/pipeline/TopicInfoCollector.java b/streampipes-pipeline-management/src/main/java/org/apache/streampipes/manager/monitoring/pipeline/TopicInfoCollector.java
index a10582a..0e7378d 100644
--- a/streampipes-pipeline-management/src/main/java/org/apache/streampipes/manager/monitoring/pipeline/TopicInfoCollector.java
+++ b/streampipes-pipeline-management/src/main/java/org/apache/streampipes/manager/monitoring/pipeline/TopicInfoCollector.java
@@ -195,7 +195,10 @@ public class TopicInfoCollector {
 
   private String getBrokerUrl() {
     String env = System.getenv("SP_DEBUG");
-    if ("true".equals(env.replaceAll(" ", ""))) {
+    if (env != null) {
+      env = env.replaceAll(" ", "");
+    }
+    if ("true".equals(env)) {
       return "localhost:9094";
     } else {
       return BackendConfig.INSTANCE.getKafkaUrl();