duhengforever commented on a change in pull request #518: [ISSUE #406]Fix NPE
exception
URL: https://github.com/apache/rocketmq/pull/518#discussion_r230272778
##########
File path:
tools/src/main/java/org/apache/rocketmq/tools/admin/DefaultMQAdminExtImpl.java
##########
@@ -842,7 +842,7 @@ public boolean consumed(final MessageExt msg,
BrokerData brokerData =
ci.getBrokerAddrTable().get(mq.getBrokerName());
if (brokerData != null) {
String addr =
brokerData.getBrokerAddrs().get(MixAll.MASTER_ID);
- if
(addr.equals(RemotingUtil.socketAddress2String(msg.getStoreHost()))) {
+ if
(RemotingUtil.socketAddress2String(msg.getStoreHost()).equals(addr)) {
Review comment:
Is there any possibility that msg is 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