diff --git a/easyexcel-core/src/main/java/com/alibaba/excel/util/ClassUtils.java b/easyexcel-core/src/main/java/com/alibaba/excel/util/ClassUtils.java index 92b828b4..d39abdc1 100644 --- a/easyexcel-core/src/main/java/com/alibaba/excel/util/ClassUtils.java +++ b/easyexcel-core/src/main/java/com/alibaba/excel/util/ClassUtils.java @@ -333,7 +333,7 @@ public class ClassUtils { return fieldCache; } // ignore filed - Map tempSortedFieldMapp = MapUtils.newHashMap(); + Map tempSortedFieldMap = MapUtils.newHashMap(); int index = 0; for (Map.Entry entry : sortedFieldMap.entrySet()) { Integer key = entry.getKey(); @@ -346,18 +346,18 @@ public class ClassUtils { } else { // Mandatory sorted fields if (indexFieldMap.containsKey(key)) { - tempSortedFieldMapp.put(key, field); + tempSortedFieldMap.put(key, field); } else { // Need to reorder automatically // Check whether the current key is already in use - while (tempSortedFieldMapp.containsKey(index)) { + while (tempSortedFieldMap.containsKey(index)) { index++; } - tempSortedFieldMapp.put(index++, field); + tempSortedFieldMap.put(index++, field); } } } - fieldCache.setSortedFieldMap(tempSortedFieldMapp); + fieldCache.setSortedFieldMap(tempSortedFieldMap); // resort field resortField(writeHolder, fieldCache);