Skip to content
体验新版
项目
组织
正在加载...
登录
切换导航
打开侧边栏
Apache RocketMQ
Rocketmq
提交
f37dc187
R
Rocketmq
项目概览
Apache RocketMQ
/
Rocketmq
上一次同步 大约 3 年
通知
267
Star
16139
Fork
68
代码
文件
提交
分支
Tags
贡献者
分支图
Diff
Issue
0
列表
看板
标记
里程碑
合并请求
0
DevOps
流水线
流水线任务
计划
Wiki
0
Wiki
分析
仓库
DevOps
项目成员
Pages
R
Rocketmq
项目概览
项目概览
详情
发布
仓库
仓库
文件
提交
分支
标签
贡献者
分支图
比较
Issue
0
Issue
0
列表
看板
标记
里程碑
合并请求
0
合并请求
0
Pages
DevOps
DevOps
流水线
流水线任务
计划
分析
分析
仓库分析
DevOps
Wiki
0
Wiki
成员
成员
收起侧边栏
关闭侧边栏
动态
分支图
创建新Issue
流水线任务
提交
Issue看板
未验证
提交
f37dc187
编写于
5月 19, 2021
作者:
L
Lunaticf
提交者:
GitHub
5月 19, 2021
浏览文件
操作
浏览文件
下载
电子邮件补丁
差异文件
Fix some code style issue and remove redundant code (#1378)
Co-authored-by:
N
center-liu
<
liu.chaofan@foxmail.com
>
上级
18dadebe
变更
14
显示空白变更内容
内联
并排
Showing
14 changed file
with
30 addition
and
31 deletion
+30
-31
acl/src/main/java/org/apache/rocketmq/acl/plain/RemoteAddressStrategyFactory.java
...ache/rocketmq/acl/plain/RemoteAddressStrategyFactory.java
+1
-1
broker/src/main/java/org/apache/rocketmq/broker/mqtrace/SendMessageHook.java
...a/org/apache/rocketmq/broker/mqtrace/SendMessageHook.java
+3
-3
broker/src/test/java/org/apache/rocketmq/broker/BrokerOuterAPITest.java
...t/java/org/apache/rocketmq/broker/BrokerOuterAPITest.java
+1
-1
common/src/main/java/org/apache/rocketmq/common/hook/FilterCheckHook.java
...java/org/apache/rocketmq/common/hook/FilterCheckHook.java
+2
-2
filter/src/main/java/org/apache/rocketmq/filter/parser/SimpleCharStream.java
...a/org/apache/rocketmq/filter/parser/SimpleCharStream.java
+4
-4
logging/src/main/java/org/apache/rocketmq/logging/inner/Level.java
...rc/main/java/org/apache/rocketmq/logging/inner/Level.java
+0
-1
test/src/main/java/org/apache/rocketmq/test/util/FileUtil.java
...src/main/java/org/apache/rocketmq/test/util/FileUtil.java
+1
-1
test/src/main/java/org/apache/rocketmq/test/util/MQWait.java
test/src/main/java/org/apache/rocketmq/test/util/MQWait.java
+1
-1
test/src/main/java/org/apache/rocketmq/test/util/RandomUtil.java
...c/main/java/org/apache/rocketmq/test/util/RandomUtil.java
+5
-5
test/src/main/java/org/apache/rocketmq/test/util/RandomUtils.java
.../main/java/org/apache/rocketmq/test/util/RandomUtils.java
+4
-4
test/src/main/java/org/apache/rocketmq/test/util/VerifyUtils.java
.../main/java/org/apache/rocketmq/test/util/VerifyUtils.java
+1
-1
test/src/test/java/org/apache/rocketmq/test/client/consumer/tag/MulTagSubIT.java
...apache/rocketmq/test/client/consumer/tag/MulTagSubIT.java
+3
-3
test/src/test/java/org/apache/rocketmq/test/client/consumer/tag/TagMessageWithMulConsumerIT.java
...test/client/consumer/tag/TagMessageWithMulConsumerIT.java
+3
-3
tools/src/main/java/org/apache/rocketmq/tools/command/cluster/CLusterSendMsgRTCommand.java
...cketmq/tools/command/cluster/CLusterSendMsgRTCommand.java
+1
-1
未找到文件。
acl/src/main/java/org/apache/rocketmq/acl/plain/RemoteAddressStrategyFactory.java
浏览文件 @
f37dc187
...
...
@@ -193,7 +193,7 @@ public class RemoteAddressStrategyFactory {
throw
new
AclException
(
String
.
format
(
"RangeRemoteAddressStrategy netaddress examine scope Exception start is %s , end is %s"
,
start
,
end
));
}
}
return
this
.
end
>
0
?
true
:
false
;
return
this
.
end
>
0
;
}
private
boolean
ipv6Analysis
(
String
[]
strArray
,
int
index
)
{
...
...
broker/src/main/java/org/apache/rocketmq/broker/mqtrace/SendMessageHook.java
浏览文件 @
f37dc187
...
...
@@ -17,9 +17,9 @@
package
org.apache.rocketmq.broker.mqtrace
;
public
interface
SendMessageHook
{
public
String
hookName
();
String
hookName
();
public
void
sendMessageBefore
(
final
SendMessageContext
context
);
void
sendMessageBefore
(
final
SendMessageContext
context
);
public
void
sendMessageAfter
(
final
SendMessageContext
context
);
void
sendMessageAfter
(
final
SendMessageContext
context
);
}
broker/src/test/java/org/apache/rocketmq/broker/BrokerOuterAPITest.java
浏览文件 @
f37dc187
...
...
@@ -124,7 +124,7 @@ public class BrokerOuterAPITest {
boolean
success
=
Iterables
.
any
(
booleanList
,
new
Predicate
<
Boolean
>()
{
public
boolean
apply
(
Boolean
input
)
{
return
input
?
true
:
false
;
return
input
;
}
});
...
...
common/src/main/java/org/apache/rocketmq/common/hook/FilterCheckHook.java
浏览文件 @
f37dc187
...
...
@@ -20,7 +20,7 @@ package org.apache.rocketmq.common.hook;
import
java.nio.ByteBuffer
;
public
interface
FilterCheckHook
{
public
String
hookName
();
String
hookName
();
public
boolean
isFilterMatched
(
final
boolean
isUnitMode
,
final
ByteBuffer
byteBuffer
);
boolean
isFilterMatched
(
final
boolean
isUnitMode
,
final
ByteBuffer
byteBuffer
);
}
filter/src/main/java/org/apache/rocketmq/filter/parser/SimpleCharStream.java
浏览文件 @
f37dc187
...
...
@@ -36,8 +36,8 @@ public class SimpleCharStream {
* Position in buffer.
*/
public
int
bufpos
=
-
1
;
protected
int
bufline
[]
;
protected
int
bufcolumn
[]
;
protected
int
[]
bufline
;
protected
int
[]
bufcolumn
;
protected
int
column
=
0
;
protected
int
line
=
1
;
...
...
@@ -62,8 +62,8 @@ public class SimpleCharStream {
protected
void
ExpandBuff
(
boolean
wrapAround
)
{
char
[]
newbuffer
=
new
char
[
bufsize
+
2048
];
int
newbufline
[]
=
new
int
[
bufsize
+
2048
];
int
newbufcolumn
[]
=
new
int
[
bufsize
+
2048
];
int
[]
newbufline
=
new
int
[
bufsize
+
2048
];
int
[]
newbufcolumn
=
new
int
[
bufsize
+
2048
];
try
{
if
(
wrapAround
)
{
...
...
logging/src/main/java/org/apache/rocketmq/logging/inner/Level.java
浏览文件 @
f37dc187
...
...
@@ -116,7 +116,6 @@ public class Level implements Serializable {
if
(
s
.
equals
(
OFF_NAME
))
{
return
Level
.
OFF
;
}
if
(
s
.
equals
(
INFO_NAME
))
{
return
Level
.
INFO
;
}
...
...
test/src/main/java/org/apache/rocketmq/test/util/FileUtil.java
浏览文件 @
f37dc187
...
...
@@ -33,7 +33,7 @@ public class FileUtil {
this
.
fileName
=
fileName
;
}
public
static
void
main
(
String
args
[]
)
{
public
static
void
main
(
String
[]
args
)
{
String
filePath
=
FileUtil
.
class
.
getResource
(
"/"
).
getPath
();
String
fileName
=
"test.txt"
;
FileUtil
fileUtil
=
new
FileUtil
(
filePath
,
fileName
);
...
...
test/src/main/java/org/apache/rocketmq/test/util/MQWait.java
浏览文件 @
f37dc187
...
...
@@ -76,7 +76,7 @@ public class MQWait {
}
}
public
static
void
main
(
String
args
[]
)
{
public
static
void
main
(
String
[]
args
)
{
long
start
=
System
.
currentTimeMillis
();
MQWait
.
setCondition
(
new
Condition
()
{
...
...
test/src/main/java/org/apache/rocketmq/test/util/RandomUtil.java
浏览文件 @
f37dc187
...
...
@@ -100,14 +100,14 @@ public final class RandomUtil {
return
n
+
res
%
(
m
-
n
);
}
private
static
char
getChar
(
int
arg
[]
)
{
private
static
char
getChar
(
int
[]
arg
)
{
int
size
=
arg
.
length
;
int
c
=
rd
.
nextInt
(
size
/
2
);
c
=
c
*
2
;
return
(
char
)
(
getIntegerBetween
(
arg
[
c
],
arg
[
c
+
1
]));
}
private
static
String
getString
(
int
n
,
int
arg
[]
)
{
private
static
String
getString
(
int
n
,
int
[]
arg
)
{
StringBuilder
res
=
new
StringBuilder
();
for
(
int
i
=
0
;
i
<
n
;
i
++)
{
res
.
append
(
getChar
(
arg
));
...
...
@@ -116,17 +116,17 @@ public final class RandomUtil {
}
public
static
String
getStringWithCharacter
(
int
n
)
{
int
arg
[]
=
new
int
[]
{
'a'
,
'z'
+
1
,
'A'
,
'Z'
+
1
};
int
[]
arg
=
new
int
[]
{
'a'
,
'z'
+
1
,
'A'
,
'Z'
+
1
};
return
getString
(
n
,
arg
);
}
public
static
String
getStringWithNumber
(
int
n
)
{
int
arg
[]
=
new
int
[]
{
'0'
,
'9'
+
1
};
int
[]
arg
=
new
int
[]
{
'0'
,
'9'
+
1
};
return
getString
(
n
,
arg
);
}
public
static
String
getStringWithNumAndCha
(
int
n
)
{
int
arg
[]
=
new
int
[]
{
'a'
,
'z'
+
1
,
'A'
,
'Z'
+
1
,
'0'
,
'9'
+
1
};
int
[]
arg
=
new
int
[]
{
'a'
,
'z'
+
1
,
'A'
,
'Z'
+
1
,
'0'
,
'9'
+
1
};
return
getString
(
n
,
arg
);
}
...
...
test/src/main/java/org/apache/rocketmq/test/util/RandomUtils.java
浏览文件 @
f37dc187
...
...
@@ -45,16 +45,16 @@ public class RandomUtils {
}
public
static
String
getStringWithNumber
(
int
n
)
{
int
arg
[]
=
new
int
[]
{
'0'
,
'9'
+
1
};
int
[]
arg
=
new
int
[]
{
'0'
,
'9'
+
1
};
return
getString
(
n
,
arg
);
}
public
static
String
getStringWithCharacter
(
int
n
)
{
int
arg
[]
=
new
int
[]
{
'a'
,
'z'
+
1
,
'A'
,
'Z'
+
1
};
int
[]
arg
=
new
int
[]
{
'a'
,
'z'
+
1
,
'A'
,
'Z'
+
1
};
return
getString
(
n
,
arg
);
}
private
static
String
getString
(
int
n
,
int
arg
[]
)
{
private
static
String
getString
(
int
n
,
int
[]
arg
)
{
StringBuilder
res
=
new
StringBuilder
();
for
(
int
i
=
0
;
i
<
n
;
i
++)
{
res
.
append
(
getChar
(
arg
));
...
...
@@ -62,7 +62,7 @@ public class RandomUtils {
return
res
.
toString
();
}
private
static
char
getChar
(
int
arg
[]
)
{
private
static
char
getChar
(
int
[]
arg
)
{
int
size
=
arg
.
length
;
int
c
=
rd
.
nextInt
(
size
/
2
);
c
=
c
*
2
;
...
...
test/src/main/java/org/apache/rocketmq/test/util/VerifyUtils.java
浏览文件 @
f37dc187
...
...
@@ -140,7 +140,7 @@ public class VerifyUtils {
return
rtExpect
;
}
public
static
void
main
(
String
args
[]
)
{
public
static
void
main
(
String
[]
args
)
{
verifyBalance
(
400
,
0.1f
,
230
,
190
);
}
}
test/src/test/java/org/apache/rocketmq/test/client/consumer/tag/MulTagSubIT.java
浏览文件 @
f37dc187
...
...
@@ -92,7 +92,7 @@ public class MulTagSubIT extends BaseConf {
@Test
public
void
testSubTwoTabAndMatchTwo
()
{
String
tags
[]
=
{
"jueyin1"
,
"jueyin2"
};
String
[]
tags
=
{
"jueyin1"
,
"jueyin2"
};
String
subExpress
=
String
.
format
(
"%s||%s"
,
tags
[
0
],
tags
[
1
]);
int
msgSize
=
10
;
...
...
@@ -113,7 +113,7 @@ public class MulTagSubIT extends BaseConf {
@Test
public
void
testSubThreeTabAndMatchTwo
()
{
String
tags
[]
=
{
"jueyin1"
,
"jueyin2"
,
"jueyin3"
};
String
[]
tags
=
{
"jueyin1"
,
"jueyin2"
,
"jueyin3"
};
String
subExpress
=
String
.
format
(
"%s||%s"
,
tags
[
0
],
tags
[
1
]);
int
msgSize
=
10
;
...
...
@@ -135,7 +135,7 @@ public class MulTagSubIT extends BaseConf {
@Test
public
void
testNoMatch
()
{
String
tags
[]
=
{
"jueyin1"
,
"jueyin2"
,
"jueyin3"
};
String
[]
tags
=
{
"jueyin1"
,
"jueyin2"
,
"jueyin3"
};
String
subExpress
=
"no_match"
;
int
msgSize
=
10
;
...
...
test/src/test/java/org/apache/rocketmq/test/client/consumer/tag/TagMessageWithMulConsumerIT.java
浏览文件 @
f37dc187
...
...
@@ -84,7 +84,7 @@ public class TagMessageWithMulConsumerIT extends BaseConf {
@Test
public
void
testSendMessagesWithTwoTag
()
{
String
tags
[]
=
{
"jueyin1"
,
"jueyin2"
};
String
[]
tags
=
{
"jueyin1"
,
"jueyin2"
};
int
msgSize
=
10
;
TagMessage
tagMessage
=
new
TagMessage
(
tags
,
topic
,
msgSize
);
...
...
@@ -113,7 +113,7 @@ public class TagMessageWithMulConsumerIT extends BaseConf {
@Test
public
void
testTwoConsumerOneMatchOneOtherMatchAll
()
{
String
tags
[]
=
{
"jueyin1"
,
"jueyin2"
};
String
[]
tags
=
{
"jueyin1"
,
"jueyin2"
};
String
sub1
=
String
.
format
(
"%s||%s"
,
tags
[
0
],
tags
[
1
]);
String
sub2
=
String
.
format
(
"%s|| noExist"
,
tags
[
0
]);
int
msgSize
=
10
;
...
...
@@ -144,7 +144,7 @@ public class TagMessageWithMulConsumerIT extends BaseConf {
@Test
public
void
testSubKindsOf
()
{
String
tags
[]
=
{
"jueyin1"
,
"jueyin2"
};
String
[]
tags
=
{
"jueyin1"
,
"jueyin2"
};
String
sub1
=
String
.
format
(
"%s||%s"
,
tags
[
0
],
tags
[
1
]);
String
sub2
=
String
.
format
(
"%s|| noExist"
,
tags
[
0
]);
String
sub3
=
tags
[
0
];
...
...
tools/src/main/java/org/apache/rocketmq/tools/command/cluster/CLusterSendMsgRTCommand.java
浏览文件 @
f37dc187
...
...
@@ -38,7 +38,7 @@ import org.apache.rocketmq.tools.command.SubCommandException;
public
class
CLusterSendMsgRTCommand
implements
SubCommand
{
public
static
void
main
(
String
args
[]
)
{
public
static
void
main
(
String
[]
args
)
{
}
@Override
...
...
编辑
预览
Markdown
is supported
0%
请重试
或
添加新附件
.
添加附件
取消
You are about to add
0
people
to the discussion. Proceed with caution.
先完成此消息的编辑!
取消
想要评论请
注册
或
登录