You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@dolphinscheduler.apache.org by ke...@apache.org on 2022/06/22 01:09:25 UTC
[dolphinscheduler] branch 3.0.0-beta-2-prepare updated: cherry pick #10523 (#10524)
This is an automated email from the ASF dual-hosted git repository.
kerwin pushed a commit to branch 3.0.0-beta-2-prepare
in repository https://gitbox.apache.org/repos/asf/dolphinscheduler.git
The following commit(s) were added to refs/heads/3.0.0-beta-2-prepare by this push:
new 2c4473ee43 cherry pick #10523 (#10524)
2c4473ee43 is described below
commit 2c4473ee439f9ded3872e4f49b54f361eee8acda
Author: Kerwin <37...@users.noreply.github.com>
AuthorDate: Wed Jun 22 09:09:20 2022 +0800
cherry pick #10523 (#10524)
---
.../org/apache/dolphinscheduler/service/quartz/cron/CronUtils.java | 6 +++---
1 file changed, 3 insertions(+), 3 deletions(-)
diff --git a/dolphinscheduler-service/src/main/java/org/apache/dolphinscheduler/service/quartz/cron/CronUtils.java b/dolphinscheduler-service/src/main/java/org/apache/dolphinscheduler/service/quartz/cron/CronUtils.java
index 49810cd1f4..f8afd1f95c 100644
--- a/dolphinscheduler-service/src/main/java/org/apache/dolphinscheduler/service/quartz/cron/CronUtils.java
+++ b/dolphinscheduler-service/src/main/java/org/apache/dolphinscheduler/service/quartz/cron/CronUtils.java
@@ -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);