You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@rocketmq.apache.org by ji...@apache.org on 2022/07/14 09:16:25 UTC
[rocketmq] branch develop updated: [ISSUE #4597] Fix inaccurate judgement
This is an automated email from the ASF dual-hosted git repository.
jinrongtong pushed a commit to branch develop
in repository https://gitbox.apache.org/repos/asf/rocketmq.git
The following commit(s) were added to refs/heads/develop by this push:
new 74e1a60b3 [ISSUE #4597] Fix inaccurate judgement
74e1a60b3 is described below
commit 74e1a60b37829e3730ad165ff6ea73b6c52b3dfe
Author: Oliver <wq...@163.com>
AuthorDate: Thu Jul 14 17:16:05 2022 +0800
[ISSUE #4597] Fix inaccurate judgement
---
.../apache/rocketmq/tools/command/queue/QueryConsumeQueueCommand.java | 3 ++-
1 file changed, 2 insertions(+), 1 deletion(-)
diff --git a/tools/src/main/java/org/apache/rocketmq/tools/command/queue/QueryConsumeQueueCommand.java b/tools/src/main/java/org/apache/rocketmq/tools/command/queue/QueryConsumeQueueCommand.java
index fafe71c63..32055cdc3 100644
--- a/tools/src/main/java/org/apache/rocketmq/tools/command/queue/QueryConsumeQueueCommand.java
+++ b/tools/src/main/java/org/apache/rocketmq/tools/command/queue/QueryConsumeQueueCommand.java
@@ -22,6 +22,7 @@ import org.apache.commons.cli.CommandLine;
import org.apache.commons.cli.Option;
import org.apache.commons.cli.Options;
import org.apache.commons.cli.PosixParser;
+import org.apache.commons.lang3.StringUtils;
import org.apache.rocketmq.common.protocol.body.ConsumeQueueData;
import org.apache.rocketmq.common.protocol.body.QueryConsumeQueueResponseBody;
import org.apache.rocketmq.common.protocol.route.TopicRouteData;
@@ -104,7 +105,7 @@ public class QueryConsumeQueueCommand implements SubCommand {
consumerGroup = commandLine.getOptionValue("g").trim();
}
- if (broker == null || broker == "") {
+ if (StringUtils.isEmpty(broker)) {
TopicRouteData topicRouteData = defaultMQAdminExt.examineTopicRouteInfo(topic);
if (topicRouteData == null || topicRouteData.getBrokerDatas() == null