Make copy of job parameters before weeding out non-identifying ones

Fixes gh-1125
This commit is contained in:
Dave Syer 2014-06-19 18:15:44 +01:00
parent c04deec6ee
commit 1e5882b19c
1 changed files with 2 additions and 1 deletions

View File

@ -153,7 +153,8 @@ public class JobLauncherCommandLineRunner implements CommandLineRunner,
|| previousExecution.getStatus() == BatchStatus.FAILED) {
// Retry a failed or stopped execution
jobParameters = previousExecution.getJobParameters();
for (Entry<String, JobParameter> parameter : additionals.entrySet()) {
for (Entry<String, JobParameter> parameter : new HashMap<String, JobParameter>(
additionals).entrySet()) {
// Non-identifying additional parameters can be added to a retry
if (!parameter.getValue().isIdentifying()) {
additionals.remove(parameter.getKey());