You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@lucene.apache.org by ma...@apache.org on 2020/07/16 09:52:04 UTC

[lucene-solr] branch reference_impl updated: @204 - Fix a little NPE bug.

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

markrmiller pushed a commit to branch reference_impl
in repository https://gitbox.apache.org/repos/asf/lucene-solr.git


The following commit(s) were added to refs/heads/reference_impl by this push:
     new 01a7f27  @204 - Fix a little NPE bug.
01a7f27 is described below

commit 01a7f27836b2c02ec903c10653f06c9ec0f5dfa3
Author: markrmiller@gmail.com <ma...@gmail.com>
AuthorDate: Thu Jul 16 04:51:51 2020 -0500

    @204 - Fix a little NPE bug.
---
 solr/core/src/java/org/apache/solr/cloud/ZkController.java | 4 +++-
 1 file changed, 3 insertions(+), 1 deletion(-)

diff --git a/solr/core/src/java/org/apache/solr/cloud/ZkController.java b/solr/core/src/java/org/apache/solr/cloud/ZkController.java
index f417389..da008c8 100644
--- a/solr/core/src/java/org/apache/solr/cloud/ZkController.java
+++ b/solr/core/src/java/org/apache/solr/cloud/ZkController.java
@@ -401,7 +401,9 @@ public class ZkController implements Closeable {
 
     ContextKey contextKey = new ContextKey(collection, coreNodeName);
     ElectionContext context = electionContexts.get(contextKey);
-    context.close();
+    if (context != null) {
+      context.close();
+    }
   }
 
   public void start() {