Bug description
StepExecution instances created via MetaDataInstanceFactory.createStepExecution(JobParameters) do not reference the provided JobParameters.
This appears to be a side effect introduced by the following commit:
90d8959
Environment
Spring Batch v6.0.0
Steps to reproduce
The following test case reproduces the bug:
@Test
void testCreateStepExecutionJobParameters() {
JobParameters parameters = new JobParametersBuilder()
.addString("foo", "bar")
.toJobParameters();
StepExecution stepExecution = MetaDataInstanceFactory.createStepExecution(parameters);
String paramValue = stepExecution.getJobExecution().getJobParameters().getString("foo");
assertEquals("bar", paramValue);
}