Skip to content

Commit

Permalink
JDK 11 build and test fix
Browse files Browse the repository at this point in the history
Signed-off-by: Radek Felcman <[email protected]>
  • Loading branch information
rfelcman committed Oct 11, 2023
1 parent e712276 commit 105ba82
Showing 1 changed file with 5 additions and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -809,7 +809,11 @@ public UnitOfWorkChangeSet calculateChanges(Map registeredObjects, UnitOfWorkCha
// these are the objects remaining in the UnitOfWork privateOwnedObjects map
if (hasPrivateOwnedObjects()) {
Collection<Set> values = getPrivateOwnedObjects().values();
Map visitedObjects = new IdentityHashMap(values.stream().collect(Collectors.summingInt(Set::size)));
int initialSize = 0;
for (Set value: values) {
initialSize += value.size();
}
Map visitedObjects = new IdentityHashMap(initialSize);
for (Set privateOwnedObjects : values) {
for (Object objectToRemove : privateOwnedObjects) {
performRemovePrivateOwnedObjectFromChangeSet(objectToRemove, visitedObjects);
Expand Down

0 comments on commit 105ba82

Please sign in to comment.