fix comment

This commit is contained in:
Looly 2025-02-18 15:13:08 +08:00
parent 913077747e
commit dda0862c1c

View File

@ -34,11 +34,12 @@ import java.util.concurrent.locks.ReentrantLock;
* {@link #setMatchSecond(boolean)} 方法用于定义是否使用秒匹配模式如果为true则定时任务表达式中的第一位为秒否则为分默认是分
*
* @author Looly
*
*/
public class CronUtil {
/** Crontab配置文件 */
/**
* Crontab配置文件
*/
public static final String CRONTAB_CONFIG_PATH = "config/cron.setting";
/**
* Crontab配置文件2
@ -214,15 +215,17 @@ public class CronUtil {
/**
* 验证是否为合法的Cron表达式
*
* @param expression 表达式
*/
public static boolean isValidExpression(String expression) {
public static boolean isValidExpression(final String expression) {
if (expression == null) {
return false;
} else {
try {
PatternParser.parse(expression);
return true;
} catch (RuntimeException e) {
} catch (final RuntimeException e) {
return false;
}
}