Sergey Gotliv has posted comments on this change.

Change subject: webadmin: Disk hotplug validation - Patch 2 of 2
......................................................................


Patch Set 3:

(1 comment)

....................................................
File 
frontend/webadmin/modules/uicommonweb/src/main/java/org/ovirt/engine/ui/uicommonweb/dataprovider/AsyncDataProvider.java
Line 262:     public static Collection<DiskInterface> 
getDiskHotpluggableInterfaces(Integer osId, Version version) {
Line 263:         Pair<Integer, Version> pair = new Pair<Integer, 
Version>(osId, version);
Line 264: 
Line 265:         if (getDiskHotpluggableInterfacesMap().containsKey(pair)) {
Line 266: 
I would use "get" directly without checking with "containsKey", there is no 
reason generate hashCode twice and search in the map. 
Then you can check "if null" and return empty list ......

But this is matter of style.
Line 267:             List<String> diskHotpluggableInterfaces = 
getDiskHotpluggableInterfacesMap().get(pair);
Line 268:             Collection<DiskInterface> diskInterfaces = new 
HashSet<DiskInterface>();
Line 269:             for (String diskHotpluggableInterface : 
diskHotpluggableInterfaces) {
Line 270:                 
diskInterfaces.add(DiskInterface.valueOf(diskHotpluggableInterface));


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

Gerrit-MessageType: comment
Gerrit-Change-Id: Ibaf9f42976ea5fc0c7fbc79e3ebe4f9386c94a71
Gerrit-PatchSet: 3
Gerrit-Project: ovirt-engine
Gerrit-Branch: master
Gerrit-Owner: Gustavo Frederico Temple Pedrosa <gustavo.pedr...@eldorado.org.br>
Gerrit-Reviewer: Frank Kobzik <fkob...@redhat.com>
Gerrit-Reviewer: Gustavo Frederico Temple Pedrosa 
<gustavo.pedr...@eldorado.org.br>
Gerrit-Reviewer: Itamar Heim <ih...@redhat.com>
Gerrit-Reviewer: Leonardo Bianconi <leonardo.bianc...@eldorado.org.br>
Gerrit-Reviewer: Omer Frenkel <ofren...@redhat.com>
Gerrit-Reviewer: Roy Golan <rgo...@redhat.com>
Gerrit-Reviewer: Sergey Gotliv <sgot...@redhat.com>
Gerrit-Reviewer: Tal Nisan <tni...@redhat.com>
Gerrit-Reviewer: Tomas Jelinek <tjeli...@redhat.com>
Gerrit-Reviewer: Vitor de Lima <vitor.l...@eldorado.org.br>
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

Reply via email to