directory-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From elecha...@apache.org
Subject svn commit: r201856 - /directory/shared/ldap/trunk/common/src/java/org/apache/ldap/common/util/StringTools.java
Date Sun, 26 Jun 2005 14:45:16 GMT
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) );
+    }
 }
 



Mime
View raw message