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 <[email protected]>
Gerrit-Reviewer: Frank Kobzik <[email protected]>
Gerrit-Reviewer: Gustavo Frederico Temple Pedrosa
<[email protected]>
Gerrit-Reviewer: Itamar Heim <[email protected]>
Gerrit-Reviewer: Leonardo Bianconi <[email protected]>
Gerrit-Reviewer: Omer Frenkel <[email protected]>
Gerrit-Reviewer: Roy Golan <[email protected]>
Gerrit-Reviewer: Sergey Gotliv <[email protected]>
Gerrit-Reviewer: Tal Nisan <[email protected]>
Gerrit-Reviewer: Tomas Jelinek <[email protected]>
Gerrit-Reviewer: Vitor de Lima <[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