Sergey Gotliv has posted comments on this change.
Change subject: webadmin: Disk hotplug validation - Patch 2 of 2
......................................................................
Patch Set 1: Code-Review-1
(1 comment)
....................................................
File
frontend/webadmin/modules/uicommonweb/src/main/java/org/ovirt/engine/ui/uicommonweb/dataprovider/AsyncDataProvider.java
Line 263: Pair<Integer, Version> pair = new Pair<Integer,
Version>(osId, version);
Line 264:
Line 265: if (getDiskHotpluggableInterfacesMap().containsKey(pair)) {
Line 266: List<String> diskHotpluggableInterfaces =
getDiskHotpluggableInterfacesMap().get(pair);
Line 267:
1. You checking if map contains key but then after getting a value for that key
you checking if its null?
2. You don't need to check emptiness
3. "For" inside "if" inside another "if" is probably too much.
Line 268: if (diskHotpluggableInterfaces != null &&
!diskHotpluggableInterfaces.isEmpty()) {
Line 269: Collection<DiskInterface> diskInterfaces = new
HashSet<DiskInterface>();
Line 270:
Line 271: for (String diskHotpluggableInterface :
diskHotpluggableInterfaces) {
--
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: 1
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