You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@ignite.apache.org by ak...@apache.org on 2019/01/22 10:09:52 UTC

[ignite] branch master updated: IGNITE-11018 Fixed NPE.

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

akuznetsov pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/ignite.git


The following commit(s) were added to refs/heads/master by this push:
     new 7eb3ef8  IGNITE-11018 Fixed NPE.
7eb3ef8 is described below

commit 7eb3ef8b6a8e017a11427a52d261ad44e4c8ee12
Author: Vasiliy Sisko <vs...@gridgain.com>
AuthorDate: Tue Jan 22 17:08:54 2019 +0700

    IGNITE-11018 Fixed NPE.
---
 .../internal/visor/node/VisorCacheRebalanceCollectorTask.java     | 8 ++++++--
 1 file changed, 6 insertions(+), 2 deletions(-)

diff --git a/modules/core/src/main/java/org/apache/ignite/internal/visor/node/VisorCacheRebalanceCollectorTask.java b/modules/core/src/main/java/org/apache/ignite/internal/visor/node/VisorCacheRebalanceCollectorTask.java
index 9d0e041..4ed373b 100644
--- a/modules/core/src/main/java/org/apache/ignite/internal/visor/node/VisorCacheRebalanceCollectorTask.java
+++ b/modules/core/src/main/java/org/apache/ignite/internal/visor/node/VisorCacheRebalanceCollectorTask.java
@@ -173,9 +173,13 @@ public class VisorCacheRebalanceCollectorTask extends VisorMultiNodeTask<VisorCa
 
                 Collection<? extends BaselineNode> baseline = cluster.currentBaselineTopology();
 
-                boolean inBaseline = baseline.stream().anyMatch(n -> consistentId.equals(n.consistentId()));
+                if (baseline != null) {
+                    boolean inBaseline = baseline.stream().anyMatch(n -> consistentId.equals(n.consistentId()));
 
-                res.setBaseline(inBaseline ? NODE_IN_BASELINE : NODE_NOT_IN_BASELINE);
+                    res.setBaseline(inBaseline ? NODE_IN_BASELINE : NODE_NOT_IN_BASELINE);
+                }
+                else
+                    res.setBaseline(BASELINE_NOT_AVAILABLE);
             }
             else
                 res.setBaseline(BASELINE_NOT_AVAILABLE);