Asaf Shakarchi has uploaded a new change for review.

Change subject: restapi: A check for possible NPE BackendVmsResource:remove 
method
......................................................................

restapi: A check for possible NPE BackendVmsResource:remove method

A check for possible NPE BackendVmsResource:remove method.

Change-Id: Idbf51b03bb170b34e1b6bba3d37e62c967fdd5d6
Signed-off-by: Asaf Shakarchi <[email protected]>
---
M 
backend/manager/modules/restapi/jaxrs/src/main/java/org/ovirt/engine/api/restapi/resource/BackendVmsResource.java
1 file changed, 1 insertion(+), 1 deletion(-)


  git pull ssh://gerrit.ovirt.org:29418/ovirt-engine refs/changes/58/10958/1

diff --git 
a/backend/manager/modules/restapi/jaxrs/src/main/java/org/ovirt/engine/api/restapi/resource/BackendVmsResource.java
 
b/backend/manager/modules/restapi/jaxrs/src/main/java/org/ovirt/engine/api/restapi/resource/BackendVmsResource.java
index 1650e29..ebef9cb 100644
--- 
a/backend/manager/modules/restapi/jaxrs/src/main/java/org/ovirt/engine/api/restapi/resource/BackendVmsResource.java
+++ 
b/backend/manager/modules/restapi/jaxrs/src/main/java/org/ovirt/engine/api/restapi/resource/BackendVmsResource.java
@@ -363,7 +363,7 @@
         boolean forceRemove = action != null && action.isSetForce() ? 
action.isForce() : false;
         RemoveVmParameters params = new RemoveVmParameters(asGuid(id), 
forceRemove);
         // If detach only is set we do not remove the VM disks
-        if (action.isSetVm() && action.getVm().isSetDisks() && 
action.getVm().getDisks().isSetDetachOnly()) {
+        if (action != null && action.isSetVm() && action.getVm().isSetDisks() 
&& action.getVm().getDisks().isSetDetachOnly()) {
             params.setRemoveDisks(false);
         }
         return performAction(VdcActionType.RemoveVm, params);


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

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

Reply via email to