Skip to content

Commit beb9065

Browse files
committed
Fix inaccurate exception message in TaskExecutorJobLauncher
The JobExecutionAlreadyRunningException thrown by TaskExecutorJobLauncher currently includes the JobInstance details instead of the running JobExecution details. This commit updates the exception to pass the running JobExecution. Resolves #5280 Signed-off-by: kojw1017 <kojw1017@naver.com>
1 parent 2e9755d commit beb9065

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

spring-batch-core/src/main/java/org/springframework/batch/core/launch/support/TaskExecutorJobLauncher.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -134,7 +134,7 @@ private JobExecution createJobExecution(Job job, JobParameters jobParameters)
134134
for (JobExecution execution : executions) {
135135
if (execution.isRunning()) {
136136
throw new JobExecutionAlreadyRunningException(
137-
"A job execution for this job is already running: " + jobInstance);
137+
"A job execution for this job is already running: " + execution);
138138
}
139139
BatchStatus status = execution.getStatus();
140140
if (status == BatchStatus.UNKNOWN) {

0 commit comments

Comments
 (0)