Allon Mureinik has uploaded a new change for review.

Change subject: webadmin: rm Version.OpEquality from DC model
......................................................................

webadmin: rm Version.OpEquality from DC model

Replaced a call to Version.OpEquality with version.equals(version2),
as it's the standard Java way of doing things, and is easier to read.

This can be done since all the versions in getVersion().getItems()
are ultimately retrieved from
GetAvailableClusterVersionsByStoragePoolQuery, which is guaranteed to
return a List<Version> of non-null elements.

note that this also  has a slight theoretical performance benefit, as
nullability is no longer checked on the first operand, but it's
doubtful that this will be be noticeable.

Change-Id: I9a02b827e4c2d1165cb7bdc69cb681df323d4c6f
Signed-off-by: Allon Mureinik <[email protected]>
---
M 
frontend/webadmin/modules/uicommonweb/src/main/java/org/ovirt/engine/ui/uicommonweb/models/datacenters/DataCenterModel.java
1 file changed, 1 insertion(+), 1 deletion(-)


  git pull ssh://gerrit.ovirt.org:29418/ovirt-engine refs/changes/95/21395/1

diff --git 
a/frontend/webadmin/modules/uicommonweb/src/main/java/org/ovirt/engine/ui/uicommonweb/models/datacenters/DataCenterModel.java
 
b/frontend/webadmin/modules/uicommonweb/src/main/java/org/ovirt/engine/ui/uicommonweb/models/datacenters/DataCenterModel.java
index d71776b..351fda6 100644
--- 
a/frontend/webadmin/modules/uicommonweb/src/main/java/org/ovirt/engine/ui/uicommonweb/models/datacenters/DataCenterModel.java
+++ 
b/frontend/webadmin/modules/uicommonweb/src/main/java/org/ovirt/engine/ui/uicommonweb/models/datacenters/DataCenterModel.java
@@ -286,7 +286,7 @@
             isVersionInit = true;
             for (Version item : getVersion().getItems())
             {
-                if (Version.OpEquality(item, 
getEntity().getcompatibility_version()))
+                if (item.equals(getEntity().getcompatibility_version()))
                 {
                     getVersion().setSelectedItem(item);
                     break;


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

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

Reply via email to