Skip to content

Commit d5c78c9

Browse files
jhoellerunknown
authored and
unknown
committed
Remove the JobDetail from the job data map after discovering it
Issue: SPR-10775
1 parent dfac1d0 commit d5c78c9

File tree

1 file changed

+3
-3
lines changed

1 file changed

+3
-3
lines changed

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

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
/*
2-
* Copyright 2002-2012 the original author or authors.
2+
* Copyright 2002-2013 the original author or authors.
33
*
44
* Licensed under the Apache License, Version 2.0 (the "License");
55
* you may not use this file except in compliance with the License.
@@ -51,7 +51,7 @@
5151
* <p>For concrete usage, check out the {@link SchedulerFactoryBean} and
5252
* {@link SchedulerAccessorBean} classes.
5353
*
54-
* <p>Compatible with Quartz 1.5+ as well as Quartz 2.0/2.1, as of Spring 3.1.
54+
* <p>Compatible with Quartz 1.5+ as well as Quartz 2.0-2.2, as of Spring 3.2.
5555
*
5656
* @author Juergen Hoeller
5757
* @since 2.5.6
@@ -397,7 +397,7 @@ private JobDetail findJobDetail(Trigger trigger) {
397397
else {
398398
try {
399399
Map jobDataMap = (Map) ReflectionUtils.invokeMethod(Trigger.class.getMethod("getJobDataMap"), trigger);
400-
return (JobDetail) jobDataMap.get(JobDetailAwareTrigger.JOB_DETAIL_KEY);
400+
return (JobDetail) jobDataMap.remove(JobDetailAwareTrigger.JOB_DETAIL_KEY);
401401
}
402402
catch (NoSuchMethodException ex) {
403403
throw new IllegalStateException("Inconsistent Quartz API: " + ex);

0 commit comments

Comments
 (0)