Browse Source

* 修复`CellData`接收失败的的bug [Issue #2147]

pull/2159/head
Jiaju Zhuang 3 years ago
parent
commit
6448d5aef5
  1. 3
      src/main/java/com/alibaba/excel/util/ConverterUtils.java
  2. 2
      update.md

3
src/main/java/com/alibaba/excel/util/ConverterUtils.java

@ -13,6 +13,7 @@ import com.alibaba.excel.converters.NullableObjectConverter;
import com.alibaba.excel.converters.ReadConverterContext;
import com.alibaba.excel.enums.CellDataTypeEnum;
import com.alibaba.excel.exception.ExcelDataConvertException;
import com.alibaba.excel.metadata.data.CellData;
import com.alibaba.excel.metadata.data.ReadCellData;
import com.alibaba.excel.metadata.property.ExcelContentProperty;
import com.alibaba.excel.read.metadata.holder.ReadSheetHolder;
@ -89,7 +90,7 @@ public class ConverterUtils {
} else {
clazz = field.getType();
}
if (clazz == ReadCellData.class) {
if (clazz == CellData.class || clazz == ReadCellData.class) {
Class<?> classGeneric = getClassGeneric(field.getGenericType());
ReadCellData<Object> cellDataReturn = cellData.clone();
cellDataReturn.setData(doConvertToJavaObject(cellData, classGeneric, contentProperty, converterMap,

2
update.md

@ -1,6 +1,8 @@
# 3.0.2
* 大幅提升读写性能
* 修复列宽注解没用的bug [Issue #2151](https://github.com/alibaba/easyexcel/issues/2151)
* 修复`CellData`接收失败的的bug [Issue #2147](https://github.com/alibaba/easyexcel/issues/2147)
# 3.0.1
* 升级到正式版

Loading…
Cancel
Save