rafaelweingartner commented on a change in pull request #2573: Cloudstack 10356
URL: https://github.com/apache/cloudstack/pull/2573#discussion_r181748053
##########
File path:
plugins/deployment-planners/implicit-dedication/src/main/java/com/cloud/deploy/ImplicitDedicationPlanner.java
##########
@@ -256,14 +256,15 @@ public PlannerResourceUsage
getResourceUsage(VirtualMachineProfile vmProfile, De
// Get the list of all the hosts in the given clusters
List<Long> allHosts = new ArrayList<Long>();
- for (Long cluster : clusterList) {
- List<HostVO> hostsInCluster =
resourceMgr.listAllHostsInCluster(cluster);
- for (HostVO hostVO : hostsInCluster) {
+ if (clusterList != null && !clusterList.isEmpty()) {
Review comment:
You can use `CollectionUtils.isNotEmpty` here.
----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on GitHub and use the
URL above to go to the specific comment.
For queries about this service, please contact Infrastructure at:
[email protected]
With regards,
Apache Git Services