Closed
Description
Edward opened SPR-14462 and commented
CronSequenceGenerator
next(Date date)
method causes a StackOverflowError if there is a range value in the 'minutes' or 'hours' fields where the numbers are reversed.
For example :
public static void main(String[] s) {
new CronSequenceGenerator("* 6-5 * * * *").next(new Date());
System.out.println("Won't get here cos StackOverflowError");
}
It seems to me it is fixed by adding another check to the getRange(String field, int min, int max)
method
Affects: 3.2.17, 4.2.7, 4.3.1
Issue Links:
- CronSequenceGenerator constructor goes into infinite loop with invalid increments [SPR-12871] #17469 CronSequenceGenerator constructor goes into infinite loop with invalid increments
- CronSequenceGenerator.next() is not implemented as documented [SPR-14589] #19158 CronSequenceGenerator.next() is not implemented as documented