Skip to content

Commit

Permalink
Avoid initialize useless HashMap in protocolImplMapArray.
Browse files Browse the repository at this point in the history
  • Loading branch information
zhanghaobo@kanzhun.com committed Jul 8, 2024
1 parent a571054 commit b5d4b0d
Showing 1 changed file with 1 addition and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -1089,7 +1089,7 @@ public boolean isShadedPBImpl() {

Map<ProtoNameVer, ProtoClassProtoImpl> getProtocolImplMap(RPC.RpcKind rpcKind) {
if (protocolImplMapArray.size() == 0) {// initialize for all rpc kinds
for (int i=0; i <= RpcKind.MAX_INDEX; ++i) {
for (int i = 0; i < RpcKind.MAX_INDEX; ++i) {
protocolImplMapArray.add(
new HashMap<ProtoNameVer, ProtoClassProtoImpl>(10));
}
Expand Down

0 comments on commit b5d4b0d

Please sign in to comment.