Allon Mureinik has uploaded a new change for review.

Change subject: core,webadmin: Remove Version.Op{In]Equality
......................................................................

core,webadmin: Remove Version.Op{In]Equality

Removed the useless Version.OpEquality and Version.OpInequality methods
and replaced them with calls to the oVirt-engine standard
OjbectUtils.objectsEqual.

Change-Id: I7d911057368ca19e5ee82b76c23a4bc989433c8b
Signed-off-by: Allon Mureinik <[email protected]>
---
M 
backend/manager/modules/compat/src/main/java/org/ovirt/engine/core/compat/Version.java
M 
frontend/webadmin/modules/uicommonweb/src/main/java/org/ovirt/engine/ui/uicommonweb/models/hosts/HostGeneralModel.java
2 files changed, 4 insertions(+), 14 deletions(-)


  git pull ssh://gerrit.ovirt.org:29418/ovirt-engine refs/changes/98/21398/1

diff --git 
a/backend/manager/modules/compat/src/main/java/org/ovirt/engine/core/compat/Version.java
 
b/backend/manager/modules/compat/src/main/java/org/ovirt/engine/core/compat/Version.java
index 5a91e70..299d6bf 100644
--- 
a/backend/manager/modules/compat/src/main/java/org/ovirt/engine/core/compat/Version.java
+++ 
b/backend/manager/modules/compat/src/main/java/org/ovirt/engine/core/compat/Version.java
@@ -152,17 +152,6 @@
         return major == other.major && minor == other.minor && revision == 
other.revision && build == other.build;
     }
 
-    public static boolean OpEquality(Version v1, Version v2) {
-        if (v1 == null) {
-            return (v2 == null);
-        }
-        return v1.equals(v2);
-    }
-
-    public static boolean OpInequality(Version v1, Version v2) {
-        return !OpEquality(v1, v2);
-    }
-
     public int getMajor() {
         return this.major;
     }
diff --git 
a/frontend/webadmin/modules/uicommonweb/src/main/java/org/ovirt/engine/ui/uicommonweb/models/hosts/HostGeneralModel.java
 
b/frontend/webadmin/modules/uicommonweb/src/main/java/org/ovirt/engine/ui/uicommonweb/models/hosts/HostGeneralModel.java
index 1d03ba8..6ae1579 100644
--- 
a/frontend/webadmin/modules/uicommonweb/src/main/java/org/ovirt/engine/ui/uicommonweb/models/hosts/HostGeneralModel.java
+++ 
b/frontend/webadmin/modules/uicommonweb/src/main/java/org/ovirt/engine/ui/uicommonweb/models/hosts/HostGeneralModel.java
@@ -17,6 +17,7 @@
 import org.ovirt.engine.core.common.businessentities.VDSStatus;
 import org.ovirt.engine.core.common.businessentities.VDSType;
 import org.ovirt.engine.core.common.businessentities.VdsSpmStatus;
+import org.ovirt.engine.core.common.utils.ObjectUtils;
 import org.ovirt.engine.core.common.utils.RpmVersionUtils;
 import org.ovirt.engine.core.compat.RpmVersion;
 import org.ovirt.engine.core.compat.StringHelper;
@@ -196,7 +197,7 @@
     }
 
     public void setLibvirtVersion(RpmVersion value) {
-        if (Version.OpInequality(libvirtVersion, value)) {
+        if (!ObjectUtils.objectsEqual(libvirtVersion, value)) {
             libvirtVersion = value;
             onPropertyChanged(new PropertyChangedEventArgs("LibvirtVersion")); 
//$NON-NLS-1$
         }
@@ -211,7 +212,7 @@
 
     public void setVdsmVersion(RpmVersion value)
     {
-        if (Version.OpInequality(vdsmVersion, value))
+        if (!ObjectUtils.objectsEqual(vdsmVersion, value))
         {
             vdsmVersion = value;
             onPropertyChanged(new PropertyChangedEventArgs("VdsmVersion")); 
//$NON-NLS-1$
@@ -241,7 +242,7 @@
     }
 
     public void setGlusterVersion(RpmVersion value) {
-        if (Version.OpInequality(glusterVersion, value)) {
+        if (!ObjectUtils.objectsEqual(glusterVersion, value)) {
             glusterVersion = value;
             onPropertyChanged(new PropertyChangedEventArgs("glusterVersion")); 
//$NON-NLS-1$
         }


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

Gerrit-MessageType: newchange
Gerrit-Change-Id: I7d911057368ca19e5ee82b76c23a4bc989433c8b
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