You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@hbase.apache.org by st...@apache.org on 2021/08/17 00:06:01 UTC

[hbase] branch branch-2.4 updated: HBASE-24570 connection#close throws NPE

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

stack pushed a commit to branch branch-2.4
in repository https://gitbox.apache.org/repos/asf/hbase.git


The following commit(s) were added to refs/heads/branch-2.4 by this push:
     new 125544a  HBASE-24570 connection#close throws NPE
125544a is described below

commit 125544acfa0395e0043053ae9da209ba65a7e32c
Author: Bo Cui <cu...@163.com>
AuthorDate: Sat Jul 18 10:26:00 2020 +0800

    HBASE-24570 connection#close throws NPE
---
 .../java/org/apache/hadoop/hbase/client/ConnectionImplementation.java | 4 +++-
 1 file changed, 3 insertions(+), 1 deletion(-)

diff --git a/hbase-client/src/main/java/org/apache/hadoop/hbase/client/ConnectionImplementation.java b/hbase-client/src/main/java/org/apache/hadoop/hbase/client/ConnectionImplementation.java
index 9145c55..cfbc19c 100644
--- a/hbase-client/src/main/java/org/apache/hadoop/hbase/client/ConnectionImplementation.java
+++ b/hbase-client/src/main/java/org/apache/hadoop/hbase/client/ConnectionImplementation.java
@@ -2116,7 +2116,9 @@ class ConnectionImplementation implements ClusterConnection, Closeable {
       this.metrics.shutdown();
     }
     this.closed = true;
-    registry.close();
+    if (this.registry != null) {
+      registry.close();
+    }
     this.stubs.clear();
     if (clusterStatusListener != null) {
       clusterStatusListener.close();