@@ -128,7 +128,7 @@ public void setJobSchedulingDataLocation(String jobSchedulingDataLocation) {
128
128
* to jobs defined directly on this SchedulerFactoryBean.
129
129
* @see org.quartz.xml.XmlSchedulingDataProcessor
130
130
*/
131
- public void setJobSchedulingDataLocations (String [] jobSchedulingDataLocations ) {
131
+ public void setJobSchedulingDataLocations (String ... jobSchedulingDataLocations ) {
132
132
this .jobSchedulingDataLocations = jobSchedulingDataLocations ;
133
133
}
134
134
@@ -142,9 +142,8 @@ public void setJobSchedulingDataLocations(String[] jobSchedulingDataLocations) {
142
142
* @see org.quartz.JobDetail
143
143
* @see JobDetailBean
144
144
* @see JobDetailAwareTrigger
145
- * @see org.quartz.Trigger#setJobName
146
145
*/
147
- public void setJobDetails (JobDetail [] jobDetails ) {
146
+ public void setJobDetails (JobDetail ... jobDetails ) {
148
147
// Use modifiable ArrayList here, to allow for further adding of
149
148
// JobDetail objects during autodetection of JobDetailAwareTriggers.
150
149
this .jobDetails = new ArrayList <JobDetail >(Arrays .asList (jobDetails ));
@@ -156,7 +155,6 @@ public void setJobDetails(JobDetail[] jobDetails) {
156
155
* @param calendars Map with calendar names as keys as Calendar
157
156
* objects as values
158
157
* @see org.quartz.Calendar
159
- * @see org.quartz.Trigger#setCalendarName
160
158
*/
161
159
public void setCalendars (Map <String , Calendar > calendars ) {
162
160
this .calendars = calendars ;
@@ -175,56 +173,58 @@ public void setCalendars(Map<String, Calendar> calendars) {
175
173
* @see CronTriggerBean
176
174
* @see SimpleTriggerBean
177
175
*/
178
- public void setTriggers (Trigger [] triggers ) {
176
+ public void setTriggers (Trigger ... triggers ) {
179
177
this .triggers = Arrays .asList (triggers );
180
178
}
181
179
182
180
183
181
/**
184
182
* Specify Quartz SchedulerListeners to be registered with the Scheduler.
185
183
*/
186
- public void setSchedulerListeners (SchedulerListener [] schedulerListeners ) {
184
+ public void setSchedulerListeners (SchedulerListener ... schedulerListeners ) {
187
185
this .schedulerListeners = schedulerListeners ;
188
186
}
189
187
190
188
/**
191
189
* Specify global Quartz JobListeners to be registered with the Scheduler.
192
190
* Such JobListeners will apply to all Jobs in the Scheduler.
193
191
*/
194
- public void setGlobalJobListeners (JobListener [] globalJobListeners ) {
192
+ public void setGlobalJobListeners (JobListener ... globalJobListeners ) {
195
193
this .globalJobListeners = globalJobListeners ;
196
194
}
197
195
198
196
/**
199
197
* Specify named Quartz JobListeners to be registered with the Scheduler.
200
198
* Such JobListeners will only apply to Jobs that explicitly activate
201
199
* them via their name.
200
+ * <p>Note that non-global JobListeners are not supported on Quartz 2.x -
201
+ * manually register a Matcher against the Quartz ListenerManager instead.
202
202
* @see org.quartz.JobListener#getName
203
- * @see org.quartz.JobDetail#addJobListener
204
203
* @see JobDetailBean#setJobListenerNames
205
204
*/
206
- public void setJobListeners (JobListener [] jobListeners ) {
205
+ public void setJobListeners (JobListener ... jobListeners ) {
207
206
this .jobListeners = jobListeners ;
208
207
}
209
208
210
209
/**
211
210
* Specify global Quartz TriggerListeners to be registered with the Scheduler.
212
211
* Such TriggerListeners will apply to all Triggers in the Scheduler.
213
212
*/
214
- public void setGlobalTriggerListeners (TriggerListener [] globalTriggerListeners ) {
213
+ public void setGlobalTriggerListeners (TriggerListener ... globalTriggerListeners ) {
215
214
this .globalTriggerListeners = globalTriggerListeners ;
216
215
}
217
216
218
217
/**
219
218
* Specify named Quartz TriggerListeners to be registered with the Scheduler.
220
219
* Such TriggerListeners will only apply to Triggers that explicitly activate
221
220
* them via their name.
221
+ * <p>Note that non-global TriggerListeners are not supported on Quartz 2.x -
222
+ * manually register a Matcher against the Quartz ListenerManager instead.
222
223
* @see org.quartz.TriggerListener#getName
223
- * @see org.quartz.Trigger#addTriggerListener
224
224
* @see CronTriggerBean#setTriggerListenerNames
225
225
* @see SimpleTriggerBean#setTriggerListenerNames
226
226
*/
227
- public void setTriggerListeners (TriggerListener [] triggerListeners ) {
227
+ public void setTriggerListeners (TriggerListener ... triggerListeners ) {
228
228
this .triggerListeners = triggerListeners ;
229
229
}
230
230
@@ -251,8 +251,8 @@ protected void registerJobsAndTriggers() throws SchedulerException {
251
251
if (this .transactionManager != null ) {
252
252
transactionStatus = this .transactionManager .getTransaction (new DefaultTransactionDefinition ());
253
253
}
254
- try {
255
254
255
+ try {
256
256
if (this .jobSchedulingDataLocations != null ) {
257
257
ClassLoadHelper clh = new ResourceLoaderClassLoadHelper (this .resourceLoader );
258
258
clh .initialize ();
@@ -396,7 +396,7 @@ private JobDetail findJobDetail(Trigger trigger) {
396
396
}
397
397
else {
398
398
try {
399
- Map jobDataMap = (Map ) ReflectionUtils .invokeMethod (Trigger .class .getMethod ("getJobDataMap" ), trigger );
399
+ Map <?, ?> jobDataMap = (Map <?, ?> ) ReflectionUtils .invokeMethod (Trigger .class .getMethod ("getJobDataMap" ), trigger );
400
400
return (JobDetail ) jobDataMap .remove (JobDetailAwareTrigger .JOB_DETAIL_KEY );
401
401
}
402
402
catch (NoSuchMethodException ex ) {
0 commit comments