Skip to content

Commit

Permalink
rename MAX_INDEX to MAX_SIZE
Browse files Browse the repository at this point in the history
  • Loading branch information
hfutatzhanghb committed Jan 6, 2025
1 parent e4e9c46 commit e990a61
Showing 1 changed file with 3 additions and 3 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -90,7 +90,7 @@ public enum RpcKind {
RPC_BUILTIN ((short) 1), // Used for built in calls by tests
RPC_WRITABLE ((short) 2), // Use WritableRpcEngine
RPC_PROTOCOL_BUFFER ((short) 3); // Use ProtobufRpcEngine
final static short MAX_INDEX = RPC_PROTOCOL_BUFFER.value; // used for array size
final static short MAX_SIZE = RPC_PROTOCOL_BUFFER.value; // used for array size
private final short value;

RpcKind(short val) {
Expand Down Expand Up @@ -1088,11 +1088,11 @@ public boolean isShadedPBImpl() {
}

ArrayList<Map<ProtoNameVer, ProtoClassProtoImpl>> protocolImplMapArray =
new ArrayList<Map<ProtoNameVer, ProtoClassProtoImpl>>(RpcKind.MAX_INDEX);
new ArrayList<Map<ProtoNameVer, ProtoClassProtoImpl>>(RpcKind.MAX_SIZE);

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_SIZE; ++i) {
protocolImplMapArray.add(
new HashMap<ProtoNameVer, ProtoClassProtoImpl>(10));
}
Expand Down

0 comments on commit e990a61

Please sign in to comment.