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

SimpleTriggerFactoryBean and CronTriggerFactoryBean fail without jobDetail [SPR-13604] #18182

Closed
spring-projects-issues opened this issue Oct 23, 2015 · 6 comments
Assignees
Labels
status: backported An issue that has been backported to maintenance branches type: enhancement A general enhancement
Milestone

Comments

@spring-projects-issues
Copy link
Collaborator

spring-projects-issues commented Oct 23, 2015

Martin Benda opened SPR-13604 and commented

Factory beans SimpleTriggerFactoryBean and CronTriggerFactoryBean throw NPE when their jobDetail property is not set. This makes it impossible to create triggers without associated job detail (something that we need in our application and that worked fine in Spring 3.x). Moreover, the jobDetail null check in afterPropertiesSet (SimpleTriggerFactoryBean:221) is useless, because jobDetail is dereferenced without any null checking later in this method.

Making it possible to create triggers without job detail will make these bean factories more flexible and should not break any current uses of these beans.


Affects: 3.2.16, 4.2.3

Issue Links:

Referenced from: pull request #896, and commits 2970065, 8adff1b, 67a65ea

Backported to: 3.2.17

@spring-projects-issues
Copy link
Collaborator Author

spring-projects-issues commented Oct 23, 2015

Martin Benda commented

Pull request URL added.

@spring-projects-issues
Copy link
Collaborator Author

spring-projects-issues commented Nov 18, 2015

Martin Benda commented

Changing "Affects Version/s" to 4.2.3; issue is still present in the latest version.

@spring-projects-issues
Copy link
Collaborator Author

spring-projects-issues commented Jan 19, 2016

Juergen Hoeller commented

As far as I can see, this never worked with Cron/SimpleTriggerFactoryBean... Are you maybe referring to the old Cron/SimpleTriggerBean for Quartz 1.x where this actually worked?

This is worth fixing in any case. It's just not a regression in those particular classes then.

Juergen

@spring-projects-issues
Copy link
Collaborator Author

spring-projects-issues commented Jan 19, 2016

Stéphane Nicoll commented

Fixed on master and available in 4.3.0.BUILD-SNAPSHOT in a couple of hours. Juergen Hoeller can you please review and backport to 4.2?

@spring-projects-issues
Copy link
Collaborator Author

spring-projects-issues commented Jan 19, 2016

Juergen Hoeller commented

Sure, will do...

@spring-projects-issues
Copy link
Collaborator Author

spring-projects-issues commented Jan 19, 2016

Martin Benda commented

As far as I can see, this never worked with Cron/SimpleTriggerFactoryBean... Are you maybe referring to the old Cron/SimpleTriggerBean for Quartz 1.x where this actually worked?

Yes, you are right, I was referring to SimpleTriggerBean from Spring 3.2.8.RELEASE.

Thanks!

@spring-projects-issues spring-projects-issues added status: backported An issue that has been backported to maintenance branches type: enhancement A general enhancement labels Jan 11, 2019
@spring-projects-issues spring-projects-issues added this to the 4.2.5 milestone Jan 11, 2019
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
status: backported An issue that has been backported to maintenance branches type: enhancement A general enhancement
Projects
None yet
Development

No branches or pull requests

2 participants