You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@ofbiz.apache.org by jo...@apache.org on 2007/03/08 02:24:36 UTC
svn commit: r515877 -
/ofbiz/trunk/framework/base/src/base/org/ofbiz/base/util/UtilValidate.java
Author: jonesde
Date: Wed Mar 7 17:24:35 2007
New Revision: 515877
URL: http://svn.apache.org/viewvc?view=rev&rev=515877
Log:
Added isNotEmpty method for Object, alternative to patch proposed by Joe Eckard in Jira #OFBIZ-785
Modified:
ofbiz/trunk/framework/base/src/base/org/ofbiz/base/util/UtilValidate.java
Modified: ofbiz/trunk/framework/base/src/base/org/ofbiz/base/util/UtilValidate.java
URL: http://svn.apache.org/viewvc/ofbiz/trunk/framework/base/src/base/org/ofbiz/base/util/UtilValidate.java?view=diff&rev=515877&r1=515876&r2=515877
==============================================================================
--- ofbiz/trunk/framework/base/src/base/org/ofbiz/base/util/UtilValidate.java (original)
+++ ofbiz/trunk/framework/base/src/base/org/ofbiz/base/util/UtilValidate.java Wed Mar 7 17:24:35 2007
@@ -180,6 +180,11 @@
return ObjectType.isEmpty(o);
}
+ /** Check whether an object is NOT empty, will see if it is a String, Map, Collection, etc. */
+ public static boolean isNotEmpty(Object o) {
+ return !ObjectType.isEmpty(o);
+ }
+
/** Check whether string s is empty. */
public static boolean isEmpty(String s) {
return ((s == null) || (s.length() == 0));