Skip to content

Commit 1e5882b

Browse files
author
Dave Syer
committed
Make copy of job parameters before weeding out non-identifying ones
Fixes gh-1125
1 parent c04deec commit 1e5882b

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed

spring-boot-autoconfigure/src/main/java/org/springframework/boot/autoconfigure/batch/JobLauncherCommandLineRunner.java

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -153,7 +153,8 @@ else if (previousExecution.getStatus() == BatchStatus.STOPPED
153153
|| previousExecution.getStatus() == BatchStatus.FAILED) {
154154
// Retry a failed or stopped execution
155155
jobParameters = previousExecution.getJobParameters();
156-
for (Entry<String, JobParameter> parameter : additionals.entrySet()) {
156+
for (Entry<String, JobParameter> parameter : new HashMap<String, JobParameter>(
157+
additionals).entrySet()) {
157158
// Non-identifying additional parameters can be added to a retry
158159
if (!parameter.getValue().isIdentifying()) {
159160
additionals.remove(parameter.getKey());

0 commit comments

Comments
 (0)