Oved Ourfali has posted comments on this change.

Change subject: aaa: Using collection instead of list
......................................................................


Patch Set 4:

(2 comments)

http://gerrit.ovirt.org/#/c/30280/4/backend/manager/modules/bll/src/main/java/org/ovirt/engine/core/aaa/DirectoryUtils.java
File 
backend/manager/modules/bll/src/main/java/org/ovirt/engine/core/aaa/DirectoryUtils.java:

Line 55:             final boolean resolveGroupsRecursive
Line 56:             ) {
Line 57:         Collection<DirectoryGroup> groups =
Line 58:                 findDirectoryGroupsByIds(extension, namespace, 
Arrays.asList(id), resolveGroups, resolveGroupsRecursive);
Line 59:         if (groups.size() == 0) {
as far as I know the collection interface contains isEmpty. isn't it?
Line 60:             return null;
Line 61:         }
Line 62:         return new ArrayList<DirectoryGroup>(groups).get(0);
Line 63:     }


Line 94:                         namespace,
Line 95:                         Arrays.asList(id),
Line 96:                         groupsResolving,
Line 97:                         groupsResolvingRecursive);
Line 98:         if (users.size() == 0) {
as far as I know the collection interface contains isEmpty. isn't it?
Line 99:             return null;
Line 100:         }
Line 101:         return new ArrayList<DirectoryUser>(users).get(0);
Line 102:     }


-- 
To view, visit http://gerrit.ovirt.org/30280
To unsubscribe, visit http://gerrit.ovirt.org/settings

Gerrit-MessageType: comment
Gerrit-Change-Id: I5aec7cc3de308e5be3601b87c0543267fa5c018d
Gerrit-PatchSet: 4
Gerrit-Project: ovirt-engine
Gerrit-Branch: master
Gerrit-Owner: Yair Zaslavsky <[email protected]>
Gerrit-Reviewer: Alon Bar-Lev <[email protected]>
Gerrit-Reviewer: Oved Ourfali <[email protected]>
Gerrit-Reviewer: [email protected]
Gerrit-Reviewer: oVirt Jenkins CI Server
Gerrit-HasComments: Yes
_______________________________________________
Engine-patches mailing list
[email protected]
http://lists.ovirt.org/mailman/listinfo/engine-patches

Reply via email to