-
Notifications
You must be signed in to change notification settings - Fork 38.7k
Closed
Labels
in: coreIssues in core modules (aop, beans, core, context, expression)Issues in core modules (aop, beans, core, context, expression)type: enhancementA general enhancementA general enhancement
Milestone
Description
Arcadius Ahouansou opened SPR-14933 and commented
With Spring, the
CronSequenceGenerator.parse()
method does not seem robust enough....
It silently takes expressions such as
0 0/05 * * * *SUN
0 0/05 * * * SUN*
0 0/05 *ANYTHING_HERE * * *
as valid cron expressions.
Moreover,
0 0/05 * * * MON-SUN
throws
java.lang.IllegalArgumentException: Overflow in day for expression "0 0/05 * * * MON-SUN"
Ideally, we want to have a proper and robust cron expression validator.
Note that this issue is related to #13621
Affects: 4.3.4
Attachments:
- CronExpressionValidationEnhancement.java (1.35 kB)
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)
- Cron expression validation method in CronSequenceGenerator improved [SPR-15604] #20163 Cron expression validation method in CronSequenceGenerator improved
Metadata
Metadata
Assignees
Labels
in: coreIssues in core modules (aop, beans, core, context, expression)Issues in core modules (aop, beans, core, context, expression)type: enhancementA general enhancementA general enhancement