Workaround for NPE

This commit is contained in:
Hugo Trippaers 2013-07-03 09:58:12 +02:00
parent 5396dfa55c
commit 4e823e3a3e

View File

@ -1522,7 +1522,13 @@ public class StorageManagerImpl extends ManagerBase implements StorageManager, C
}
long futureIops = currentIops + requestedIops;
// getCapacityIops returns a Long so we need to check for null
if (pool.getCapacityIops() == null) {
s_logger.warn("Storage pool " + pool.getName() + " (" + pool.getId() + ") does not supply Iops capacity, assuming enough capacity");
return true;
}
return futureIops <= pool.getCapacityIops();
}