sijie commented on a change in pull request #3108: Exception Handling for Null
Pointer Exception in BrokerService
URL: https://github.com/apache/pulsar/pull/3108#discussion_r238411337
##########
File path:
pulsar-broker/src/main/java/org/apache/pulsar/broker/service/BrokerService.java
##########
@@ -429,7 +429,11 @@ public void unloadNamespaceBundlesGracefully() {
// make broker-node unavailable from the cluster
if (pulsar.getLoadManager() != null) {
try {
- pulsar.getLoadManager().get().disableBroker();
+ if (pulsar.getLoadManager() == null ||
pulsar.getLoadManager().get() == null) {
Review comment:
can you move the condition to line 430? since line 430 already checks
`pulsar.getLoadManager() != null`.
----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on GitHub and use the
URL above to go to the specific comment.
For queries about this service, please contact Infrastructure at:
[email protected]
With regards,
Apache Git Services