mirror of
https://gitee.com/chinabugotech/hutool.git
synced 2025-07-21 15:09:48 +08:00
ObjectUtil 新增三个 defaultIfXxx 方法
This commit is contained in:
@@ -376,7 +376,7 @@ public class CellUtil {
|
||||
public static Cell getMergedRegionCell(Sheet sheet, int x, int y) {
|
||||
return ObjectUtil.defaultIfNull(
|
||||
getCellIfMergedRegion(sheet, x, y),
|
||||
SheetUtil.getCell(sheet, y, x));
|
||||
() -> SheetUtil.getCell(sheet, y, x));
|
||||
}
|
||||
|
||||
/**
|
||||
|
@@ -294,7 +294,7 @@ public class SheetDataSaxHandler extends DefaultHandler {
|
||||
final int numFmtIndex = xssfCellStyle.getDataFormat();
|
||||
this.numFmtString = ObjectUtil.defaultIfNull(
|
||||
xssfCellStyle.getDataFormatString(),
|
||||
BuiltinFormats.getBuiltinFormat(numFmtIndex));
|
||||
() -> BuiltinFormats.getBuiltinFormat(numFmtIndex));
|
||||
if (CellDataType.NUMBER == this.cellDataType && ExcelSaxUtil.isDateFormat(numFmtIndex, numFmtString)) {
|
||||
cellDataType = CellDataType.DATE;
|
||||
}
|
||||
|
Reference in New Issue
Block a user