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/04/08 15:30:28 UTC

[incubator-tubemq] branch master updated: [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 master
in repository https://gitbox.apache.org/repos/asf/incubator-tubemq.git


The following commit(s) were added to refs/heads/master by this push:
     new 9be8903  [TUBEMQ-59] Null pointer exception is thrown while constructing ConsumerConfig with MasterInfo, while directly using String is ok (#46)
9be8903 is described below

commit 9be89030e3a18eca9b8fd91f07151a28f81957c4
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;
     }