-
Notifications
You must be signed in to change notification settings - Fork 38.6k
Closed
Labels
in: coreIssues in core modules (aop, beans, core, context, expression)Issues in core modules (aop, beans, core, context, expression)type: bugA general bugA general bug
Milestone
Description
Lauri Kimmel opened SPR-17036 and commented
Unit test below is failing with message
Overflow in day for expression "0 0 0 13 * FRI"
public void testFriday13Failure() {
String cronExpression = "0 0 0 13 * FRI";
assertThat(CronSequenceGenerator.isValidExpression(cronExpression), is(true));
CronSequenceGenerator gen = new CronSequenceGenerator(cronExpression);
Instant instant = Instant.parse("2018-07-13T11:47:14Z");
gen.next(Date.from(instant));
}
2018-07-13 is Friday 13th;
2019-09-13 is next Friday 13th;
there are 427 days between which is exceeding max limit 366 in CronSequenceGenerator.findNextDay()
.
Affects: 4.3.10
Issue Links:
- Cron expression with fixed weekday and fixed date may or may not lead to IllegalStateException (runaway search for next trigger) [SPR-8981] #13621 Cron expression with fixed weekday and fixed date may or may not lead to IllegalStateException (runaway search for next trigger)
Metadata
Metadata
Assignees
Labels
in: coreIssues in core modules (aop, beans, core, context, expression)Issues in core modules (aop, beans, core, context, expression)type: bugA general bugA general bug