CID-1251369: not null check changed to null check
Project: http://git-wip-us.apache.org/repos/asf/cloudstack/repo Commit: http://git-wip-us.apache.org/repos/asf/cloudstack/commit/d2f28ea3 Tree: http://git-wip-us.apache.org/repos/asf/cloudstack/tree/d2f28ea3 Diff: http://git-wip-us.apache.org/repos/asf/cloudstack/diff/d2f28ea3 Branch: refs/heads/statscollector-graphite Commit: d2f28ea3ae063d44d8ec219a544fd0f70d344747 Parents: 18091e9 Author: Daan Hoogland <d...@onecht.net> Authored: Tue Nov 11 09:32:09 2014 +0100 Committer: Daan Hoogland <d...@onecht.net> Committed: Tue Nov 11 09:32:09 2014 +0100 ---------------------------------------------------------------------- server/src/com/cloud/storage/snapshot/SnapshotManagerImpl.java | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) ---------------------------------------------------------------------- http://git-wip-us.apache.org/repos/asf/cloudstack/blob/d2f28ea3/server/src/com/cloud/storage/snapshot/SnapshotManagerImpl.java ---------------------------------------------------------------------- diff --git a/server/src/com/cloud/storage/snapshot/SnapshotManagerImpl.java b/server/src/com/cloud/storage/snapshot/SnapshotManagerImpl.java index 10449e3..bcb2242 100755 --- a/server/src/com/cloud/storage/snapshot/SnapshotManagerImpl.java +++ b/server/src/com/cloud/storage/snapshot/SnapshotManagerImpl.java @@ -314,7 +314,7 @@ public class SnapshotManagerImpl extends ManagerBase implements SnapshotManager, _accountMgr.checkAccess(CallContext.current().getCallingAccount(), null, true, volume); SnapshotInfo snapshot = snapshotFactory.getSnapshot(snapshotId, DataStoreRole.Primary); - if(snapshot != null) + if(snapshot == null) { s_logger.debug("Failed to create snapshot"); throw new CloudRuntimeException("Failed to create snapshot");