Ori Liel has posted comments on this change. Change subject: BZ1178023 - Change LinkedList to ArrayList in Vds DAO ......................................................................
Patch Set 1: (2 comments) http://gerrit.ovirt.org/#/c/36574/1/backend/manager/modules/dal/src/main/java/org/ovirt/engine/core/dao/VdsDAODbFacadeImpl.java File backend/manager/modules/dal/src/main/java/org/ovirt/engine/core/dao/VdsDAODbFacadeImpl.java: Line 411: if (!map.containsKey(vds.getId())) { Line 412: map.put(vds.getId(), new ArrayList<VDS>()); Line 413: } Line 414: map.get(vds.getId()).add(vds); Line 415: } > This whole loop can be avoided by using MultiValueMapUtils Ok, I'll look into it, but that's a separate patch - this one changes LinkedLists oto ArrayLists following BZ1178023 Line 416: return map; Line 417: } Line 418: Line 419: private List<VDS> uniteAgents(List<VDS> vdsList) { Line 420: Map<Guid, List<VDS>> vdsMap = getVdsMap(vdsList); Line 421: List<VDS> results = new ArrayList<>(); Line 422: for (Entry<Guid, List<VDS>> entry : vdsMap.entrySet()) { Line 423: results.add(uniteAgentsSingleVds(entry.getValue())); Line 424: } > This whole loop can be avoided by using MultiValueMapUtils same comment Line 425: return results; Line 426: } Line 427: Line 428: private List<VDS> uniteAgentsPreserveSpmPrioritySorting(List<VDS> vdsList) { -- To view, visit http://gerrit.ovirt.org/36574 To unsubscribe, visit http://gerrit.ovirt.org/settings Gerrit-MessageType: comment Gerrit-Change-Id: Ic3d7efc4c1e53696546f59e6113f13fce4b432fd Gerrit-PatchSet: 1 Gerrit-Project: ovirt-engine Gerrit-Branch: master Gerrit-Owner: Ori Liel <ol...@redhat.com> Gerrit-Reviewer: Allon Mureinik <amure...@redhat.com> Gerrit-Reviewer: Eli Mesika <emes...@redhat.com> Gerrit-Reviewer: Liron Aravot <lara...@redhat.com> Gerrit-Reviewer: Ori Liel <ol...@redhat.com> Gerrit-Reviewer: automat...@ovirt.org Gerrit-Reviewer: oVirt Jenkins CI Server Gerrit-HasComments: Yes _______________________________________________ Engine-patches mailing list Engine-patches@ovirt.org http://lists.ovirt.org/mailman/listinfo/engine-patches