未验证 提交 2c4473ee 编写于 作者: K Kerwin 提交者: GitHub

cherry pick #10523 (#10524)

上级 8edaa6a7
......@@ -127,7 +127,7 @@ public class CronUtils {
while (Stopper.isRunning()) {
startTime = cronExpression.getNextValidTimeAfter(startTime);
if (startTime.after(endTime)) {
if (startTime == null || startTime.after(endTime)) {
break;
}
dateList.add(startTime);
......@@ -149,7 +149,7 @@ public class CronUtils {
List<Date> dateList = new ArrayList<>();
while (fireTimes > 0) {
startTime = cronExpression.getNextValidTimeAfter(startTime);
if (startTime.after(endTime) || startTime.equals(endTime)) {
if (startTime == null || startTime.after(endTime) || startTime.equals(endTime)) {
break;
}
dateList.add(startTime);
......@@ -172,7 +172,7 @@ public class CronUtils {
while (Stopper.isRunning()) {
startTime = cronExpression.getNextValidTimeAfter(startTime);
if (startTime.after(endTime) || startTime.equals(endTime)) {
if (startTime == null || startTime.after(endTime) || startTime.equals(endTime)) {
break;
}
dateList.add(startTime);
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册