Skip to content

Commit f835188

Browse files
committed
Remove the JobDetail from the job data map after discovering it
Issue: SPR-10775
1 parent d504d69 commit f835188

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

Diff for: spring-context-support/src/main/java/org/springframework/scheduling/quartz/SchedulerAccessor.java

+2-2
Original file line numberDiff line numberDiff line change
@@ -52,7 +52,7 @@
5252
* <p>For concrete usage, check out the {@link SchedulerFactoryBean} and
5353
* {@link SchedulerAccessorBean} classes.
5454
*
55-
* <p>Compatible with Quartz 1.8 as well as Quartz 2.0/2.1, as of Spring 4.0.
55+
* <p>Compatible with Quartz 1.8 as well as Quartz 2.0-2.2, as of Spring 4.0.
5656
*
5757
* @author Juergen Hoeller
5858
* @since 2.5.6
@@ -383,7 +383,7 @@ private JobDetail findJobDetail(Trigger trigger) {
383383
else {
384384
try {
385385
Map jobDataMap = (Map) ReflectionUtils.invokeMethod(Trigger.class.getMethod("getJobDataMap"), trigger);
386-
return (JobDetail) jobDataMap.get(JobDetailAwareTrigger.JOB_DETAIL_KEY);
386+
return (JobDetail) jobDataMap.remove(JobDetailAwareTrigger.JOB_DETAIL_KEY);
387387
}
388388
catch (NoSuchMethodException ex) {
389389
throw new IllegalStateException("Inconsistent Quartz API: " + ex);

0 commit comments

Comments
 (0)