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 1ae3aee21 [ISSUE #6077] fix issues that messageStore could be null
1ae3aee21 is described below
commit 1ae3aee2110989a48f477bd3513b9d265f9b41b0
Author: hardyfish <[email protected]>
AuthorDate: Thu Feb 16 08:39:04 2023 +0800
[ISSUE #6077] fix issues that messageStore could be null
---
.../java/org/apache/rocketmq/client/impl/MQAdminImpl.java | 12 +++++-------
1 file changed, 5 insertions(+), 7 deletions(-)
diff --git
a/client/src/main/java/org/apache/rocketmq/client/impl/MQAdminImpl.java
b/client/src/main/java/org/apache/rocketmq/client/impl/MQAdminImpl.java
index 12f843fe6..e002f7a5e 100644
--- a/client/src/main/java/org/apache/rocketmq/client/impl/MQAdminImpl.java
+++ b/client/src/main/java/org/apache/rocketmq/client/impl/MQAdminImpl.java
@@ -432,13 +432,11 @@ public class MQAdminImpl {
if (keys != null) {
boolean matched = false;
String[] keyArray =
keys.split(MessageConst.KEY_SEPARATOR);
- if (keyArray != null) {
- for (String k : keyArray) {
- // both topic and key must be equal at
the same time
- if (Objects.equals(key, k) &&
Objects.equals(topic, msgTopic)) {
- matched = true;
- break;
- }
+ for (String k : keyArray) {
+ // both topic and key must be equal at the
same time
+ if (Objects.equals(key, k) &&
Objects.equals(topic, msgTopic)) {
+ matched = true;
+ break;
}
}