You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@rocketmq.apache.org by GitBox <gi...@apache.org> on 2022/07/24 11:53:19 UTC

[GitHub] [rocketmq] Oliverwqcwrw opened a new issue, #4682: Potential NPE

Oliverwqcwrw opened a new issue, #4682:
URL: https://github.com/apache/rocketmq/issues/4682

   **BUG REPORT**
   
   1. Please describe the issue you observed:
   
   - What did you do (The steps to reproduce)?
   
   In `org.apache.rocketmq.namesrv.routeinfo.RouteInfoManager#registerBroker(java.lang.String, java.lang.String, java.lang.String, long, java.lang.String, java.lang.Long, java.lang.Boolean, org.apache.rocketmq.common.protocol.body.TopicConfigSerializeWrapper, java.util.List<java.lang.String>, io.netty.channel.Channel)`
   
   > 
        boolean isOldVersionBroker = enableActingMaster == null;
        brokerData.setEnableActingMaster(!isOldVersionBroker && enableActingMaster);
   
   if `enableActingMaster` is null, `!isOldVersionBroker && enableActingMaster` will cause NPE
   
   - What is expected to see?
   
   It can not cause  NPE
   
   - What did you see instead?
   
   It will cause NPE when `enableActingMaster` is null
   
   2. Please tell us about your environment:
   
   develop
   
   4. Other information (e.g. detailed explanation, logs, related issues, suggestions on how to fix, etc):
   


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: dev-unsubscribe@rocketmq.apache.org.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


[GitHub] [rocketmq] RongtongJin commented on issue #4682: Potential NPE

Posted by GitBox <gi...@apache.org>.
RongtongJin commented on issue #4682:
URL: https://github.com/apache/rocketmq/issues/4682#issuecomment-1193316002

   @Oliverwqcwrw Good catch!


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: dev-unsubscribe@rocketmq.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


[GitHub] [rocketmq] RongtongJin closed issue #4682: Potential NPE

Posted by GitBox <gi...@apache.org>.
RongtongJin closed issue #4682: Potential NPE
URL: https://github.com/apache/rocketmq/issues/4682


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: dev-unsubscribe@rocketmq.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org