You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@pulsar.apache.org by GitBox <gi...@apache.org> on 2018/12/03 00:24:14 UTC
[GitHub] sijie commented on a change in pull request #3108: Exception
Handling for Null Pointer Exception in BrokerService
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:
users@infra.apache.org
With regards,
Apache Git Services