Hitachi Vantara Pentaho Community Forums
Results 1 to 2 of 2

Thread: [Mondrian] using commons-lang

  1. #1
    Guest

    Default [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 (DOT) com
    thomsonreuters.com <http://thomsonreuters.com>


    _______________________________________________
    Mondrian mailing list
    Mondrian (AT) pentaho (DOT) org
    http://lists.pentaho.org/mailman/listinfo/mondrian

  2. #2
    Julian Hyde Guest

    Default RE: [Mondrian] using commons-lang

    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/c...va.htm#ixzz0Wg
    FVVaFF


    _____

    From: mondrian-bounces (AT) pentaho (DOT) org [mailto:mondrian-bounces (AT) pentaho (DOT) org] On
    Behalf Of Kurtis.Walker (AT) thomsonreuters (DOT) com
    Sent: Thursday, November 12, 2009 12:30 PM
    To: mondrian (AT) pentaho (DOT) 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 (DOT) com
    <http://thomsonreuters.com> thomsonreuters.com


    _______________________________________________
    Mondrian mailing list
    Mondrian (AT) pentaho (DOT) org
    http://lists.pentaho.org/mailman/listinfo/mondrian

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  
Privacy Policy | Legal Notices | Safe Harbor Privacy Policy

Copyright © 2005 - 2019 Hitachi Vantara Corporation. All Rights Reserved.