Maor Lipchuk has uploaded a new change for review.

Change subject: core: Remove redundant else
......................................................................

core: Remove redundant else

There is no use for the else phase since when the if condition is true
we already throw an exception.

Change-Id: Idb49270dc895dd38752b1d49a070c4e11d891242
Related to Bug-Url: https://bugzilla.redhat.com/1037441
Signed-off-by: Maor Lipchuk <mlipc...@redhat.com>
---
M 
backend/manager/modules/bll/src/main/java/org/ovirt/engine/core/bll/AddVmFromTemplateCommand.java
1 file changed, 3 insertions(+), 4 deletions(-)


  git pull ssh://gerrit.ovirt.org:29418/ovirt-engine refs/changes/14/23914/1

diff --git 
a/backend/manager/modules/bll/src/main/java/org/ovirt/engine/core/bll/AddVmFromTemplateCommand.java
 
b/backend/manager/modules/bll/src/main/java/org/ovirt/engine/core/bll/AddVmFromTemplateCommand.java
index 856c604..46f3234 100644
--- 
a/backend/manager/modules/bll/src/main/java/org/ovirt/engine/core/bll/AddVmFromTemplateCommand.java
+++ 
b/backend/manager/modules/bll/src/main/java/org/ovirt/engine/core/bll/AddVmFromTemplateCommand.java
@@ -87,11 +87,10 @@
                 // if couldn't create snapshot then stop the transaction and 
the command
                 if (!result.getSucceeded()) {
                     throw new VdcBLLException(result.getFault().getError());
-                } else {
-                    getTaskIdList().addAll(result.getInternalVdsmTaskIdList());
-                    DiskImage newImage = (DiskImage) 
result.getActionReturnValue();
-                    getSrcDiskIdToTargetDiskIdMapping().put(disk.getId(), 
newImage.getId());
                 }
+                getTaskIdList().addAll(result.getInternalVdsmTaskIdList());
+                DiskImage newImage = (DiskImage) result.getActionReturnValue();
+                getSrcDiskIdToTargetDiskIdMapping().put(disk.getId(), 
newImage.getId());
             }
         }
         return true;


-- 
To view, visit http://gerrit.ovirt.org/23914
To unsubscribe, visit http://gerrit.ovirt.org/settings

Gerrit-MessageType: newchange
Gerrit-Change-Id: Idb49270dc895dd38752b1d49a070c4e11d891242
Gerrit-PatchSet: 1
Gerrit-Project: ovirt-engine
Gerrit-Branch: ovirt-engine-3.4
Gerrit-Owner: Maor Lipchuk <mlipc...@redhat.com>
_______________________________________________
Engine-patches mailing list
Engine-patches@ovirt.org
http://lists.ovirt.org/mailman/listinfo/engine-patches

Reply via email to