Change in ovirt-engine[master]: core: HostUpgradeManager streaming API

amureini at redhat.com amureini at redhat.com
Tue Dec 8 16:12:27 UTC 2015


Allon Mureinik has submitted this change and it was merged.

Change subject: core: HostUpgradeManager streaming API
......................................................................


core: HostUpgradeManager streaming API

Replace the usage of the outdated ListUtils in
HostUpgradeManager#getPackagesForCheckUpdate() with the modern streaming
API introduced in Java 8 as part of the effort to remove ListUtils from
the codebase completely.

In addition to cleaning up the code, this patch offers a slight
performance improvement by streaming both lists together and collecting
them into a single toSet() collector instead of adding all the packages
from the first list to a Set and then potentially rehahsing it when the
second (filtered) list is added.
A unit test was added to ensure that the proper functionallity is kept.

Change-Id: Ibb5b1d4197b1a353c7324fc5545e90580b5128b7
Signed-off-by: Allon Mureinik <amureini at redhat.com>
---
M backend/manager/modules/bll/src/main/java/org/ovirt/engine/core/bll/host/HostUpgradeManager.java
A backend/manager/modules/bll/src/test/java/org/ovirt/engine/core/bll/host/HostUpgradeManagerTest.java
2 files changed, 34 insertions(+), 15 deletions(-)

Approvals:
  Allon Mureinik: Verified; Passed CI tests
  Moti Asayag: Looks good to me, approved
  Oved Ourfali: Looks good to me, but someone else must approve



-- 
To view, visit https://gerrit.ovirt.org/49385
To unsubscribe, visit https://gerrit.ovirt.org/settings

Gerrit-MessageType: merged
Gerrit-Change-Id: Ibb5b1d4197b1a353c7324fc5545e90580b5128b7
Gerrit-PatchSet: 2
Gerrit-Project: ovirt-engine
Gerrit-Branch: master
Gerrit-Owner: Allon Mureinik <amureini at redhat.com>
Gerrit-Reviewer: Allon Mureinik <amureini at redhat.com>
Gerrit-Reviewer: Jenkins CI
Gerrit-Reviewer: Moti Asayag <masayag at redhat.com>
Gerrit-Reviewer: Oved Ourfali <oourfali at redhat.com>
Gerrit-Reviewer: gerrit-hooks <automation at ovirt.org>



More information about the Engine-commits mailing list