Change in ovirt-engine[master]: core: extract null check from VmRunHandler#canRunVm

Omer Frenkel has submitted this change and it was merged. Change subject: core: extract null check from VmRunHandler#canRunVm ...................................................................... core: extract null check from VmRunHandler#canRunVm This patch extract the check whether the given VM is null from the VmRunHandler#canRunVm method. the reason for that is that in both places that call this method it makes sense to check it before making the call. So now as part of the "contract" of this method, the given VM must not be null (and the method's documentation was updated accordingly). Change-Id: I42fd8274577ba94accf16a4f944de07ca9ea5419 Signed-off-by: Arik Hadas <ahadas@redhat.com> --- M backend/manager/modules/bll/src/main/java/org/ovirt/engine/core/bll/RunVmCommand.java M backend/manager/modules/bll/src/main/java/org/ovirt/engine/core/bll/VmPoolCommandBase.java M backend/manager/modules/bll/src/main/java/org/ovirt/engine/core/bll/VmRunHandler.java M backend/manager/modules/bll/src/test/java/org/ovirt/engine/core/bll/RunVmCommandTest.java 4 files changed, 42 insertions(+), 32 deletions(-) Approvals: Omer Frenkel: Verified; Looks good to me, approved -- To view, visit http://gerrit.ovirt.org/12791 To unsubscribe, visit http://gerrit.ovirt.org/settings Gerrit-MessageType: merged Gerrit-Change-Id: I42fd8274577ba94accf16a4f944de07ca9ea5419 Gerrit-PatchSet: 4 Gerrit-Project: ovirt-engine Gerrit-Branch: master Gerrit-Owner: Arik Hadas <ahadas@redhat.com> Gerrit-Reviewer: Arik Hadas <ahadas@redhat.com> Gerrit-Reviewer: Omer Frenkel <ofrenkel@redhat.com>
participants (1)
-
ofrenkel@redhat.com