Change in ovirt-engine[master]: webadmin: Remove Linq#count

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


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

Allon Mureinik has submitted this change and it was merged.

Change subject: webadmin: Remove Linq#count
......................................................................


webadmin: Remove Linq#count

Now that Linq#count receives a Collection instead of an Iterable, it
can be replaced with a simple call to Collection#size (or even
Collection#isEmpty when it's just compared to 0).

The worst, this change just cleans up the code. At best, it should
slightly improve performance, as most common collections should have
optimized ways to return their sizes without having to iterate over
the entire collection.

Change-Id: Ib4ab683f62856c8c2969cfcc173a0d75ef3213dc
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/hosts/AsyncIterator.java
M frontend/webadmin/modules/uicommonweb/src/main/java/org/ovirt/engine/ui/uicommonweb/models/storage/ImportIscsiStorageModel.java
M frontend/webadmin/modules/uicommonweb/src/main/java/org/ovirt/engine/ui/uicommonweb/models/storage/SanStorageModelBase.java
4 files changed, 4 insertions(+), 15 deletions(-)

Approvals:
  Tal Nisan: Looks good to me, approved
  Jenkins CI: Passed CI tests
  Allon Mureinik: Verified
  Idan Shaby: Looks good to me, but someone else must approve



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

Gerrit-MessageType: merged
Gerrit-Change-Id: Ib4ab683f62856c8c2969cfcc173a0d75ef3213dc
Gerrit-PatchSet: 5
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: Vojtech Szocs <vszocs at redhat.com>
Gerrit-Reviewer: gerrit-hooks <automation at ovirt.org>


More information about the Engine-commits mailing list