Allon Mureinik has posted comments on this change.
Change subject: restapi: A check for possible NPE BackendVmsResource:remove
method
......................................................................
Patch Set 1: Looks good to me, but someone else must approve
(1 inline comment)
....................................................
File
backend/manager/modules/restapi/jaxrs/src/main/java/org/ovirt/engine/api/restapi/resource/BackendVmsResource.java
Line 362: getEntity(id);
Line 363: boolean forceRemove = action != null && action.isSetForce() ?
action.isForce() : false;
Line 364: RemoveVmParameters params = new
RemoveVmParameters(asGuid(id), forceRemove);
Line 365: // If detach only is set we do not remove the VM disks
Line 366: if (action != null && action.isSetVm() &&
action.getVm().isSetDisks() && action.getVm().getDisks().isSetDetachOnly()) {
you're checking (action != null) in two different places here - consider
extract it to a boolean to make this (somewhat long) line a bit more readable?
Line 367: params.setRemoveDisks(false);
Line 368: }
Line 369: return performAction(VdcActionType.RemoveVm, params);
Line 370: }
--
To view, visit http://gerrit.ovirt.org/10958
To unsubscribe, visit http://gerrit.ovirt.org/settings
Gerrit-MessageType: comment
Gerrit-Change-Id: Idbf51b03bb170b34e1b6bba3d37e62c967fdd5d6
Gerrit-PatchSet: 1
Gerrit-Project: ovirt-engine
Gerrit-Branch: master
Gerrit-Owner: Asaf Shakarchi <[email protected]>
Gerrit-Reviewer: Allon Mureinik <[email protected]>
Gerrit-Reviewer: Michael Pasternak <[email protected]>
Gerrit-Reviewer: Yair Zaslavsky <[email protected]>
_______________________________________________
Engine-patches mailing list
[email protected]
http://lists.ovirt.org/mailman/listinfo/engine-patches