修复DateUtil.offset空指针问题

This commit is contained in:
Looly 2024-06-14 01:34:22 +08:00
parent 682cf265c4
commit c8a1d67726
2 changed files with 4 additions and 0 deletions

View File

@ -16,6 +16,7 @@
* 【core 】 修复BeanUtil.isBean判断Dict错误问题issue#I9VTZG@Gitee
* 【core 】 修复VersionComparator传入空字符串报错问题pr#3614@Github
* 【core 】 修复CaseInsensitiveLinkedMap顺序错误问题issue#IA4K4F@Gitee
* 【core 】 修复DateUtil.offset空指针问题issue#3617@Github
-------------------------------------------------------------------------------------------------------------
# 5.8.28(2024-05-29)

View File

@ -1460,6 +1460,9 @@ public class DateUtil extends CalendarUtil {
* @return 偏移后的日期
*/
public static DateTime offset(Date date, DateField dateField, int offset) {
if (date == null) {
return null;
}
return dateNew(date).offset(dateField, offset);
}