You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Bug description
In Spring Batch 4.x DefaultJobParametersExtractor used to copy its configured keys from JobParameters when not contained in the ExecutionContext. In 5.x, this broke. It will now only consider JobParameters keys when useAllParentParameters is set to true. In that case it will copy JobParameters indiscriminately.
Judging by the javadoc and parameter names, I reckon this is a bug and behavior should be reverted to its 4.x behavior.
Environment
Spring Batch 5.0.3 and also present in main branch.
Steps to reproduce
Use a DefaultJobParametersExtractor with useAllParentParameters = false and keys = ["jobParamKey"]
Run getJobParameters for an ExecutionContext without jobParamKey set, and with parent JobParameters containing a value for jobParamKey
Observe that the created JobParameters does not have a value for jobParamKey
Expected behavior
I expected same behavior as in 4.x: jobParamKey propagated to new JobParameters.
Minimal Complete Reproducible example
I will attach create a MR containing test case shortly.
The text was updated successfully, but these errors were encountered:
Fix DefaultJobParametersExtractor to copy values from JobParameters when
they are missing from ExecutionContext. Javadoc states this class is
supposed to do just that, but seems to have broken in the 5.x API revamp.
Resolves#4458
(cherry picked from commit b2a287d)
Fix DefaultJobParametersExtractor to copy values from JobParameters when
they are missing from ExecutionContext. Javadoc states this class is
supposed to do just that, but seems to have broken in the 5.x API revamp.
Resolvesspring-projects#4458
Bug description
In Spring Batch 4.x
DefaultJobParametersExtractor
used to copy its configured keys fromJobParameters
when not contained in theExecutionContext
. In 5.x, this broke. It will now only considerJobParameters
keys whenuseAllParentParameters
is set to true. In that case it will copy JobParameters indiscriminately.Judging by the javadoc and parameter names, I reckon this is a bug and behavior should be reverted to its 4.x behavior.
Environment
Spring Batch 5.0.3 and also present in main branch.
Steps to reproduce
DefaultJobParametersExtractor
withuseAllParentParameters = false
andkeys = ["jobParamKey"]
jobParamKey
set, and with parentJobParameters
containing a value forjobParamKey
JobParameters
does not have a value forjobParamKey
Expected behavior
I expected same behavior as in 4.x:
jobParamKey
propagated to newJobParameters
.Minimal Complete Reproducible example
I will attach create a MR containing test case shortly.
The text was updated successfully, but these errors were encountered: