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 b70a9469..8427b66d 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 @@ -102,11 +102,11 @@ public class ClassUtils { * @return */ public static ExcelContentProperty declaredExcelContentProperty(Map dataMap, Class headClazz, - String fieldName, - ConfigurationHolder configurationHolder) { + String fieldName, + ConfigurationHolder configurationHolder) { Class clazz = null; if (dataMap instanceof BeanMap) { - Object bean = ((BeanMap) dataMap).getBean(); + Object bean = ((BeanMap)dataMap).getBean(); if (bean != null) { clazz = bean.getClass(); } @@ -115,7 +115,7 @@ public class ClassUtils { } private static ExcelContentProperty getExcelContentProperty(Class clazz, Class headClass, String fieldName, - ConfigurationHolder configurationHolder) { + ConfigurationHolder configurationHolder) { switch (configurationHolder.globalConfiguration().getFiledCacheLocation()) { case THREAD_LOCAL: Map contentCacheMap = CONTENT_THREAD_LOCAL.get(); @@ -138,8 +138,8 @@ public class ClassUtils { } private static ExcelContentProperty doGetExcelContentProperty(Class clazz, Class headClass, - String fieldName, - ConfigurationHolder configurationHolder) { + String fieldName, + ConfigurationHolder configurationHolder) { ExcelContentProperty excelContentProperty = Optional.ofNullable( declaredFieldContentMap(clazz, configurationHolder)) .map(map -> map.get(fieldName)) @@ -158,7 +158,7 @@ public class ClassUtils { } public static void combineExcelContentProperty(ExcelContentProperty combineExcelContentProperty, - ExcelContentProperty excelContentProperty) { + ExcelContentProperty excelContentProperty) { if (excelContentProperty == null) { return; } @@ -187,7 +187,7 @@ public class ClassUtils { } private static Map declaredFieldContentMap(Class clazz, - ConfigurationHolder configurationHolder) { + ConfigurationHolder configurationHolder) { if (clazz == null) { return null; } @@ -324,7 +324,7 @@ public class ClassUtils { return fieldCache; } - WriteHolder writeHolder = (WriteHolder) configurationHolder; + WriteHolder writeHolder = (WriteHolder)configurationHolder; boolean needIgnore = !CollectionUtils.isEmpty(writeHolder.excludeColumnFieldNames()) || !CollectionUtils.isEmpty(writeHolder.excludeColumnIndexes()) @@ -427,7 +427,7 @@ public class ClassUtils { } private static Map buildSortedAllFieldMap(Map> orderFieldMap, - Map indexFieldMap) { + Map indexFieldMap) { Map sortedAllFieldMap = new HashMap<>( (orderFieldMap.size() + indexFieldMap.size()) * 4 / 3 + 1); @@ -450,8 +450,8 @@ public class ClassUtils { } private static void declaredOneField(Field field, Map> orderFieldMap, - Map indexFieldMap, Set ignoreSet, - ExcelIgnoreUnannotated excelIgnoreUnannotated) { + Map indexFieldMap, Set ignoreSet, + ExcelIgnoreUnannotated excelIgnoreUnannotated) { String fieldName = FieldUtils.resolveCglibFieldName(field); FieldWrapper fieldWrapper = new FieldWrapper(); fieldWrapper.setField(field);