mirror of
https://gitee.com/chinabugotech/hutool.git
synced 2025-04-19 03:01:48 +08:00
fix cod
This commit is contained in:
parent
530ce9fab5
commit
eae8c6b7f7
@ -20,6 +20,7 @@
|
||||
* 【cache 】 优化FIFOCache未设置过期策略时,无需遍历判断过期对象(pr#425@Gitee)
|
||||
* 【core 】 增加Opt类(pr#426@Gitee)
|
||||
* 【core 】 Week增加of重载,支持DayOfWek(pr#1872@Github)
|
||||
* 【poi 】 优化read,避免多次创建CopyOptions(issue#1875@Github)
|
||||
|
||||
### 🐞Bug修复
|
||||
* 【http 】 修复HttpCookie设置cookies的方法,不符合RFC6265规范问题(pr#418@Gitee)
|
||||
|
@ -1,6 +1,7 @@
|
||||
package cn.hutool.poi.excel.reader;
|
||||
|
||||
import cn.hutool.core.bean.BeanUtil;
|
||||
import cn.hutool.core.bean.copier.CopyOptions;
|
||||
import cn.hutool.poi.excel.cell.CellEditor;
|
||||
import org.apache.poi.ss.usermodel.Sheet;
|
||||
|
||||
@ -41,8 +42,9 @@ public class BeanSheetReader<T> implements SheetReader<List<T>> {
|
||||
}
|
||||
|
||||
final List<T> beanList = new ArrayList<>(mapList.size());
|
||||
final CopyOptions copyOptions = CopyOptions.create().setIgnoreError(true);
|
||||
for (Map<String, Object> map : mapList) {
|
||||
beanList.add(BeanUtil.toBeanIgnoreError(map, this.beanClass));
|
||||
beanList.add(BeanUtil.toBean(map, this.beanClass, copyOptions));
|
||||
}
|
||||
return beanList;
|
||||
}
|
||||
|
Loading…
x
Reference in New Issue
Block a user