rocketmq-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From zho...@apache.org
Subject [rocketmq] 02/02: merger from develop branch and fix compile error
Date Fri, 24 Sep 2021 09:07:10 GMT
This is an automated email from the ASF dual-hosted git repository.

zhoubo pushed a commit to branch 5.0.0-preview
in repository https://gitbox.apache.org/repos/asf/rocketmq.git

commit dd09ba1ec869acb1538d2c73f98d44066bbbb00f
Author: odbozhou <877036922@qq.com>
AuthorDate: Fri Sep 24 17:06:48 2021 +0800

    merger from develop branch and fix compile error
---
 acl/src/main/java/org/apache/rocketmq/acl/common/AclUtils.java     | 7 +++----
 .../rocketmq/broker/processor/AbstractSendMessageProcessor.java    | 2 +-
 .../rocketmq/client/impl/producer/DefaultMQProducerImpl.java       | 1 +
 .../src/main/java/org/apache/rocketmq/common/stats/StatsItem.java  | 1 -
 common/src/test/java/org/apache/rocketmq/common/UtilAllTest.java   | 3 ++-
 .../apache/rocketmq/namesrv/processor/DefaultRequestProcessor.java | 2 --
 .../org/apache/rocketmq/namesrv/routeinfo/RouteInfoManager.java    | 2 --
 7 files changed, 7 insertions(+), 11 deletions(-)

diff --git a/acl/src/main/java/org/apache/rocketmq/acl/common/AclUtils.java b/acl/src/main/java/org/apache/rocketmq/acl/common/AclUtils.java
index a03d136..b801c69 100644
--- a/acl/src/main/java/org/apache/rocketmq/acl/common/AclUtils.java
+++ b/acl/src/main/java/org/apache/rocketmq/acl/common/AclUtils.java
@@ -23,7 +23,6 @@ import java.io.FileNotFoundException;
 import java.io.FileWriter;
 import java.io.IOException;
 import java.io.PrintWriter;
-import java.util.ArrayList;
 import java.util.Map;
 import java.util.SortedMap;
 import org.apache.commons.lang3.StringUtils;
