Martin Mucha has posted comments on this change.

Change subject: core: refactor: renamed variables + extracted creating map
......................................................................


Patch Set 39:

(2 comments)

https://gerrit.ovirt.org/#/c/36145/39/backend/manager/modules/bll/src/main/java/org/ovirt/engine/core/bll/validator/NetworkAttachmentsValidator.java
File 
backend/manager/modules/bll/src/main/java/org/ovirt/engine/core/bll/validator/NetworkAttachmentsValidator.java:

Line 55:         }
Line 56:         return violatedNics;
Line 57:     }
Line 58: 
Line 59:     //TODO MM: is there a possibility, that network attachment will be 
present twice in list each time with different network (of different type); if 
so, what about duplicates in that list?
> IIUC, you get to this point after verifying attachment list is ok. So there
Done
Line 60:     private Map<String, List<NetworkType>> 
createNicNameToNetworkTypesMap() {
Line 61:         Map<String, List<NetworkType>> nicNameToNetworkTypes = new 
HashMap<>();
Line 62:         for (NetworkAttachment attachment : attachmentsToConfigure) {
Line 63:             String nicName = attachment.getNicName();


Line 60:     private Map<String, List<NetworkType>> 
createNicNameToNetworkTypesMap() {
Line 61:         Map<String, List<NetworkType>> nicNameToNetworkTypes = new 
HashMap<>();
Line 62:         for (NetworkAttachment attachment : attachmentsToConfigure) {
Line 63:             String nicName = attachment.getNicName();
Line 64:             //TODO MM: use MultiValueMapUtils
> Was done in a latter patch?
no. I did it here instead :) Done
Line 65:             if (!nicNameToNetworkTypes.containsKey(nicName)) {
Line 66:                 nicNameToNetworkTypes.put(nicName, new 
ArrayList<NetworkType>());
Line 67:             }
Line 68: 


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

Gerrit-MessageType: comment
Gerrit-Change-Id: I7e0a7875a3f5356455f132af23d56d62f00d1989
Gerrit-PatchSet: 39
Gerrit-Project: ovirt-engine
Gerrit-Branch: master
Gerrit-Owner: Martin Mucha <mmu...@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

Reply via email to