Change in ovirt-engine[master]: webadmin: Inline Linq#filterDisksByStorageType

Code Review gerrit at ovirt.org
Thu Apr 6 19:05:12 UTC 2017


>From Allon Mureinik <amureini at redhat.com>:

Allon Mureinik has submitted this change and it was merged.

Change subject: webadmin: Inline Linq#filterDisksByStorageType
......................................................................


webadmin: Inline Linq#filterDisksByStorageType

Linq#filterDisksByStorageType is only used in one place,
CloneVmModel, and as such shouldn't belong in a general-purpose
class like Linq.

Since Java 8's streams provide an elegant, single-statement, way of
achieving the same functionality, this patch removes that method and
inlines its functionality directly where its needed.
As an added bonus, this patch uses the fail-fast anyMatch method,
which saves the need to iterate over all the VM's disks and construct
a list for them, providing a slight performance improvement.

Change-Id: I634b685fb6be0d3a3afabc025588b1a2488f4e45
Signed-off-by: Allon Mureinik <amureini at redhat.com>
---
M frontend/webadmin/modules/uicommonweb/src/main/java/org/ovirt/engine/ui/uicommonweb/Linq.java
M frontend/webadmin/modules/uicommonweb/src/main/java/org/ovirt/engine/ui/uicommonweb/models/vms/CloneVmModel.java
2 files changed, 1 insertion(+), 12 deletions(-)

Approvals:
  Tal Nisan: Looks good to me, approved
  Jenkins CI: Passed CI tests
  Allon Mureinik: Verified



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

Gerrit-MessageType: merged
Gerrit-Change-Id: I634b685fb6be0d3a3afabc025588b1a2488f4e45
Gerrit-PatchSet: 7
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: Idan Shaby <ishaby at redhat.com>
Gerrit-Reviewer: Jenkins CI
Gerrit-Reviewer: Tal Nisan <tnisan at redhat.com>
Gerrit-Reviewer: Tomas Jelinek <tjelinek at redhat.com>
Gerrit-Reviewer: Vojtech Szocs <vszocs at redhat.com>
Gerrit-Reviewer: gerrit-hooks <automation at ovirt.org>


More information about the Engine-commits mailing list