You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@commons.apache.org by Gary Gregory <GG...@seagullsoftware.com> on 2008/02/06 20:34:26 UTC
RE: svn commit: r619115 -
/commons/proper/lang/trunk/src/java/org/apache/commons/lang/StringUtils.java
What I meant to say in the commit comment was:
Eat own dog food: Use EMPTY instead of "".
Gary
> -----Original Message-----
> From: ggregory@apache.org [mailto:ggregory@apache.org]
> Sent: Wednesday, February 06, 2008 11:27 AM
> To: commits@commons.apache.org
> Subject: svn commit: r619115 -
> /commons/proper/lang/trunk/src/java/org/apache/commons/lang/StringUtils.ja
> va
>
> Author: ggregory
> Date: Wed Feb 6 11:27:10 2008
> New Revision: 619115
>
> URL: http://svn.apache.org/viewvc?rev=619115&view=rev
> Log:
> Eat own dog food:
>
> Modified:
>
> commons/proper/lang/trunk/src/java/org/apache/commons/lang/StringUtils.jav
> a
>
> Modified:
> commons/proper/lang/trunk/src/java/org/apache/commons/lang/StringUtils.jav
> a
> URL:
> http://svn.apache.org/viewvc/commons/proper/lang/trunk/src/java/org/apach
> e/commons/lang/StringUtils.java?rev=619115&r1=619114&r2=619115&view=diff
> ======================================================================
> ========
> ---
> commons/proper/lang/trunk/src/java/org/apache/commons/lang/StringUtils.jav
> a (original)
> +++
> commons/proper/lang/trunk/src/java/org/apache/commons/lang/StringUtils.jav
> a Wed Feb 6 11:27:10 2008
> @@ -2351,7 +2351,7 @@
> return ArrayUtils.EMPTY_STRING_ARRAY;
> }
>
> - if ( ( separator == null ) || ( "".equals( separator ) ) ) {
> + if ( ( separator == null ) || ( EMPTY.equals( separator ) ) ) {
> // Split on whitespace.
> return splitWorker( str, null, max, preserveAllTokens ) ;
> }
> @@ -2391,7 +2391,7 @@
> end = len ;
> substrings.add( str.substring( beg ) ) ;
> } else {
> - substrings.add( "" );
> + substrings.add( EMPTY );
> }
> }
> beg = end + separatorLength ;
> @@ -3377,7 +3377,7 @@
> if (isEmpty(str) || isEmpty(remove)) {
> return str;
> }
> - return replace(str, remove, "", -1);
> + return replace(str, remove, EMPTY, -1);
> }
>
> /**
> @@ -3856,7 +3856,7 @@
> return str;
> }
> if (replaceChars == null) {
> - replaceChars = "";
> + replaceChars = EMPTY;
> }
> boolean modified = false;
> int replaceCharsLength = replaceChars.length();
>
---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@commons.apache.org
For additional commands, e-mail: dev-help@commons.apache.org
Re: svn commit: r619115 - /commons/proper/lang/trunk/src/java/org/apache/commons/lang/StringUtils.java
Posted by Niall Pemberton <ni...@gmail.com>.
On Feb 6, 2008 7:34 PM, Gary Gregory <GG...@seagullsoftware.com> wrote:
> What I meant to say in the commit comment was:
> Eat own dog food: Use EMPTY instead of "".
You can change log messages if you want
Niall
> Gary
>
> > -----Original Message-----
> > From: ggregory@apache.org [mailto:ggregory@apache.org]
> > Sent: Wednesday, February 06, 2008 11:27 AM
> > To: commits@commons.apache.org
> > Subject: svn commit: r619115 -
> > /commons/proper/lang/trunk/src/java/org/apache/commons/lang/StringUtils.ja
> > va
> >
> > Author: ggregory
> > Date: Wed Feb 6 11:27:10 2008
> > New Revision: 619115
> >
> > URL: http://svn.apache.org/viewvc?rev=619115&view=rev
> > Log:
> > Eat own dog food:
> >
> > Modified:
> >
> > commons/proper/lang/trunk/src/java/org/apache/commons/lang/StringUtils.jav
> > a
> >
> > Modified:
> > commons/proper/lang/trunk/src/java/org/apache/commons/lang/StringUtils.jav
> > a
>
> > URL:
> > http://svn.apache.org/viewvc/commons/proper/lang/trunk/src/java/org/apach
> > e/commons/lang/StringUtils.java?rev=619115&r1=619114&r2=619115&view=diff
> > ======================================================================
> > ========
> > ---
> > commons/proper/lang/trunk/src/java/org/apache/commons/lang/StringUtils.jav
> > a (original)
> > +++
> > commons/proper/lang/trunk/src/java/org/apache/commons/lang/StringUtils.jav
> > a Wed Feb 6 11:27:10 2008
> > @@ -2351,7 +2351,7 @@
> > return ArrayUtils.EMPTY_STRING_ARRAY;
> > }
> >
> > - if ( ( separator == null ) || ( "".equals( separator ) ) ) {
> > + if ( ( separator == null ) || ( EMPTY.equals( separator ) ) ) {
> > // Split on whitespace.
> > return splitWorker( str, null, max, preserveAllTokens ) ;
> > }
> > @@ -2391,7 +2391,7 @@
> > end = len ;
> > substrings.add( str.substring( beg ) ) ;
> > } else {
> > - substrings.add( "" );
> > + substrings.add( EMPTY );
> > }
> > }
> > beg = end + separatorLength ;
> > @@ -3377,7 +3377,7 @@
> > if (isEmpty(str) || isEmpty(remove)) {
> > return str;
> > }
> > - return replace(str, remove, "", -1);
> > + return replace(str, remove, EMPTY, -1);
> > }
> >
> > /**
> > @@ -3856,7 +3856,7 @@
> > return str;
> > }
> > if (replaceChars == null) {
> > - replaceChars = "";
> > + replaceChars = EMPTY;
> > }
> > boolean modified = false;
> > int replaceCharsLength = replaceChars.length();
> >
>
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: dev-unsubscribe@commons.apache.org
> For additional commands, e-mail: dev-help@commons.apache.org
>
>
---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@commons.apache.org
For additional commands, e-mail: dev-help@commons.apache.org