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 f485d388..c520959e 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,20 +1,5 @@ package com.alibaba.excel.util; -import java.lang.reflect.Field; -import java.lang.reflect.Modifier; -import java.util.ArrayList; -import java.util.Collection; -import java.util.Collections; -import java.util.HashMap; -import java.util.HashSet; -import java.util.LinkedHashSet; -import java.util.List; -import java.util.Map; -import java.util.Optional; -import java.util.Set; -import java.util.TreeMap; -import java.util.concurrent.ConcurrentHashMap; - import com.alibaba.excel.annotation.ExcelIgnore; import com.alibaba.excel.annotation.ExcelIgnoreUnannotated; import com.alibaba.excel.annotation.ExcelProperty; @@ -34,7 +19,6 @@ 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.holder.WriteHolder; - import lombok.AllArgsConstructor; import lombok.EqualsAndHashCode; import lombok.Getter; @@ -42,6 +26,11 @@ import lombok.Setter; import org.apache.commons.collections4.CollectionUtils; import org.springframework.cglib.beans.BeanMap; +import java.lang.reflect.Field; +import java.lang.reflect.Modifier; +import java.util.*; +import java.util.concurrent.ConcurrentHashMap; + /** * Licensed to the Apache Software Foundation (ASF) under one or more * contributor license agreements. See the NOTICE file distributed with @@ -49,7 +38,7 @@ import org.springframework.cglib.beans.BeanMap; * The ASF licenses this file to You under the Apache License, Version 2.0 * (the "License"); you may not use this file except in compliance with * the License. You may obtain a copy of the License at http://www.apache.org/licenses/LICENSE-2.0 - * + *
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
@@ -102,10 +91,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();
}
@@ -114,7 +104,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