Skip to content

Commit

Permalink
Remove the JobDetail from the job data map after discovering it
Browse files Browse the repository at this point in the history
Issue: SPR-10775
  • Loading branch information
jhoeller authored and unknown committed Jul 30, 2013
1 parent dfac1d0 commit d5c78c9
Showing 1 changed file with 3 additions and 3 deletions.
@@ -1,5 +1,5 @@
/*
* Copyright 2002-2012 the original author or authors.
* Copyright 2002-2013 the original author or authors.
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
Expand Down Expand Up @@ -51,7 +51,7 @@
* <p>For concrete usage, check out the {@link SchedulerFactoryBean} and
* {@link SchedulerAccessorBean} classes.
*
* <p>Compatible with Quartz 1.5+ as well as Quartz 2.0/2.1, as of Spring 3.1.
* <p>Compatible with Quartz 1.5+ as well as Quartz 2.0-2.2, as of Spring 3.2.
*
* @author Juergen Hoeller
* @since 2.5.6
Expand Down Expand Up @@ -397,7 +397,7 @@ private JobDetail findJobDetail(Trigger trigger) {
else {
try {
Map jobDataMap = (Map) ReflectionUtils.invokeMethod(Trigger.class.getMethod("getJobDataMap"), trigger);
return (JobDetail) jobDataMap.get(JobDetailAwareTrigger.JOB_DETAIL_KEY);
return (JobDetail) jobDataMap.remove(JobDetailAwareTrigger.JOB_DETAIL_KEY);
}
catch (NoSuchMethodException ex) {
throw new IllegalStateException("Inconsistent Quartz API: " + ex);
Expand Down

0 comments on commit d5c78c9

Please sign in to comment.