Bug 13836: NPE fix. If snapshot is already removed say so-do not try and delete it again.

Reviewed-By: Kishan
This commit is contained in:
Nitin Mehta 2012-02-17 16:29:49 +05:30
parent 1d96a17698
commit 87be3ca686

View File

@ -739,7 +739,7 @@ public class SnapshotManagerImpl implements SnapshotManager, SnapshotService, Ma
Account caller = UserContext.current().getCaller();
// Verify parameters
Snapshot snapshotCheck = _snapshotDao.findByIdIncludingRemoved(snapshotId);
Snapshot snapshotCheck = _snapshotDao.findById(snapshotId);
if (snapshotCheck == null) {
throw new InvalidParameterValueException("unable to find a snapshot with id " + snapshotId);
}