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_r238122662
 
 

 ##########
 File path: 
pulsar-broker/src/main/java/org/apache/pulsar/broker/service/BrokerService.java
 ##########
 @@ -433,6 +433,8 @@ public void unloadNamespaceBundlesGracefully() {
                 } catch (PulsarServerException.NotFoundException ne) {
                     log.warn("Broker load-manager znode doesn't exist ", ne);
                     // still continue and release bundle ownership as broker's 
registration node doesn't exist.
+                } catch (NullPointerException ne) {
 
 Review comment:
   do you have a stacktrace of the null pointer exception?
   
   a better fix would be
   
   ```suggestion
   if (pulsar.getLoadManager() != null && pulsar.getLoadManager().get() != 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

Reply via email to