Gilad Chaplik has uploaded a new change for review.

Change subject: engine: fix 2 findbugs errors
......................................................................

engine: fix 2 findbugs errors

Mistakenly merged while introducing cluster policy feature:
1) new unused variable in ClusterModel.
2) referencing an object prior a nullity check.

Signed-off-by: Gilad Chaplik <[email protected]>
Change-Id: I7c83849a810e398b70c2488ab8a9fd2550e4ce17
---
M 
backend/manager/modules/bll/src/main/java/org/ovirt/engine/core/bll/VmPoolCommandBase.java
M 
frontend/webadmin/modules/uicommonweb/src/main/java/org/ovirt/engine/ui/uicommonweb/models/clusters/ClusterModel.java
2 files changed, 1 insertion(+), 2 deletions(-)


  git pull ssh://gerrit.ovirt.org:29418/ovirt-engine refs/changes/84/16984/1

diff --git 
a/backend/manager/modules/bll/src/main/java/org/ovirt/engine/core/bll/VmPoolCommandBase.java
 
b/backend/manager/modules/bll/src/main/java/org/ovirt/engine/core/bll/VmPoolCommandBase.java
index a52678b..48dcc22 100644
--- 
a/backend/manager/modules/bll/src/main/java/org/ovirt/engine/core/bll/VmPoolCommandBase.java
+++ 
b/backend/manager/modules/bll/src/main/java/org/ovirt/engine/core/bll/VmPoolCommandBase.java
@@ -213,11 +213,11 @@
 
     protected static boolean canRunPoolVm(Guid vmId, ArrayList<String> 
messages) {
         VM vm = DbFacade.getInstance().getVmDao().get(vmId);
-        VDSGroup vdsGroup = 
DbFacade.getInstance().getVdsGroupDao().get(vm.getVdsGroupId());
         if (vm == null) {
             
messages.add(VdcBllMessages.ACTION_TYPE_FAILED_VM_NOT_FOUND.name());
             return false;
         }
+        VDSGroup vdsGroup = 
DbFacade.getInstance().getVdsGroupDao().get(vm.getVdsGroupId());
 
         // TODO: This is done to keep consistency with VmDAO.getById.
         // It can probably be removed, but that requires some more research
diff --git 
a/frontend/webadmin/modules/uicommonweb/src/main/java/org/ovirt/engine/ui/uicommonweb/models/clusters/ClusterModel.java
 
b/frontend/webadmin/modules/uicommonweb/src/main/java/org/ovirt/engine/ui/uicommonweb/models/clusters/ClusterModel.java
index 5e43836..998f96a 100644
--- 
a/frontend/webadmin/modules/uicommonweb/src/main/java/org/ovirt/engine/ui/uicommonweb/models/clusters/ClusterModel.java
+++ 
b/frontend/webadmin/modules/uicommonweb/src/main/java/org/ovirt/engine/ui/uicommonweb/models/clusters/ClusterModel.java
@@ -855,7 +855,6 @@
 
                     @Override
                     public void onSuccess(Object model, Object returnValue) {
-                        ClusterModel clusterModel = (ClusterModel) model;
                         ArrayList<PolicyUnit> policyUnits =
                                 (ArrayList<PolicyUnit>) ((VdcQueryReturnValue) 
returnValue).getReturnValue();
                         policyUnitMap = new LinkedHashMap<Guid, PolicyUnit>();


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

Gerrit-MessageType: newchange
Gerrit-Change-Id: I7c83849a810e398b70c2488ab8a9fd2550e4ce17
Gerrit-PatchSet: 1
Gerrit-Project: ovirt-engine
Gerrit-Branch: master
Gerrit-Owner: Gilad Chaplik <[email protected]>
_______________________________________________
Engine-patches mailing list
[email protected]
http://lists.ovirt.org/mailman/listinfo/engine-patches

Reply via email to