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 2021/09/04 04:13:16 UTC

[GitHub] [rocketmq] zongtanghu commented on a change in pull request #3280: [ISSUE #3281 ][acl] fix fail to delete topic perm list and global white address(#3128)

zongtanghu commented on a change in pull request #3280:
URL: https://github.com/apache/rocketmq/pull/3280#discussion_r702231307



##########
File path: client/src/main/java/org/apache/rocketmq/client/impl/MQClientAPIImpl.java
##########
@@ -2263,4 +2263,19 @@ public boolean resumeCheckHalfMessage(final String addr, String msgId,
                 return false;
         }
     }
+
+    private static String join(List<String> list, String splitter) {
+        if (list == null) {
+            return null;
+        }
+        StringBuilder str = new StringBuilder();
+        for (int i = 0; i < list.size(); i++) {
+            str.append(list.get(i));
+            if (i == list.size() - 1) {
+                break;
+            }
+            str.append(splitter);
+        }
+        return str.toString();
+    }

Review comment:
       Maybe, you put this function into UtilAll or AclUtils class is better!

##########
File path: broker/src/main/java/org/apache/rocketmq/broker/processor/AdminBrokerProcessor.java
##########
@@ -1628,4 +1629,13 @@ private MessageExtBrokerInner toMessageExtBrokerInner(MessageExt msgExt) {
         inner.setWaitStoreMsgOK(false);
         return inner;
     }
+
+    private static List<String> split(String str, String splitter) {
+        if (str == null) {
+            return null;
+        }
+
+        String[] addrArray = str.split(splitter);
+        return Arrays.asList(addrArray);
+    }

Review comment:
       The code-review advice is the same as anthor one.




-- 
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