From 26e4de22fe0fca47e5d85662a32ae2e09f57688a Mon Sep 17 00:00:00 2001 From: Nitin Mehta Date: Fri, 17 Feb 2012 16:34:17 +0530 Subject: [PATCH] Bug 13836: NPE fix. If snapshot is already removed say so-do not try and delete it again. Reviewed-By: Kishan --- server/src/com/cloud/storage/snapshot/SnapshotManagerImpl.java | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/server/src/com/cloud/storage/snapshot/SnapshotManagerImpl.java b/server/src/com/cloud/storage/snapshot/SnapshotManagerImpl.java index 0ffec94516a..9179a70aae6 100755 --- a/server/src/com/cloud/storage/snapshot/SnapshotManagerImpl.java +++ b/server/src/com/cloud/storage/snapshot/SnapshotManagerImpl.java @@ -741,7 +741,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); }