disk resize NPE, if the new disk offering doesn't have tags, then NPE

This commit is contained in:
Edison Su 2013-09-25 16:29:01 -07:00
parent 0eb3944fc8
commit d1a14fbf95

View File

@ -757,7 +757,7 @@ public class VolumeApiServiceImpl extends ManagerBase implements VolumeApiServic
} }
if (diskOffering.getTags() != null) { if (diskOffering.getTags() != null) {
if (!newDiskOffering.getTags().equals(diskOffering.getTags())) { if (newDiskOffering.getTags() == null || !newDiskOffering.getTags().equals(diskOffering.getTags())) {
throw new InvalidParameterValueException("Tags on new and old disk offerings must match"); throw new InvalidParameterValueException("Tags on new and old disk offerings must match");
} }
} else if (newDiskOffering.getTags() != null) { } else if (newDiskOffering.getTags() != null) {