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 <[email protected]>
---
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 <[email protected]>
Gerrit-Reviewer: Alissa Bonas <[email protected]>
Gerrit-Reviewer: Allon Mureinik <[email protected]>
Gerrit-Reviewer: Daniel Erez <[email protected]>
Gerrit-Reviewer: Liron Aravot <[email protected]>
Gerrit-Reviewer: Maor Lipchuk <[email protected]>
Gerrit-Reviewer: Tal Nisan <[email protected]>
Gerrit-Reviewer: Vered Volansky <[email protected]>
_______________________________________________
Engine-patches mailing list
[email protected]
http://lists.ovirt.org/mailman/listinfo/engine-patches

Reply via email to