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 <amureini(a)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 <amureini(a)redhat.com>
Gerrit-Reviewer: Alissa Bonas <abonas(a)redhat.com>
Gerrit-Reviewer: Allon Mureinik <amureini(a)redhat.com>
Gerrit-Reviewer: Daniel Erez <derez(a)redhat.com>
Gerrit-Reviewer: Liron Aravot <laravot(a)redhat.com>
Gerrit-Reviewer: Maor Lipchuk <mlipchuk(a)redhat.com>
Gerrit-Reviewer: Tal Nisan <tnisan(a)redhat.com>
Gerrit-Reviewer: Vered Volansky <vvolansk(a)redhat.com>