commons-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Rahul Akolkar" <rahul.akol...@gmail.com>
Subject Re: svn commit: r384400 - /jakarta/commons/proper/logging/contrib/simon/jcl2/core/java/org/apache/commons/logging/Utils.java
Date Thu, 09 Mar 2006 02:32:01 GMT
On 3/8/06, skitching@apache.org <skitching@apache.org> wrote:
> Author: skitching
> Date: Wed Mar  8 18:01:46 2006
> New Revision: 384400
>
> URL: http://svn.apache.org/viewcvs?rev=384400&view=rev
> Log:
> Minor fix: allow blank lines in file
>
> Modified:
>    jakarta/commons/proper/logging/contrib/simon/jcl2/core/java/org/apache/commons/logging/Utils.java
>
> Modified: jakarta/commons/proper/logging/contrib/simon/jcl2/core/java/org/apache/commons/logging/Utils.java
> URL: http://svn.apache.org/viewcvs/jakarta/commons/proper/logging/contrib/simon/jcl2/core/java/org/apache/commons/logging/Utils.java?rev=384400&r1=384399&r2=384400&view=diff
> ==============================================================================
> --- jakarta/commons/proper/logging/contrib/simon/jcl2/core/java/org/apache/commons/logging/Utils.java
(original)
> +++ jakarta/commons/proper/logging/contrib/simon/jcl2/core/java/org/apache/commons/logging/Utils.java
Wed Mar  8 18:01:46 2006
> @@ -145,7 +145,7 @@
>                 return null;
>             }
>             s.trim();
> -            if (!s.startsWith("#")) {
> +            if ((s.length() > 0) && !s.startsWith("#")) {
>                 return s;
>             }
>         }
>
<snip/>

Ofcourse, Strings being immutable, you probably mean:

s = s.trim();

or if 's' is off-limits, something to the effect of:

if ((s.trim().length() > 0) && !s.trim().startsWith("#")) {

-Rahul

---------------------------------------------------------------------
To unsubscribe, e-mail: commons-dev-unsubscribe@jakarta.apache.org
For additional commands, e-mail: commons-dev-help@jakarta.apache.org


Mime
View raw message