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
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.
JobParameters#getParameters()
currently returns a mutable defensive copy of the job parameters, even though the Javadoc saysThis 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 aLinkedHashMap
. Copying aLinkedHashMap
is unfortunately quite expensive in term of memory allocation.It looks like to copy was made modifiable with BATCH-671 / #2905 / e68a413
The text was updated successfully, but these errors were encountered: