You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@tubemq.apache.org by go...@apache.org on 2020/05/13 03:24:20 UTC

[incubator-tubemq] 03/07: [TUBEMQ-59] Null pointer exception is thrown while constructing ConsumerConfig with MasterInfo, while directly using String is ok (#46)

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

gosonzhang pushed a commit to branch release-0.3.0
in repository https://gitbox.apache.org/repos/asf/incubator-tubemq.git

commit 7f516c1a14df5fc7a42492287e39b92bd3803f72
Author: Tboy <gu...@immomo.com>
AuthorDate: Wed Apr 8 23:30:21 2020 +0800

    [TUBEMQ-59] Null pointer exception is thrown while constructing ConsumerConfig with MasterInfo, while directly using String is ok (#46)
---
 .../src/main/java/org/apache/tubemq/corebase/cluster/MasterInfo.java    | 2 ++
 1 file changed, 2 insertions(+)

diff --git a/tubemq-core/src/main/java/org/apache/tubemq/corebase/cluster/MasterInfo.java b/tubemq-core/src/main/java/org/apache/tubemq/corebase/cluster/MasterInfo.java
index de236db..b82cb05 100644
--- a/tubemq-core/src/main/java/org/apache/tubemq/corebase/cluster/MasterInfo.java
+++ b/tubemq-core/src/main/java/org/apache/tubemq/corebase/cluster/MasterInfo.java
@@ -100,6 +100,8 @@ public class MasterInfo {
             }
             this.addrMap4Failover.put(entry.getKey(), entry.getValue());
         }
+        this.nodeHostPortList = new ArrayList<String>(addrMap4Failover.size());
+        this.nodeHostPortList.addAll(addrMap4Failover.keySet());
         this.firstNodeAddr = firstNodeAddr;
         this.masterClusterStr = masterClusterStr;
     }