[Mondrian] using commons-lang

Julian Hyde jhyde at pentaho.com
Thu Nov 12 15:50:21 EST 2009


I don't think that such a small piece of functionality quite justifies an
extra dependency. I would copy-paste the logic, noting that the logic came
from StringUtils.isBlank.
 
 
216     /**
217      * <p>Checks if a String is whitespace, empty ("") or null.</p>
218      *
219      * <pre>
220      * StringUtils.isBlank(null) = true
221      * StringUtils.isBlank("") = true
222      * StringUtils.isBlank(" ") = true
223      * StringUtils.isBlank("bob") = false
224      * StringUtils.isBlank(" bob ") = false
225      * </pre>
226      *
227      * @param str the String to check, may be null
228      * @return <code>true</code> if the String is null, empty or
whitespace
229      * @since 2.0
230      */
231     public static boolean isBlank(String
<outbind://105/java/lang/String.java.htm>  str) {
232         int strLen;
233         if (str == null || (strLen = str.length()) == 0) {
234             return true;
235         }
236         for (int i = 0; i < strLen; i++) {
237             if ((Character.isWhitespace(str.charAt(i)) == false)) {
238                 return false;
239             }
240         }
241         return true;
242     }

Read more:
http://kickjava.com/src/org/apache/commons/lang/StringUtils.java.htm#ixzz0Wg
FVVaFF


  _____  

From: mondrian-bounces at pentaho.org [mailto:mondrian-bounces at pentaho.org] On
Behalf Of Kurtis.Walker at thomsonreuters.com
Sent: Thursday, November 12, 2009 12:30 PM
To: mondrian at pentaho.org
Subject: [Mondrian] using commons-lang



Hi,

  I'd like to use the StringUtils.isBlank method, which is in
commons-lang.jar to implement the enhancement MONDRIAN-642.  Ivy is already
configured to pull this jar down, but the build is not configured to use it.
Are there any objections to using this jar?  Is there any configuration
besides build.xml and the intellij file where I need to include this jar?
Thanks.

 

. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
.
Kurtis Walker
Programmer Analyst Sr

Thomson Reuters

734-913-3034
kurtis.walker at thomsonreuters.com
 <http://thomsonreuters.com> thomsonreuters.com

-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://lists.pentaho.org/pipermail/mondrian/attachments/20091112/f945e832/attachment.html 


More information about the Mondrian mailing list