Thanks to visit codestin.com
Credit goes to github.com

Skip to content

Commit 47aca4b

Browse files
committed
fix:4006修改
1 parent 29bcdc9 commit 47aca4b

File tree

3 files changed

+5
-5
lines changed

3 files changed

+5
-5
lines changed

hutool-cron/src/main/java/cn/hutool/cron/pattern/matcher/BoolArrayMatcher.java

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -35,6 +35,7 @@ public BoolArrayMatcher(List<Integer> intValueList) {
3535
}
3636
this.minValue = min;
3737
}
38+
3839
@Override
3940
public boolean match(Integer value) {
4041
if (null == value || value >= bValues.length) {

hutool-cron/src/main/java/cn/hutool/cron/pattern/matcher/DayOfMonthMatcher.java

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -50,7 +50,6 @@ private static boolean isLastDayOfMonth(int value, int month, boolean isLeapYear
5050
return value == Month.getLastDay(month - 1, isLeapYear);
5151
}
5252

53-
5453
public boolean isLast() {
5554
return match(31);
5655
}

hutool-cron/src/main/java/cn/hutool/cron/pattern/matcher/PatternMatcher.java

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -193,8 +193,8 @@ private int[] nextMatchValuesAfter(int[] values) {
193193
if (i == Part.DAY_OF_MONTH.ordinal()
194194
&& matchers[i] instanceof DayOfMonthMatcher
195195
&& ((DayOfMonthMatcher) matchers[i]).isLastDay(values[i],values[i+1],isLeapYear(values[Part.YEAR.ordinal()]))) {
196-
int newMonth = values[Part.MONTH.ordinal()];
197-
int newYear = values[Part.YEAR.ordinal()];
196+
int newMonth = newValues[Part.MONTH.ordinal()];
197+
int newYear = newValues[Part.YEAR.ordinal()];
198198
nextValue = getLastDay(newMonth, newYear);
199199
} else {
200200
nextValue = matchers[i].nextAfter(values[i]);
@@ -227,8 +227,8 @@ private int[] nextMatchValuesAfter(int[] values) {
227227
} else if (i == Part.DAY_OF_MONTH.ordinal()
228228
&& matchers[i] instanceof DayOfMonthMatcher
229229
&& ((DayOfMonthMatcher) matchers[i]).isLastDay(values[i],values[i+1],isLeapYear(values[Part.YEAR.ordinal()]))) {
230-
int newMonth = values[Part.MONTH.ordinal()];
231-
int newYear = values[Part.YEAR.ordinal()];
230+
int newMonth = newValues[Part.MONTH.ordinal()];
231+
int newYear = newValues[Part.YEAR.ordinal()];
232232
nextValue = getLastDay(newMonth, newYear);
233233
} else {
234234
nextValue = matchers[i].nextAfter(values[i] + 1);

0 commit comments

Comments
 (0)