Fixed the NPE at RecreateHostAllocator found when a Pod with no cluster was present in the system.

This commit is contained in:
prachi 2011-03-18 18:08:47 -07:00
parent 47db8c2c59
commit 8da874ca0b
1 changed files with 1 additions and 1 deletions

View File

@ -116,7 +116,7 @@ public class RecreateHostAllocator extends FirstFitRoutingAllocator {
}
for (PodCluster p : pcs) {
long clusterId = p.getCluster() == null ? null : p.getCluster().getId();
Long clusterId = p.getCluster() == null ? null : p.getCluster().getId();
DataCenterDeployment newPlan = new DataCenterDeployment(plan.getDataCenterId(), p.getPod().getId(), clusterId, null);
hosts = super.allocateTo(vm, newPlan, type, avoid, returnUpTo);
if (hosts != null && !hosts.isEmpty()) {