From 9458f927e11dfe021ef744d1ead4033d42780ef9 Mon Sep 17 00:00:00 2001 From: Jiaju Zhuang Date: Thu, 4 May 2023 21:15:24 +0800 Subject: [PATCH] =?UTF-8?q?=E4=BF=AE=E6=94=B9=E6=96=87=E6=A1=A3=E5=BC=82?= =?UTF-8?q?=E5=B8=B8?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../main/java/com/alibaba/excel/util/ClassUtils.java | 12 ++++-------- 1 file changed, 4 insertions(+), 8 deletions(-) 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 df9d3683..8007de45 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 @@ -1,6 +1,5 @@ package com.alibaba.excel.util; -import java.io.FileWriter; import java.lang.reflect.Field; import java.lang.reflect.Modifier; import java.util.ArrayList; @@ -14,7 +13,6 @@ import java.util.Map; import java.util.Optional; import java.util.Set; import java.util.TreeMap; -import java.util.TreeSet; import java.util.concurrent.ConcurrentHashMap; import com.alibaba.excel.annotation.ExcelIgnore; @@ -35,7 +33,6 @@ import com.alibaba.excel.metadata.property.ExcelContentProperty; import com.alibaba.excel.metadata.property.FontProperty; import com.alibaba.excel.metadata.property.NumberFormatProperty; import com.alibaba.excel.metadata.property.StyleProperty; -import com.alibaba.excel.write.metadata.fill.FillWrapper; import com.alibaba.excel.write.metadata.holder.WriteHolder; import lombok.AllArgsConstructor; @@ -274,10 +271,8 @@ public class ClassUtils { /** * Parsing field in the class * - * @param clazz Need to parse the class - * @param needIgnore If you want to ignore fields need to ignore - * @param holder holder - * @param cacheLocation cache lcation + * @param clazz Need to parse the class + * @param configurationHolder configuration */ public static FieldCache declaredFields(Class clazz, ConfigurationHolder configurationHolder) { switch (configurationHolder.globalConfiguration().getFiledCacheLocation()) { @@ -431,7 +426,8 @@ public class ClassUtils { } } - private static Map buildSortedAllFieldMap(Map> orderFieldMap, Map indexFieldMap) { + private static Map buildSortedAllFieldMap(Map> orderFieldMap, + Map indexFieldMap) { Map sortedAllFieldMap = new HashMap<>( (orderFieldMap.size() + indexFieldMap.size()) * 4 / 3 + 1);