Skip to content

Commit bb0f06e

Browse files
author
yungyu16
committed
fix: 避免异常数据报文导致的预分配过大内存
1 parent 8a14d79 commit bb0f06e

1 file changed

Lines changed: 1 addition & 1 deletion

File tree

sentinel-cluster/sentinel-cluster-server-default/src/main/java/com/alibaba/csp/sentinel/cluster/server/codec/data/ParamFlowRequestDataDecoder.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -40,7 +40,7 @@ public ParamFlowRequestData decode(ByteBuf source) {
4040

4141
int amount = source.readInt();
4242
if (amount > 0) {
43-
List<Object> params = new ArrayList<>(amount);
43+
List<Object> params = new ArrayList<>(16);
4444
for (int i = 0; i < amount; i++) {
4545
decodeParam(source, params);
4646
}

0 commit comments

Comments
 (0)