Sho SHIMIZU

Don't create an empty set by using Stream API

Change-Id: I835cbf6f4926c3391e901597b6d8d203f28a3f41
......@@ -209,9 +209,9 @@ public class ConsistentLinkResourceStore extends
tx.begin();
try {
Map<ResourceType, Set<ResourceAllocation>> freeResources = getFreeResourcesEx(tx, link);
Set<ResourceAllocation> allFree = new HashSet<>();
freeResources.values().forEach(allFree::addAll);
return allFree;
return freeResources.values().stream()
.flatMap(Collection::stream)
.collect(Collectors.toSet());
} finally {
tx.abort();
}
......