提交 60efa68f 编写于 作者: Y ymwneu 提交者: von gosling

Fix NPE when getting the localhost using admin tool (#518)

上级 edf97032
...@@ -842,7 +842,7 @@ public class DefaultMQAdminExtImpl implements MQAdminExt, MQAdminExtInner { ...@@ -842,7 +842,7 @@ public class DefaultMQAdminExtImpl implements MQAdminExt, MQAdminExtInner {
BrokerData brokerData = ci.getBrokerAddrTable().get(mq.getBrokerName()); BrokerData brokerData = ci.getBrokerAddrTable().get(mq.getBrokerName());
if (brokerData != null) { if (brokerData != null) {
String addr = brokerData.getBrokerAddrs().get(MixAll.MASTER_ID); String addr = brokerData.getBrokerAddrs().get(MixAll.MASTER_ID);
if (addr.equals(RemotingUtil.socketAddress2String(msg.getStoreHost()))) { if (RemotingUtil.socketAddress2String(msg.getStoreHost()).equals(addr)) {
if (next.getValue().getConsumerOffset() > msg.getQueueOffset()) { if (next.getValue().getConsumerOffset() > msg.getQueueOffset()) {
return true; return true;
} }
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册