Closed
Description
JobParameters#getParameters()
currently returns a mutable defensive copy of the job parameters, even though the Javadoc says
@return an unmodifiable map containing all parameters.
This means that anybody who just wants read-only access to the job parameters, eg. only to iterate over them, eg. SimpleJobRepository#createJobExecution
has to incur the cost of a defensive copy of a LinkedHashMap
. Copying a LinkedHashMap
is unfortunately quite expensive in term of memory allocation.
It looks like to copy was made modifiable with BATCH-671 / #2905 / e68a413