Moti Asayag has posted comments on this change. Change subject: core: fix e8993e1ca33b823852e15b4adeb3df293afb5676 ......................................................................
Patch Set 3: (1 comment) https://gerrit.ovirt.org/#/c/38757/3/backend/manager/modules/restapi/jaxrs/src/main/java/org/ovirt/engine/api/restapi/resource/AbstractBackendCollectionResource.java File backend/manager/modules/restapi/jaxrs/src/main/java/org/ovirt/engine/api/restapi/resource/AbstractBackendCollectionResource.java: Line 152: ) > If you just remove the casting to Guid it should be fine, Ids will be compa To summarize: 1. Move this method into a static method in Entities class, which handles such kind of logic. A signature might be : public static <E extends BusinessEntity<I>, I extends Serializable> List<E> intersectById(List<E> a, List<E> b) or if wishes to be more abstracted, even Collection instead of List. 2. No consideration for the Id type. 3. Cover with tests for cases: * a included in b * b included in a * a and be are foreign * a shares part of the elements any other case that should also be covered. The necessity of tests is due to the frequent use of this method by API calls. Hence I find them as must. -- To view, visit https://gerrit.ovirt.org/38757 To unsubscribe, visit https://gerrit.ovirt.org/settings Gerrit-MessageType: comment Gerrit-Change-Id: I23ef5740ea59069b10afc329e5ef75bce3c33b31 Gerrit-PatchSet: 3 Gerrit-Project: ovirt-engine Gerrit-Branch: master Gerrit-Owner: Eli Mesika <[email protected]> Gerrit-Reviewer: Eli Mesika <[email protected]> Gerrit-Reviewer: Juan Hernandez <[email protected]> Gerrit-Reviewer: Moti Asayag <[email protected]> Gerrit-Reviewer: Ori Liel <[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
