summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorzhangshuai <[email protected]>2024-11-28 15:02:42 +0800
committerzhangshuai <[email protected]>2024-11-28 15:02:42 +0800
commit3611f9226cbe970c7e6702c20e85fb87c6ae2510 (patch)
tree428dae4a34354fdbf5e8e93d10e970a8a5b1d127
parent0c5c22f567191707c94d1e43df35e0e622456323 (diff)
feat: ASW-199 调整 cron 校验
-rw-r--r--src/main/java/net/geedge/asw/module/job/service/impl/JobCfgServiceImpl.java2
1 files changed, 1 insertions, 1 deletions
diff --git a/src/main/java/net/geedge/asw/module/job/service/impl/JobCfgServiceImpl.java b/src/main/java/net/geedge/asw/module/job/service/impl/JobCfgServiceImpl.java
index 6031fcc..ee3d36d 100644
--- a/src/main/java/net/geedge/asw/module/job/service/impl/JobCfgServiceImpl.java
+++ b/src/main/java/net/geedge/asw/module/job/service/impl/JobCfgServiceImpl.java
@@ -121,7 +121,7 @@ public class JobCfgServiceImpl extends ServiceImpl<JobCfgDao, JobCfgEntity> impl
if (T.StrUtil.equals(cfg.getType(), "cron") && cfg.getCron() == null) {
throw new ASWException(RCode.JOB_CFG_CRON_CANNOT_EMPTY);
}
- if (cfg.getCron() != null && !CronExpression.isValidExpression(cfg.getCron())) {
+ if (T.StrUtil.isNotEmpty(cfg.getCron()) && !CronExpression.isValidExpression(cfg.getCron())) {
throw new ASWException(RCode.JOB_CFG_CRON_ERROR);
}