You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@cloudstack.apache.org by bh...@apache.org on 2015/06/19 14:29:16 UTC

git commit: updated refs/heads/4.5 to eb904cd

Repository: cloudstack
Updated Branches:
  refs/heads/4.5 04c7cf4e1 -> eb904cd8f


findbugs: repeated condition seems c&p error the tested states sugest that EXPUNGED should be the last one

Signed-off-by: Rohit Yadav <ro...@shapeblue.com>

This closes #491

(cherry picked from commit bb613baa2b716dfe9aa7aed08b6cdd2027395456)
Signed-off-by: Rohit Yadav <ro...@shapeblue.com>


Project: http://git-wip-us.apache.org/repos/asf/cloudstack/repo
Commit: http://git-wip-us.apache.org/repos/asf/cloudstack/commit/eb904cd8
Tree: http://git-wip-us.apache.org/repos/asf/cloudstack/tree/eb904cd8
Diff: http://git-wip-us.apache.org/repos/asf/cloudstack/diff/eb904cd8

Branch: refs/heads/4.5
Commit: eb904cd8fde640599fda87271729f53aa8022313
Parents: 04c7cf4
Author: Daan Hoogland <da...@onecht.net>
Authored: Fri Jun 19 14:02:13 2015 +0200
Committer: Rohit Yadav <ro...@shapeblue.com>
Committed: Fri Jun 19 15:27:17 2015 +0300

----------------------------------------------------------------------
 server/src/com/cloud/storage/VolumeApiServiceImpl.java | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/cloudstack/blob/eb904cd8/server/src/com/cloud/storage/VolumeApiServiceImpl.java
----------------------------------------------------------------------
diff --git a/server/src/com/cloud/storage/VolumeApiServiceImpl.java b/server/src/com/cloud/storage/VolumeApiServiceImpl.java
index 0f17a57..b45b8aa 100644
--- a/server/src/com/cloud/storage/VolumeApiServiceImpl.java
+++ b/server/src/com/cloud/storage/VolumeApiServiceImpl.java
@@ -1105,7 +1105,7 @@ public class VolumeApiServiceImpl extends ManagerBase implements VolumeApiServic
         }
 
         try {
-            if (volume.getState() != Volume.State.Destroy && volume.getState() != Volume.State.Expunging && volume.getState() != Volume.State.Expunging) {
+            if (volume.getState() != Volume.State.Destroy && volume.getState() != Volume.State.Expunging && volume.getState() != Volume.State.Expunged) {
                 Long instanceId = volume.getInstanceId();
                 if (!volService.destroyVolume(volume.getId())) {
                     return false;