Change in ovirt-engine[master]: core: MemoryStorageHandler simple predicates

amureini at redhat.com amureini at redhat.com
Wed Jul 20 13:45:58 UTC 2016


Allon Mureinik has submitted this change and it was merged.

Change subject: core: MemoryStorageHandler simple predicates
......................................................................


core: MemoryStorageHandler simple predicates

With Java 8's predicates, The StorageDomainStatusFilter and
StorageDomainTypeFilter become one-line lambdas expression, and it's a
bit pointless to maintain them as their own classes. This patch
removes them and replaces them with public static final members in
MemoryStorageHandler.

As their respective tests were just re-implementing the exact same
logic and checking it against itself. This kind of test is somewhat
pointless, so this patch just removes them.

Change-Id: I49849a5cc1d97875448462b8e65891d2451976c2
Signed-off-by: Allon Mureinik <amureini at redhat.com>
---
M backend/manager/modules/bll/src/main/java/org/ovirt/engine/core/bll/memory/MemoryStorageHandler.java
D backend/manager/modules/bll/src/main/java/org/ovirt/engine/core/bll/memory/sdfilters/StorageDomainStatusFilter.java
D backend/manager/modules/bll/src/main/java/org/ovirt/engine/core/bll/memory/sdfilters/StorageDomainTypeFilter.java
D backend/manager/modules/bll/src/test/java/org/ovirt/engine/core/bll/memory/sdfilters/StorageDomainStatusFilterTest.java
D backend/manager/modules/bll/src/test/java/org/ovirt/engine/core/bll/memory/sdfilters/StorageDomainTypeFilterTest.java
5 files changed, 11 insertions(+), 94 deletions(-)

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



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

Gerrit-MessageType: merged
Gerrit-Change-Id: I49849a5cc1d97875448462b8e65891d2451976c2
Gerrit-PatchSet: 6
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: gerrit-hooks <automation at ovirt.org>



More information about the Engine-commits mailing list