Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Cron expression validation method in CronSequenceGenerator improved [SPR-15604] #20163

Closed
spring-projects-issues opened this issue Jun 1, 2017 · 1 comment

Comments

@spring-projects-issues
Copy link
Collaborator

@spring-projects-issues spring-projects-issues commented Jun 1, 2017

Ruslan Sibgatullin opened SPR-15604 and commented

This method validated only fields length of the given expression, not the validity of cron expression. It seems logical that the method with name 'isValidExpression' would validate cron as well.
Plus, possible NPE fixed.


Affects: 4.3.8

Issue Links:

  • #20242 NullPointerException if cron expression is null ("is duplicated by")
  • #19500 Cron Expression validation

Referenced from: pull request #1442, and commits 674e232, 5f4d1a4

@spring-projects-issues
Copy link
Collaborator Author

@spring-projects-issues spring-projects-issues commented Jun 29, 2017

Juergen Hoeller commented

Thanks for raising this! I've implemented this in a slightly different fashion, doing some basic validation upfront and then using a custom CronSequenceGenerator created via a new constructor... so that we reduce the need to catch IllegalArgumentException.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Linked pull requests

Successfully merging a pull request may close this issue.

None yet
2 participants