Specify Map initialCapacity.

This commit is contained in:
Sutra Zhou 2018-05-29 15:04:47 +08:00
parent e2777194da
commit aad62d7739

View File

@ -21,7 +21,7 @@ final class CustomMessageAdapters {
final NotifyTuple tuple = customMessage.getTuple(); final NotifyTuple tuple = customMessage.getTuple();
final String msgType = tuple.getMessageType(); final String msgType = tuple.getMessageType();
final Map<String, Object> params = new HashMap<String, Object>(); final Map<String, Object> params = new HashMap<String, Object>(3);
params.put("touser", customMessage.getToUser()); params.put("touser", customMessage.getToUser());
params.put("msgtype", msgType); params.put("msgtype", msgType);
params.put(msgType, customMessage.getTuple()); params.put(msgType, customMessage.getTuple());