mirror of
https://gitee.com/dromara/hutool.git
synced 2025-06-28 13:34:09 +08:00
修复ExcelPicUtil
中可能的空指针异常
This commit is contained in:
parent
7f3be3038a
commit
420e54a37d
@ -2,7 +2,7 @@
|
|||||||
# 🚀Changelog
|
# 🚀Changelog
|
||||||
|
|
||||||
-------------------------------------------------------------------------------------------------------------
|
-------------------------------------------------------------------------------------------------------------
|
||||||
# 5.8.39(2025-05-23)
|
# 5.8.39(2025-05-27)
|
||||||
|
|
||||||
### 🐣新特性
|
### 🐣新特性
|
||||||
* 【ai 】 增加SSE流式返回函数参数callback,豆包、grok新增文生图接口,豆包生成视频支持使用model
|
* 【ai 】 增加SSE流式返回函数参数callback,豆包、grok新增文生图接口,豆包生成视频支持使用model
|
||||||
@ -14,6 +14,7 @@
|
|||||||
* 【core 】 修复`CharsequenceUtil`toLowerCase方法拼写错误(issue#3941@Github)
|
* 【core 】 修复`CharsequenceUtil`toLowerCase方法拼写错误(issue#3941@Github)
|
||||||
* 【core 】 修复`UUID`equals的问题,改为final类(issue#3948@Github)
|
* 【core 】 修复`UUID`equals的问题,改为final类(issue#3948@Github)
|
||||||
* 【core 】 修复`Money`中金额分配的问题bug(issue#IC9Y35@Gitee)
|
* 【core 】 修复`Money`中金额分配的问题bug(issue#IC9Y35@Gitee)
|
||||||
|
* 【poi 】 修复`ExcelPicUtil`中可能的空指针异常
|
||||||
|
|
||||||
-------------------------------------------------------------------------------------------------------------
|
-------------------------------------------------------------------------------------------------------------
|
||||||
# 5.8.38(2025-05-13)
|
# 5.8.38(2025-05-13)
|
||||||
|
@ -99,7 +99,12 @@ public class ExcelPicUtil {
|
|||||||
for (XSSFShape shape : shapes) {
|
for (XSSFShape shape : shapes) {
|
||||||
if(shape instanceof XSSFPicture){
|
if(shape instanceof XSSFPicture){
|
||||||
pic = (XSSFPicture) shape;
|
pic = (XSSFPicture) shape;
|
||||||
ctMarker = pic.getPreferredSize().getFrom();
|
try{
|
||||||
|
ctMarker = pic.getPreferredSize().getFrom();
|
||||||
|
}catch (Exception e){
|
||||||
|
// 此处可能有空指针异常,跳过之
|
||||||
|
continue;
|
||||||
|
}
|
||||||
sheetIndexPicMap.put(StrUtil.format("{}_{}", ctMarker.getRow(), ctMarker.getCol()), pic.getPictureData());
|
sheetIndexPicMap.put(StrUtil.format("{}_{}", ctMarker.getRow(), ctMarker.getCol()), pic.getPictureData());
|
||||||
}
|
}
|
||||||
// 其他类似于图表等忽略,see: https://gitee.com/chinabugotech/hutool/issues/I38857
|
// 其他类似于图表等忽略,see: https://gitee.com/chinabugotech/hutool/issues/I38857
|
||||||
|
Loading…
Reference in New Issue
Block a user