提交 dd09ba1e 编写于 作者: O odbozhou

merger from develop branch and fix compile error

上级 2bf133be
...@@ -23,7 +23,6 @@ import java.io.FileNotFoundException; ...@@ -23,7 +23,6 @@ import java.io.FileNotFoundException;
import java.io.FileWriter; import java.io.FileWriter;
import java.io.IOException; import java.io.IOException;
import java.io.PrintWriter; import java.io.PrintWriter;
import java.util.ArrayList;
import java.util.Map; import java.util.Map;
import java.util.SortedMap; import java.util.SortedMap;
import org.apache.commons.lang3.StringUtils; import org.apache.commons.lang3.StringUtils;
...@@ -210,9 +209,9 @@ public class AclUtils { ...@@ -210,9 +209,9 @@ public class AclUtils {
// expand netaddress // expand netaddress
int separatorCount = StringUtils.countMatches(netaddress, ":"); int separatorCount = StringUtils.countMatches(netaddress, ":");
int padCount = part - separatorCount; int padCount = part - separatorCount;
if(padCount > 0){ if (padCount > 0) {
StringBuilder padStr = new StringBuilder(":"); StringBuilder padStr = new StringBuilder(":");
for(int i = 0; i < padCount; i++){ for (int i = 0; i < padCount; i++) {
padStr.append(":"); padStr.append(":");
} }
netaddress = StringUtils.replace(netaddress, "::", padStr.toString()); netaddress = StringUtils.replace(netaddress, "::", padStr.toString());
...@@ -221,7 +220,7 @@ public class AclUtils { ...@@ -221,7 +220,7 @@ public class AclUtils {
// pad netaddress // pad netaddress
String[] strArray = StringUtils.splitPreserveAllTokens(netaddress, ":"); String[] strArray = StringUtils.splitPreserveAllTokens(netaddress, ":");
for (int i = 0; i < strArray.length; i++) { 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'); strArray[i] = StringUtils.leftPad(strArray[i], 4, '0');
} }
} }
......
...@@ -24,7 +24,7 @@ import java.net.SocketAddress; ...@@ -24,7 +24,7 @@ import java.net.SocketAddress;
import java.util.HashMap; import java.util.HashMap;
import java.util.List; import java.util.List;
import java.util.Locale; import java.util.Locale;
import java.util.Map;Optional import java.util.Map;
import java.util.concurrent.ThreadLocalRandom; import java.util.concurrent.ThreadLocalRandom;
......
...@@ -88,6 +88,7 @@ import org.apache.rocketmq.common.message.MessageId; ...@@ -88,6 +88,7 @@ import org.apache.rocketmq.common.message.MessageId;
import org.apache.rocketmq.common.message.MessageQueue; import org.apache.rocketmq.common.message.MessageQueue;
import org.apache.rocketmq.common.message.MessageType; import org.apache.rocketmq.common.message.MessageType;
import org.apache.rocketmq.common.protocol.NamespaceUtil; 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.CheckTransactionStateRequestHeader;
import org.apache.rocketmq.common.protocol.header.EndTransactionRequestHeader; import org.apache.rocketmq.common.protocol.header.EndTransactionRequestHeader;
import org.apache.rocketmq.common.protocol.header.SendMessageRequestHeader; import org.apache.rocketmq.common.protocol.header.SendMessageRequestHeader;
......
...@@ -20,7 +20,6 @@ package org.apache.rocketmq.common.stats; ...@@ -20,7 +20,6 @@ package org.apache.rocketmq.common.stats;
import java.util.LinkedList; import java.util.LinkedList;
import java.util.concurrent.ScheduledExecutorService; import java.util.concurrent.ScheduledExecutorService;
import java.util.concurrent.TimeUnit; import java.util.concurrent.TimeUnit;
import java.util.concurrent.atomic.AtomicLong;
import java.util.concurrent.atomic.LongAdder; import java.util.concurrent.atomic.LongAdder;
import org.apache.rocketmq.common.UtilAll; import org.apache.rocketmq.common.UtilAll;
......
...@@ -119,7 +119,8 @@ public class UtilAllTest { ...@@ -119,7 +119,8 @@ public class UtilAllTest {
String comma = ","; String comma = ",";
assertEquals("groupA=DENY,groupB=PUB|SUB,groupC=SUB", UtilAll.join(list, comma)); assertEquals("groupA=DENY,groupB=PUB|SUB,groupC=SUB", UtilAll.join(list, comma));
assertEquals(null, UtilAll.join(null, 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 { static class DemoConfig {
......
...@@ -56,8 +56,6 @@ import org.apache.rocketmq.common.protocol.header.namesrv.WipeWritePermOfBrokerR ...@@ -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.LogicalQueuesInfoUnordered;
import org.apache.rocketmq.common.protocol.route.TopicRouteDataNameSrv; import org.apache.rocketmq.common.protocol.route.TopicRouteDataNameSrv;
import org.apache.rocketmq.common.sysflag.MessageSysFlag; 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.namesrv.NamesrvController;
import org.apache.rocketmq.remoting.common.RemotingHelper; import org.apache.rocketmq.remoting.common.RemotingHelper;
import org.apache.rocketmq.remoting.exception.RemotingCommandException; import org.apache.rocketmq.remoting.exception.RemotingCommandException;
......
...@@ -50,8 +50,6 @@ import org.apache.rocketmq.common.protocol.route.LogicalQueuesInfoUnordered; ...@@ -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.QueueData;
import org.apache.rocketmq.common.protocol.route.TopicRouteDataNameSrv; import org.apache.rocketmq.common.protocol.route.TopicRouteDataNameSrv;
import org.apache.rocketmq.common.sysflag.TopicSysFlag; 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.remoting.common.RemotingUtil;
import org.apache.rocketmq.srvutil.ConcurrentHashMapUtil; import org.apache.rocketmq.srvutil.ConcurrentHashMapUtil;
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册