Skip to content

Commit 1e91276

Browse files
committed
Remove conditional as it was never actually reached in the original flow
1 parent cadcfc1 commit 1e91276

File tree

1 file changed

+0
-4
lines changed

1 file changed

+0
-4
lines changed

server/src/main/java/com/cloud/agent/manager/allocator/impl/RandomAllocator.java

Lines changed: 0 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -127,10 +127,6 @@ public List<Host> allocateTo(VirtualMachineProfile vmProfile, DeploymentPlan pla
127127
@Override
128128
public List<Host> allocateTo(VirtualMachineProfile vmProfile, DeploymentPlan plan, Type type, ExcludeList avoid, List<? extends Host> hosts, int returnUpTo,
129129
boolean considerReservedCapacity) {
130-
if (CollectionUtils.isEmpty(hosts)) {
131-
logger.debug("Random Allocator found 0 hosts as given host list is empty");
132-
return new ArrayList<>();
133-
}
134130
return findSuitableHosts(vmProfile, plan, type, avoid, hosts, returnUpTo, considerReservedCapacity);
135131
}
136132
}

0 commit comments

Comments
 (0)