Allon Mureinik has uploaded a new change for review.

Change subject: webadmin: CustomPropertyValidation blank string
......................................................................

webadmin: CustomPropertyValidation blank string

Fixed up the way a blank string is tested.
Before this patch, it's trim()ed and compared to "" using
StringHelper.stringEquals. Since trim() is called on this string, we can
assume it's not null, so StringHelper.stringEquals is redundant. Since
we know we have a non-null instance, we can simply used the optimized
isEmpty().

An additional advantage is removing another call to
StringHelper.stringsEqual, moving one step closer to eliminating this
method.

Change-Id: I3592a500d5af41593a3f8f9eb1e888d6ac22cf04
Signed-off-by: Allon Mureinik <amure...@redhat.com>
---
M 
frontend/webadmin/modules/uicommonweb/src/main/java/org/ovirt/engine/ui/uicommonweb/validation/CustomPropertyValidation.java
1 file changed, 1 insertion(+), 1 deletion(-)


  git pull ssh://gerrit.ovirt.org:29418/ovirt-engine refs/changes/36/24436/1

diff --git 
a/frontend/webadmin/modules/uicommonweb/src/main/java/org/ovirt/engine/ui/uicommonweb/validation/CustomPropertyValidation.java
 
b/frontend/webadmin/modules/uicommonweb/src/main/java/org/ovirt/engine/ui/uicommonweb/validation/CustomPropertyValidation.java
index a7683f9..6c1ddf2 100644
--- 
a/frontend/webadmin/modules/uicommonweb/src/main/java/org/ovirt/engine/ui/uicommonweb/validation/CustomPropertyValidation.java
+++ 
b/frontend/webadmin/modules/uicommonweb/src/main/java/org/ovirt/engine/ui/uicommonweb/validation/CustomPropertyValidation.java
@@ -54,7 +54,7 @@
 
         String[] split;
 
-        if (value == null || StringHelper.stringsEqual(((String) 
(value)).trim(), "")) //$NON-NLS-1$
+        if (value == null || ((String) value).trim().isEmpty())
         {
             split = new String[0];
         }


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

Gerrit-MessageType: newchange
Gerrit-Change-Id: I3592a500d5af41593a3f8f9eb1e888d6ac22cf04
Gerrit-PatchSet: 1
Gerrit-Project: ovirt-engine
Gerrit-Branch: master
Gerrit-Owner: Allon Mureinik <amure...@redhat.com>
_______________________________________________
Engine-patches mailing list
Engine-patches@ovirt.org
http://lists.ovirt.org/mailman/listinfo/engine-patches

Reply via email to