Skip to content

CronSequenceGenerator constructor goes into infinite loop with invalid increments [SPR-12871] #17469

Closed
@spring-projects-issues

Description

@spring-projects-issues

Edward opened SPR-12871 and commented

The constructor for the org.springframework.scheduling.support.CronSequenceGenerator will go into an infinite loop if one of the fields is of the form n/0

For example

public static void main (String[] s) {
    new CronSequenceGenerator("*/0 * * * * *");
    System.out.println("We will never get here");
}

I guess that either the /0 should be ignored, or it should throw an IllegalArgumentException


Affects: 3.2.13, 4.1.6

Issue Links:

Referenced from: commits ceb17fc, b5a56ca, 50f4977

Backported to: 3.2.14

Metadata

Metadata

Assignees

Labels

in: coreIssues in core modules (aop, beans, core, context, expression)status: backportedAn issue that has been backported to maintenance branchestype: bugA general bug

Type

No type

Projects

No projects

Milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions