You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@directory.apache.org by el...@apache.org on 2005/06/26 16:45:16 UTC
svn commit: r201856 -
/directory/shared/ldap/trunk/common/src/java/org/apache/ldap/common/util/StringTools.java
Author: elecharny
Date: Sun Jun 26 07:45:15 2005
New Revision: 201856
URL: http://svn.apache.org/viewcvs?rev=201856&view=rev
Log:
Added a isEmpty function which is a copy of the one in a.o.commons.lang.StringUtils.
This allow us to avoid a commons-lang dependency.
Modified:
directory/shared/ldap/trunk/common/src/java/org/apache/ldap/common/util/StringTools.java
Modified: directory/shared/ldap/trunk/common/src/java/org/apache/ldap/common/util/StringTools.java
URL: http://svn.apache.org/viewcvs/directory/shared/ldap/trunk/common/src/java/org/apache/ldap/common/util/StringTools.java?rev=201856&r1=201855&r2=201856&view=diff
==============================================================================
--- directory/shared/ldap/trunk/common/src/java/org/apache/ldap/common/util/StringTools.java (original)
+++ directory/shared/ldap/trunk/common/src/java/org/apache/ldap/common/util/StringTools.java Sun Jun 26 07:45:15 2005
@@ -496,5 +496,18 @@
return l_list ;
}
+
+ /**
+ * Forked version of a.o.commons.lang.StringUtils.isEmpty
+ *
+ * Checks if a string is null or empty
+ *
+ * @param string The string to be tested
+ * @return <code>true</code> if the string is null or empty.
+ */
+ public static boolean isEmpty(String string)
+ {
+ return ( (string == null) || (string.length() == 0) );
+ }
}