mirror of
https://gitee.com/chinabugotech/hutool.git
synced 2025-07-21 15:09:48 +08:00
fix code
This commit is contained in:
@@ -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.");
|
||||
}
|
||||
|
||||
/**
|
||||
|
@@ -111,8 +111,6 @@ public class CronPattern {
|
||||
/**
|
||||
* 构造
|
||||
*
|
||||
* @see CronPattern
|
||||
*
|
||||
* @param pattern 表达式
|
||||
*/
|
||||
public CronPattern(String pattern) {
|
||||
|
@@ -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});
|
||||
}
|
||||
}
|
||||
|
@@ -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);
|
||||
}
|
||||
}
|
||||
|
Reference in New Issue
Block a user