zouxuan há 5 anos atrás
pai
commit
72a6548c39

+ 2 - 2
mec-util/src/main/java/com/ym/mec/util/collection/MapUtil.java

@@ -112,7 +112,7 @@ public class MapUtil {
 	 * @describe mybatis返回结果转换为Map
 	 */
 	public static <T,K> Map convertMybatisMap(List<Map<T,K>> maps){
-		Map result=new HashMap();
+		Map result=new HashMap(maps.size());
 		maps.forEach(stringIntegerMap -> {
 			if(Objects.isNull(stringIntegerMap)){
 				return;
@@ -130,7 +130,7 @@ public class MapUtil {
 	 * @describe mybatis返回结果转换为Map
 	 */
 	public static <T,K> Map convertIntegerMap(List<Map<T,K>> maps){
-		Map result=new HashMap();
+		Map result=new HashMap(maps.size());
 		maps.forEach(stringIntegerMap -> {
 			if(Objects.isNull(stringIntegerMap)){
 				return;