Allon Mureinik has uploaded a new change for review.

Change subject: webadmin: VmGeneralModel empty string validation
......................................................................

webadmin: VmGeneralModel empty string validation

Replaced the test for domain's emptiness from
StringHelper.stringsEquals(vm.getCustomProperties(), "") to a simpler
StringHelper.isNullOrEmpty(vm.getCustomProperties()). Note that
although there is a slight difference in semantics, there is no
point in having null custom properties, and it's implicitly assumed
to be not-null in other places of the code.

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


  git pull ssh://gerrit.ovirt.org:29418/ovirt-engine refs/changes/38/24438/1

diff --git 
a/frontend/webadmin/modules/uicommonweb/src/main/java/org/ovirt/engine/ui/uicommonweb/models/vms/VmGeneralModel.java
 
b/frontend/webadmin/modules/uicommonweb/src/main/java/org/ovirt/engine/ui/uicommonweb/models/vms/VmGeneralModel.java
index 83cf2d3..e6ac7f3 100644
--- 
a/frontend/webadmin/modules/uicommonweb/src/main/java/org/ovirt/engine/ui/uicommonweb/models/vms/VmGeneralModel.java
+++ 
b/frontend/webadmin/modules/uicommonweb/src/main/java/org/ovirt/engine/ui/uicommonweb/models/vms/VmGeneralModel.java
@@ -577,7 +577,7 @@
         setHasTimeZone(AsyncDataProvider.isWindowsOsType(vm.getVmOsId()));
         setTimeZone(vm.getTimeZone());
 
-        
setHasCustomProperties(!StringHelper.stringsEqual(vm.getCustomProperties(), 
"")); //$NON-NLS-1$
+        
setHasCustomProperties(!StringHelper.isNullOrEmpty(vm.getCustomProperties()));
         setCustomProperties(getHasCustomProperties() ? "Configured" : 
"Not-Configured"); //$NON-NLS-1$ //$NON-NLS-2$
 
         setCompatibilityVersion(vm.getVdsGroupCompatibilityVersion() != null ?


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

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