Lior Vernia has uploaded a new change for review.

Change subject: webadmin: Slight refactoring
......................................................................

webadmin: Slight refactoring

An if clause was ill-formatted and another variable name wasn't quite
right.

Change-Id: Icd25f099e634c8017123820e4cf21daf6548122b
Signed-off-by: Lior Vernia <[email protected]>
---
M 
frontend/webadmin/modules/uicommonweb/src/main/java/org/ovirt/engine/ui/uicommonweb/models/hosts/SetupNetworksEditBondModel.java
1 file changed, 5 insertions(+), 7 deletions(-)


  git pull ssh://gerrit.ovirt.org:29418/ovirt-engine refs/changes/20/17820/1

diff --git 
a/frontend/webadmin/modules/uicommonweb/src/main/java/org/ovirt/engine/ui/uicommonweb/models/hosts/SetupNetworksEditBondModel.java
 
b/frontend/webadmin/modules/uicommonweb/src/main/java/org/ovirt/engine/ui/uicommonweb/models/hosts/SetupNetworksEditBondModel.java
index b492e8c..f2ef2a3 100644
--- 
a/frontend/webadmin/modules/uicommonweb/src/main/java/org/ovirt/engine/ui/uicommonweb/models/hosts/SetupNetworksEditBondModel.java
+++ 
b/frontend/webadmin/modules/uicommonweb/src/main/java/org/ovirt/engine/ui/uicommonweb/models/hosts/SetupNetworksEditBondModel.java
@@ -26,24 +26,22 @@
         List<KeyValuePairCompat<String, EntityModel>> items =
                 (List<KeyValuePairCompat<String, EntityModel>>) 
getBondingOptions().getItems();
         boolean found = false;
-        KeyValuePairCompat<String, EntityModel> customKey = null;
+        KeyValuePairCompat<String, EntityModel> customItem = null;
         for (KeyValuePairCompat<String, EntityModel> pair : items) {
             String key = pair.getKey();
             if (key.equals(bondOptions)) {
                 getBondingOptions().setSelectedItem(pair);
                 found = true;
                 break;
-            } else {
-                if ("custom".equals(key)) { //$NON-NLS-1$
-                    customKey = pair;
-                }
+            } else if ("custom".equals(key)) { //$NON-NLS-1$
+                customItem = pair;
             }
         }
         if (!found) {
             EntityModel value = new EntityModel();
             value.setEntity(bondOptions);
-            customKey.setValue(value);
-            getBondingOptions().setSelectedItem(customKey);
+            customItem.setValue(value);
+            getBondingOptions().setSelectedItem(customItem);
         }
     }
 


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

Gerrit-MessageType: newchange
Gerrit-Change-Id: Icd25f099e634c8017123820e4cf21daf6548122b
Gerrit-PatchSet: 1
Gerrit-Project: ovirt-engine
Gerrit-Branch: master
Gerrit-Owner: Lior Vernia <[email protected]>
_______________________________________________
Engine-patches mailing list
[email protected]
http://lists.ovirt.org/mailman/listinfo/engine-patches

Reply via email to