From e14393278ee9fb876240b629627095d3bf9c0477 Mon Sep 17 00:00:00 2001 From: Bo Cui Date: Sat, 18 Jul 2020 10:26:00 +0800 Subject: [PATCH] HBASE-24570 connection#close throws NPE --- .../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 7ddbfaacf080..3b413ef8ae00 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 @@ -2001,7 +2001,9 @@ public void close() { this.metrics.shutdown(); } this.closed = true; - registry.close(); + if (this.registry != null) { + registry.close(); + } this.stubs.clear(); if (clusterStatusListener != null) { clusterStatusListener.close();