This commit is contained in:
Looly
2020-10-29 16:19:54 +08:00
parent 19eba6086f
commit 282e1e9090
8 changed files with 39 additions and 24 deletions

View File

@@ -9,7 +9,7 @@ import java.io.Serializable;
/**
* 定时任务计时器<br>
* 计时器线程每隔一分钟检查一次任务列表一旦匹配到执行对应的Task
* 计时器线程每隔一分钟(一秒钟)检查一次任务列表一旦匹配到执行对应的Task
* @author Looly
*
*/
@@ -57,7 +57,7 @@ public class CronTimer extends Thread implements Serializable {
spawnLauncher(thisTime);
}
}
log.debug("Hutool-cron timer stoped.");
log.debug("Hutool-cron timer stopped.");
}
/**

View File

@@ -111,8 +111,6 @@ public class CronPattern {
/**
* 构造
*
* @see CronPattern
*
* @param pattern 表达式
*/
public CronPattern(String pattern) {

View File

@@ -1,10 +1,10 @@
package cn.hutool.cron.pattern.matcher;
import cn.hutool.core.util.StrUtil;
import java.util.Collections;
import java.util.List;
import cn.hutool.core.util.StrUtil;
/**
* 将表达式中的数字值列表转换为Boolean数组匹配时匹配相应数组位
* @author Looly
@@ -31,6 +31,6 @@ public class BoolArrayValueMatcher implements ValueMatcher{
@Override
public String toString() {
return StrUtil.format("Matcher:{}", (Object)this.bValues);
return StrUtil.format("Matcher:{}", new Object[]{this.bValues});
}
}

View File

@@ -1,10 +1,12 @@
package cn.hutool.cron.pattern.matcher;
import cn.hutool.core.date.Month;
import java.util.List;
/**
* 每月第几天匹配<br>
* 考虑每月的天数不同,存在闰年情况,日匹配单独使用
* 考虑每月的天数不同,存在闰年情况,日匹配单独使用
*
* @author Looly
*
@@ -49,10 +51,6 @@ public class DayOfMonthValueMatcher extends BoolArrayValueMatcher {
* @return 是否为本月最后一天
*/
private static boolean isLastDayOfMonth(int value, int month, boolean isLeapYear) {
if (isLeapYear && month == 2) {
return value == 29;
} else {
return value == LAST_DAYS[month - 1];
}
return value == Month.getLastDay(month, isLeapYear);
}
}