mirror of
https://github.com/apache/cloudstack.git
synced 2025-11-03 04:12:31 +01:00
server: fix comparison using nullable objects (#4256)
This PR fix some wrongs comparison using nullable objects. Preventing null pointer exception
This commit is contained in:
parent
7bbb4d4bef
commit
6704ef2794
@ -2199,7 +2199,7 @@ public class VolumeApiServiceImpl extends ManagerBase implements VolumeApiServic
|
||||
// OfflineVmwareMigration: check storage tags on disk(offering)s in comparison to destination storage pool
|
||||
// OfflineVmwareMigration: if no match return a proper error now
|
||||
DiskOfferingVO diskOffering = _diskOfferingDao.findById(vol.getDiskOfferingId());
|
||||
if (diskOffering.equals(null)) {
|
||||
if (diskOffering == null) {
|
||||
throw new CloudRuntimeException("volume '" + vol.getUuid() + "', has no diskoffering. Migration target cannot be checked.");
|
||||
}
|
||||
if (!doesTargetStorageSupportDiskOffering(destPool, diskOffering)) {
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user