Moti Asayag has posted comments on this change. Change subject: engine: Introduce HostSetupNetworks command ......................................................................
Patch Set 26: (1 comment) https://gerrit.ovirt.org/#/c/33333/26/backend/manager/modules/common/src/main/java/org/ovirt/engine/core/common/businessentities/Entities.java File backend/manager/modules/common/src/main/java/org/ovirt/engine/core/common/businessentities/Entities.java: Line 212: * Line 213: * @return true if all entities for given ids were found. Line 214: * @throws IllegalArgumentException when result collection is not empty.14.1. Line 215: */ Line 216: public static <E extends BusinessEntity<I>, I extends Serializable> boolean entitiesById(Collection<I> requestedIds, > As I wrote in previous comments, I think this method should be changed. I agree, i think that the signature of this method should be: public static <F extends Serializable, B extends BusinessEntity<F>> Map<F, B> businessEntitiesById(List<B> entities, List<F> entityIds) {... } and its only responsibility is to return a map of the ids from the entityIds to their values (the entity) if exists on the entities). The user of this method will be able to check if the returned method size matches the size of the given ids list. thinking of it - it is better to provide Set as type of the parameters (at list for the ids). Line 217: Collection<E> existingEntities, Line 218: Collection<E> resultCollection) { Line 219: Line 220: if (!resultCollection.isEmpty()) { -- To view, visit https://gerrit.ovirt.org/33333 To unsubscribe, visit https://gerrit.ovirt.org/settings Gerrit-MessageType: comment Gerrit-Change-Id: I60077019f308f371f21fb7b5545ba48adb38bd06 Gerrit-PatchSet: 26 Gerrit-Project: ovirt-engine Gerrit-Branch: master Gerrit-Owner: Moti Asayag <masa...@redhat.com> Gerrit-Reviewer: Alona Kaplan <alkap...@redhat.com> Gerrit-Reviewer: Jenkins CI Gerrit-Reviewer: Martin Mucha <mmu...@redhat.com> Gerrit-Reviewer: Moti Asayag <masa...@redhat.com> Gerrit-Reviewer: automat...@ovirt.org Gerrit-HasComments: Yes _______________________________________________ Engine-patches mailing list Engine-patches@ovirt.org http://lists.ovirt.org/mailman/listinfo/engine-patches