Browse Source

[issue#3200]fix ClassCastException

pull/3201/head
wuyiliang 2 years ago
parent
commit
aef84b97f1
  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