mirror of
https://github.com/hibernate/hibernate-orm
synced 2025-02-18 09:05:21 +00:00
HHH-14248 Refactor latestBatches from InsertActionSorter's field to temporary variable in its sort method
This commit is contained in:
parent
112d215371
commit
c3e43ecd11
@ -1129,9 +1129,6 @@ private boolean hasParent(BatchIdentifier batchIdentifier, List<BatchIdentifier>
|
||||
}
|
||||
}
|
||||
|
||||
// the mapping of entity names to their latest batch numbers.
|
||||
private List<BatchIdentifier> latestBatches;
|
||||
|
||||
// the map of batch numbers to EntityInsertAction lists
|
||||
private Map<BatchIdentifier, List<AbstractEntityInsertAction>> actionBatches;
|
||||
|
||||
@ -1143,9 +1140,11 @@ public InsertActionSorter() {
|
||||
*/
|
||||
public void sort(List<AbstractEntityInsertAction> insertions) {
|
||||
// optimize the hash size to eliminate a rehash.
|
||||
this.latestBatches = new ArrayList<>( );
|
||||
this.actionBatches = new HashMap<>();
|
||||
|
||||
// the mapping of entity names to their latest batch numbers.
|
||||
final List<BatchIdentifier> latestBatches = new ArrayList<>();
|
||||
|
||||
for ( AbstractEntityInsertAction action : insertions ) {
|
||||
BatchIdentifier batchIdentifier = new BatchIdentifier(
|
||||
action.getEntityName(),
|
||||
|
Loading…
x
Reference in New Issue
Block a user