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

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


The following commit(s) were added to refs/heads/master by this push:
     new 41f633f81e5 [fix][misc] NPE during standalone shutdown (#22636)
41f633f81e5 is described below

commit 41f633f81e53bfc35ad37bb13e62def5c0dcb11d
Author: Nicolò Boschi <[email protected]>
AuthorDate: Fri May 3 01:12:26 2024 +0200

    [fix][misc] NPE during standalone shutdown (#22636)
---
 .../java/org/apache/pulsar/zookeeper/LocalBookkeeperEnsemble.java     | 4 +++-
 1 file changed, 3 insertions(+), 1 deletion(-)

diff --git 
a/pulsar-broker/src/main/java/org/apache/pulsar/zookeeper/LocalBookkeeperEnsemble.java
 
b/pulsar-broker/src/main/java/org/apache/pulsar/zookeeper/LocalBookkeeperEnsemble.java
index 63d146a3a15..e8a503c46e0 100644
--- 
a/pulsar-broker/src/main/java/org/apache/pulsar/zookeeper/LocalBookkeeperEnsemble.java
+++ 
b/pulsar-broker/src/main/java/org/apache/pulsar/zookeeper/LocalBookkeeperEnsemble.java
@@ -498,7 +498,9 @@ public class LocalBookkeeperEnsemble {
         LOG.debug("Local ZK/BK stopping ...");
         for (LifecycleComponent bookie : bookieComponents) {
             try {
-                bookie.close();
+                if (bookie != null) {
+                    bookie.close();
+                }
             } catch (Exception e) {
                 LOG.warn("failed to shutdown bookie", e);
             }

Reply via email to