Browse Source

[fix] add hashMap initialCapacity

pull/3920/head
Black Pan 8 months ago
parent
commit
3c940184ef
  1. 2
      easyexcel-core/src/main/java/com/alibaba/excel/util/BeanMapUtils.java

2
easyexcel-core/src/main/java/com/alibaba/excel/util/BeanMapUtils.java

@ -25,7 +25,7 @@ public class BeanMapUtils {
*/
public static Map<String, Object> create(Object bean) {
// Create a map to store the bean's property names and their corresponding values
Map<String, Object> propertyMap = new HashMap<>();
Map<String, Object> propertyMap = new HashMap<>(16);
// Iterate over all declared fields of the bean
for (Field field : bean.getClass().getDeclaredFields()) {

Loading…
Cancel
Save