Browse Source

Merge pull request #3201 from wuyiliang1/master

[issue#3200]fix ClassCastException
pull/3231/head
gongxuanzhang 2 years ago committed by GitHub
parent
commit
4766634105
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
  1. 12
      easyexcel-core/src/main/java/com/alibaba/excel/util/ClassUtils.java

12
easyexcel-core/src/main/java/com/alibaba/excel/util/ClassUtils.java

@ -564,11 +564,13 @@ public class ClassUtils {
FieldCacheKey(Class<?> clazz, ConfigurationHolder configurationHolder) {
this.clazz = clazz;
WriteHolder writeHolder = (WriteHolder)configurationHolder;
this.excludeColumnFieldNames = writeHolder.excludeColumnFieldNames();
this.excludeColumnIndexes = writeHolder.excludeColumnIndexes();
this.includeColumnFieldNames = writeHolder.includeColumnFieldNames();
this.includeColumnIndexes = writeHolder.includeColumnIndexes();
if (configurationHolder instanceof WriteHolder) {
WriteHolder writeHolder = (WriteHolder)configurationHolder;
this.excludeColumnFieldNames = writeHolder.excludeColumnFieldNames();
this.excludeColumnIndexes = writeHolder.excludeColumnIndexes();
this.includeColumnFieldNames = writeHolder.includeColumnFieldNames();
this.includeColumnIndexes = writeHolder.includeColumnIndexes();
}
}
}

Loading…
Cancel
Save