@@ -210,9 +209,9 @@ public class AclUtils {
         // expand netaddress
         int separatorCount = StringUtils.countMatches(netaddress, ":");
         int padCount = part - separatorCount;
-        if(padCount > 0){
+        if (padCount > 0) {
             StringBuilder padStr = new StringBuilder(":");
-            for(int i = 0; i < padCount; i++){
+            for (int i = 0; i < padCount; i++) {
                 padStr.append(":");
             }
             netaddress = StringUtils.replace(netaddress, "::", padStr.toString());
@@ -221,7 +220,7 @@ public class AclUtils {
         // pad netaddress
         String[] strArray = StringUtils.splitPreserveAllTokens(netaddress, ":");
         for (int i = 0; i < strArray.length; i++) {
-            if(strArray[i].length() < 4){
+            if (strArray[i].length() < 4) {
                 strArray[i] = StringUtils.leftPad(strArray[i], 4, '0');
             }
         }
diff --git a/broker/src/main/java/org/apache/rocketmq/broker/processor/AbstractSendMessageProcessor.java
b/broker/src/main/java/org/apache/rocketmq/broker/processor/AbstractSendMessageProcessor.java
index d2f751b..cd279b9 100644
--- a/broker/src/main/java/org/apache/rocketmq/broker/processor/AbstractSendMessageProcessor.java
+++ b/broker/src/main/java/org/apache/rocketmq/broker/processor/AbstractSendMessageProcessor.java
@@ -24,7 +24,7 @@ import java.net.SocketAddress;
 import java.util.HashMap;
 import java.util.List;
 import java.util.Locale;
-import java.util.Map;Optional
+import java.util.Map;
 
 import java.util.concurrent.ThreadLocalRandom;
 
diff --git a/client/src/main/java/org/apache/rocketmq/client/impl/producer/DefaultMQProducerImpl.java
b/client/src/main/java/org/apache/rocketmq/client/impl/producer/DefaultMQProducerImpl.java
index ba479d2..046f27d 100644
--- a/client/src/main/java/org/apache/rocketmq/client/impl/producer/DefaultMQProducerImpl.java
+++ b/client/src/main/java/org/apache/rocketmq/client/impl/producer/DefaultMQProducerImpl.java
@@ -88,6 +88,7 @@ import org.apache.rocketmq.common.message.MessageId;
 import org.apache.rocketmq.common.message.MessageQueue;
 import org.apache.rocketmq.common.message.MessageType;
 import org.apache.rocketmq.common.protocol.NamespaceUtil;
+import org.apache.rocketmq.common.protocol.ResponseCode;
 import org.apache.rocketmq.common.protocol.header.CheckTransactionStateRequestHeader;
 import org.apache.rocketmq.common.protocol.header.EndTransactionRequestHeader;
 import org.apache.rocketmq.common.protocol.header.SendMessageRequestHeader;
diff --git a/common/src/main/java/org/apache/rocketmq/common/stats/StatsItem.java b/common/src/main/java/org/apache/rocketmq/common/stats/StatsItem.java
index 6007cb0..d016662 100644
--- a/common/src/main/java/org/apache/rocketmq/common/stats/StatsItem.java
+++ b/common/src/main/java/org/apache/rocketmq/common/stats/StatsItem.java
@@ -20,7 +20,6 @@ package org.apache.rocketmq.common.stats;
 import java.util.LinkedList;
 import java.util.concurrent.ScheduledExecutorService;
 import java.util.concurrent.TimeUnit;
-import java.util.concurrent.atomic.AtomicLong;
 import java.util.concurrent.atomic.LongAdder;
 
 import org.apache.rocketmq.common.UtilAll;
diff --git a/common/src/test/java/org/apache/rocketmq/common/UtilAllTest.java b/common/src/test/java/org/apache/rocketmq/common/UtilAllTest.java
index ffbcd33..32d2ba6 100644
--- a/common/src/test/java/org/apache/rocketmq/common/UtilAllTest.java
+++ b/common/src/test/java/org/apache/rocketmq/common/UtilAllTest.java
@@ -119,7 +119,8 @@ public class UtilAllTest {
         String comma = ",";
         assertEquals("groupA=DENY,groupB=PUB|SUB,groupC=SUB", UtilAll.join(list, comma));
         assertEquals(null, UtilAll.join(null, comma));
-        assertEquals("", UtilAll.join(Collections.emptyList(), comma));
+        List<String> objects = Collections.emptyList();
+        assertEquals("", UtilAll.join(objects, comma));
     }
 
     static class DemoConfig {
diff --git a/namesrv/src/main/java/org/apache/rocketmq/namesrv/processor/DefaultRequestProcessor.java
b/namesrv/src/main/java/org/apache/rocketmq/namesrv/processor/DefaultRequestProcessor.java
index f73705f..85e3883 100644
--- a/namesrv/src/main/java/org/apache/rocketmq/namesrv/processor/DefaultRequestProcessor.java
+++ b/namesrv/src/main/java/org/apache/rocketmq/namesrv/processor/DefaultRequestProcessor.java
@@ -56,8 +56,6 @@ import org.apache.rocketmq.common.protocol.header.namesrv.WipeWritePermOfBrokerR
 import org.apache.rocketmq.common.protocol.route.LogicalQueuesInfoUnordered;
 import org.apache.rocketmq.common.protocol.route.TopicRouteDataNameSrv;
 import org.apache.rocketmq.common.sysflag.MessageSysFlag;
-import org.apache.rocketmq.logging.InternalLogger;
-import org.apache.rocketmq.logging.InternalLoggerFactory;
 import org.apache.rocketmq.namesrv.NamesrvController;
 import org.apache.rocketmq.remoting.common.RemotingHelper;
 import org.apache.rocketmq.remoting.exception.RemotingCommandException;
diff --git a/namesrv/src/main/java/org/apache/rocketmq/namesrv/routeinfo/RouteInfoManager.java
b/namesrv/src/main/java/org/apache/rocketmq/namesrv/routeinfo/RouteInfoManager.java
index 5586603..ab9e77f 100644
--- a/namesrv/src/main/java/org/apache/rocketmq/namesrv/routeinfo/RouteInfoManager.java
+++ b/namesrv/src/main/java/org/apache/rocketmq/namesrv/routeinfo/RouteInfoManager.java
@@ -50,8 +50,6 @@ import org.apache.rocketmq.common.protocol.route.LogicalQueuesInfoUnordered;
 import org.apache.rocketmq.common.protocol.route.QueueData;
 import org.apache.rocketmq.common.protocol.route.TopicRouteDataNameSrv;
 import org.apache.rocketmq.common.sysflag.TopicSysFlag;
-import org.apache.rocketmq.logging.InternalLogger;
-import org.apache.rocketmq.logging.InternalLoggerFactory;
 import org.apache.rocketmq.remoting.common.RemotingUtil;
 import org.apache.rocketmq.srvutil.ConcurrentHashMapUtil;
 

Mime
View raw message