Allon Mureinik has submitted this change and it was merged.

Change subject: core: VmRunHandler: simplify isInternal evaluation
......................................................................


core: VmRunHandler: simplify isInternal evaluation

Some of the checks in VmRunHandler are only evaluated in the following
condition:
!vm.isAutoStartup() || !runParams.getIsInternal() && vm.isAutoStartup()

Since java evaluated boolean conditions with short circuit logic, this
can be simplified.
The right hand of the || condition is only tested if
!vm.isAutoStartup() evaluates to false, which means vm.isAutoStartup()
evaluated to true - so there is no reason to test it again.

The added readability is a bonus.

Change-Id: I0aa0ce3b0ef22739014f31f4019a35b8d230aaee
Signed-off-by: Allon Mureinik <amure...@redhat.com>
---
M 
backend/manager/modules/bll/src/main/java/org/ovirt/engine/core/bll/VmRunHandler.java
1 file changed, 2 insertions(+), 2 deletions(-)

Approvals:
  Allon Mureinik: Verified; Looks good to me, approved


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

Gerrit-MessageType: merged
Gerrit-Change-Id: I0aa0ce3b0ef22739014f31f4019a35b8d230aaee
Gerrit-PatchSet: 4
Gerrit-Project: ovirt-engine
Gerrit-Branch: master
Gerrit-Owner: Allon Mureinik <amure...@redhat.com>
Gerrit-Reviewer: Alissa Bonas <abo...@redhat.com>
Gerrit-Reviewer: Allon Mureinik <amure...@redhat.com>
Gerrit-Reviewer: Daniel Erez <de...@redhat.com>
Gerrit-Reviewer: Liron Aravot <lara...@redhat.com>
Gerrit-Reviewer: Maor Lipchuk <mlipc...@redhat.com>
Gerrit-Reviewer: Tal Nisan <tni...@redhat.com>
Gerrit-Reviewer: Vered Volansky <vvola...@redhat.com>
_______________________________________________
Engine-patches mailing list
Engine-patches@ovirt.org
http://lists.ovirt.org/mailman/listinfo/engine-patches

Reply via email to