SimpleTriggerFactoryBean and CronTriggerFactoryBean fail without jobDetail [SPR-13604] #18182
Labels
status: backported
An issue that has been backported to maintenance branches
type: enhancement
A general enhancement
Milestone
Martin Benda opened SPR-13604 and commented
Factory beans
SimpleTriggerFactoryBean
andCronTriggerFactoryBean
throw NPE when theirjobDetail
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, thejobDetail
null check inafterPropertiesSet
(SimpleTriggerFactoryBean:221) is useless, becausejobDetail
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
The text was updated successfully, but these errors were encountered: