You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@commons.apache.org by Henri Yandell <ba...@generationjava.com> on 2002/07/14 07:30:53 UTC

[lang] Commons.Lang promotable?

All the remaining methods in Strings.java are now unit tested with the
noted exceptions of stackTrace() due to unpredictability and
nativeToUnicode/unicodeToNative due to platform issues.

All unit tests now pass. With the exception of the methods mentioned
above, all current methods are in a position and state not expected to
change and to be close to releasable. [Not that this is planned to occur
immediately].

Does anyone know of anything I've missed which is necessary before we put
a promotion to Commons proper to the vote? Does anyone have anything they
think we should do?

The only one that rates highly for me is the discussion of naming
conventions. I'll post on that in another thread.

Hen


--
To unsubscribe, e-mail:   <ma...@jakarta.apache.org>
For additional commands, e-mail: <ma...@jakarta.apache.org>


Re: [lang] Commons.Lang promotable?

Posted by Henri Yandell <ba...@generationjava.com>.

On Tue, 16 Jul 2002, Stephen Colebourne wrote:

> Having looked at it again, my interface worry is over CharSet, and whether
> it should be CharSetUtils, with a separate package scoped CharSet class.
> This leads on to CharRange, which is package scoped, but I feel that with
> some work (testing) it could be public, like NumberRange.

Keeping the package scope is fine at this time I think. Moving it to
public won't hurt anyone later on.

I agree that CharSet could move to CharSetUtils and CharSet. I'll do that
tonight. I'll also fix the stripStart/End methods to take a char.

Then I'll propose the vote.

Hen



--
To unsubscribe, e-mail:   <ma...@jakarta.apache.org>
For additional commands, e-mail: <ma...@jakarta.apache.org>


Re: [lang] Commons.Lang promotable?

Posted by Stephen Colebourne <sc...@btopenworld.com>.
From: "Berin Loritsch" <bl...@apache.org>
> I disagree.  When you look at java.util.StringTokenizer, when
> you have multiple characters in the delimiter, it means that
> any one of those characters splits a token.
>
> You just need to document it explicitly that it strips all
> characters until it encounters the first character that is not
> in the delimiter list.

+1, but when I glanced at the code I didn't think that was what it actually
did.

> What real use would there be if we only striped out the token
> "ab"?  I can do that by calling m_str.SubString( "ab".length,
> m_str.length() );

Well I guess repeated "ab"s could be stripped, but thats a very odd use
case.

> The only thing I can think of is to add another parameter that
> is a boolean to flag wether the algorithm respects the sequence
> of characters in the delimiter or not.

-1. I don't think the use case is sufficiently strong for the third method.

Stephen


--
To unsubscribe, e-mail:   <ma...@jakarta.apache.org>
For additional commands, e-mail: <ma...@jakarta.apache.org>


RE: [lang] StringUtils.strip

Posted by Henri Yandell <ba...@generationjava.com>.
I've made the strip code match the original intended javadoc. Was a
worrying simple fix :) I didn't do the "ab" sequence version I suggested,
as I'm happy with the view that it's not going to be highly desirable.

Hen

On Wed, 17 Jul 2002, Berin Loritsch wrote:

> I disagree.  When you look at java.util.StringTokenizer, when
> you have multiple characters in the delimiter, it means that
> any one of those characters splits a token.
>
> You just need to document it explicitly that it strips all
> characters until it encounters the first character that is not
> in the delimiter list.
>
> What real use would there be if we only striped out the token
> "ab"?  I can do that by calling m_str.SubString( "ab".length,
> m_str.length() );
> The only thing I can think of is to add another parameter that
> is a boolean to flag wether the algorithm respects the sequence
> of characters in the delimiter or not.
>
> In that case, we should have three methods:
>
> // strip whitespace
> StringUtils.stripStart(String word)
> {
>    StringUtils.stripStart( word, " \b\t\r\n\l" );
> }
>
> // strip all characters in the delimiters
> StringUtils.stripStart(String word, String delimiters)
> {
>     StringUtils.stripStart( word, delimiters, false );
> }
>
> StringUtils.stripStart(String word, String delimiters, boolean
> respectSequence)
> {
>     // .....
> }
>
> As the user needs to be more specific about the requirements of the
> stripStart/stripEnd methods, they have something that handles it.
>
>
> --
> To unsubscribe, e-mail:   <ma...@jakarta.apache.org>
> For additional commands, e-mail: <ma...@jakarta.apache.org>
>
>


--
To unsubscribe, e-mail:   <ma...@jakarta.apache.org>
For additional commands, e-mail: <ma...@jakarta.apache.org>


RE: [lang] Commons.Lang promotable?

Posted by Berin Loritsch <bl...@apache.org>.
> From: Henri Yandell [mailto:bayard@generationjava.com] 
> 
> The CharSet split is done.
> 
> The stripXXX change is not done as the code uses null for a 
> strip on whitespace. The javadoc shows that the original 
> intention was for:
> 
> StringUtils.stripStart("abbaaword","ab") to strip the a's and 
> the b's out.
> 
> A worry there would be that a user would expect it to strip 
> out only the token 'ab' and not any 'a' or 'b'. Indeed, this 
> would seem the more normal usage, so my suggestion would be 
> for the code to handle delimiters larger than a single 
> character and treat the delimiter as an entire token and not 
> a set of characters as the javadoc suggests.
> 
> Any views?
> 
> [I'm assuming this isn't a major issue regarding the Commons 
> promotion].

I disagree.  When you look at java.util.StringTokenizer, when
you have multiple characters in the delimiter, it means that
any one of those characters splits a token.

You just need to document it explicitly that it strips all
characters until it encounters the first character that is not
in the delimiter list.

What real use would there be if we only striped out the token
"ab"?  I can do that by calling m_str.SubString( "ab".length,
m_str.length() );
The only thing I can think of is to add another parameter that
is a boolean to flag wether the algorithm respects the sequence
of characters in the delimiter or not.

In that case, we should have three methods:

// strip whitespace
StringUtils.stripStart(String word)
{
   StringUtils.stripStart( word, " \b\t\r\n\l" );
}

// strip all characters in the delimiters
StringUtils.stripStart(String word, String delimiters)
{
    StringUtils.stripStart( word, delimiters, false );
}

StringUtils.stripStart(String word, String delimiters, boolean
respectSequence)
{
    // .....
}

As the user needs to be more specific about the requirements of the
stripStart/stripEnd methods, they have something that handles it.


--
To unsubscribe, e-mail:   <ma...@jakarta.apache.org>
For additional commands, e-mail: <ma...@jakarta.apache.org>


Re: [lang] Commons.Lang promotable?

Posted by Henri Yandell <ba...@generationjava.com>.
The CharSet split is done.

The stripXXX change is not done as the code uses null for a strip on
whitespace. The javadoc shows that the original intention was for:

StringUtils.stripStart("abbaaword","ab") to strip the a's and the b's out.

A worry there would be that a user would expect it to strip out only
the token 'ab' and not any 'a' or 'b'. Indeed, this would seem the more
normal usage, so my suggestion would be for the code to handle delimiters
larger than a single character and treat the delimiter as an entire token
and not a set of characters as the javadoc suggests.

Any views?

[I'm assuming this isn't a major issue regarding the Commons promotion].

Hen


On Tue, 16 Jul 2002, Stephen Colebourne wrote:

> Having looked at it again, my interface worry is over CharSet, and whether
> it should be CharSetUtils, with a separate package scoped CharSet class.
> This leads on to CharRange, which is package scoped, but I feel that with
> some work (testing) it could be public, like NumberRange.
>
> The only methods that were a little odd were stripStart and stripEnd in
> StringUtils. These only use the first character of the passed in string, and
> thus should probably be changed to take in a char.
>
> Otherwise I'm ready ;-)
>
> Stephen
>
> ----- Original Message -----
> From: "Henri Yandell" <ba...@generationjava.com>
> To: "Jakarta Commons Developers List" <co...@jakarta.apache.org>
> Sent: Tuesday, July 16, 2002 2:44 PM
> Subject: Re: [lang] Commons.Lang promotable?
>
>
> >
> >
> > On Tue, 16 Jul 2002, Martin Poeschl wrote:
> >
> > > ok, so i'll use cvs HEAD for the beta release (planned for tomorrow)
> > > hopefully there is a commons-lang release before the final turbine 2.2
> > > release ;-)
> >
> > Okay. Will do what we can to keep it moving. There's a whole pile of
> > submissions which have been kept at the front door.
> >
> > If I had to guess I'd say:
> >
> > Tonight: Vote for Commons Proper.
> > Thursday: Migrate to Commons Proper. Release of beta.
> > Friday: Begin discussion of the 4 or 5 new areas with a focus of closing
> > each one off within a week.
> > Weekend/Monday: Begin work on a site and all the necessary admin such as
> > deployment to Maven, checking on gump etc.
> > Friday+7: All submissions decided upon, submission freeze.
> > Friday+14: Code/UnitTests should be complete.
> > Subsequent Monday: Vote on release.
> >
> >
> > Just a guess though. What's the turbine release schedule?
> >
> > > > Sorry for the problems caused,
> > >
> > > no problem .. if you don't cause more problems ;-)
> >
> > The private release schedule of problems indicates that you have at least
> > a week until the next one.
> >
> > Hen
> >
> >
> > --
> > To unsubscribe, e-mail:
> <ma...@jakarta.apache.org>
> > For additional commands, e-mail:
> <ma...@jakarta.apache.org>
> >
>
>
> --
> To unsubscribe, e-mail:   <ma...@jakarta.apache.org>
> For additional commands, e-mail: <ma...@jakarta.apache.org>
>
>


--
To unsubscribe, e-mail:   <ma...@jakarta.apache.org>
For additional commands, e-mail: <ma...@jakarta.apache.org>


Re: [lang] Commons.Lang promotable?

Posted by Stephen Colebourne <sc...@btopenworld.com>.
I have just gone through and done any final javadoc chores I could see. Plus
odds and ends like private constructors.

Having looked at it again, my interface worry is over CharSet, and whether
it should be CharSetUtils, with a separate package scoped CharSet class.
This leads on to CharRange, which is package scoped, but I feel that with
some work (testing) it could be public, like NumberRange.

The only methods that were a little odd were stripStart and stripEnd in
StringUtils. These only use the first character of the passed in string, and
thus should probably be changed to take in a char.

Otherwise I'm ready ;-)

Stephen

----- Original Message -----
From: "Henri Yandell" <ba...@generationjava.com>
To: "Jakarta Commons Developers List" <co...@jakarta.apache.org>
Sent: Tuesday, July 16, 2002 2:44 PM
Subject: Re: [lang] Commons.Lang promotable?


>
>
> On Tue, 16 Jul 2002, Martin Poeschl wrote:
>
> > ok, so i'll use cvs HEAD for the beta release (planned for tomorrow)
> > hopefully there is a commons-lang release before the final turbine 2.2
> > release ;-)
>
> Okay. Will do what we can to keep it moving. There's a whole pile of
> submissions which have been kept at the front door.
>
> If I had to guess I'd say:
>
> Tonight: Vote for Commons Proper.
> Thursday: Migrate to Commons Proper. Release of beta.
> Friday: Begin discussion of the 4 or 5 new areas with a focus of closing
> each one off within a week.
> Weekend/Monday: Begin work on a site and all the necessary admin such as
> deployment to Maven, checking on gump etc.
> Friday+7: All submissions decided upon, submission freeze.
> Friday+14: Code/UnitTests should be complete.
> Subsequent Monday: Vote on release.
>
>
> Just a guess though. What's the turbine release schedule?
>
> > > Sorry for the problems caused,
> >
> > no problem .. if you don't cause more problems ;-)
>
> The private release schedule of problems indicates that you have at least
> a week until the next one.
>
> Hen
>
>
> --
> To unsubscribe, e-mail:
<ma...@jakarta.apache.org>
> For additional commands, e-mail:
<ma...@jakarta.apache.org>
>


--
To unsubscribe, e-mail:   <ma...@jakarta.apache.org>
For additional commands, e-mail: <ma...@jakarta.apache.org>


Re: [lang] Commons.Lang promotable?

Posted by Henri Yandell <ba...@generationjava.com>.

On Tue, 16 Jul 2002, Martin Poeschl wrote:

> ok, so i'll use cvs HEAD for the beta release (planned for tomorrow)
> hopefully there is a commons-lang release before the final turbine 2.2
> release ;-)

Okay. Will do what we can to keep it moving. There's a whole pile of
submissions which have been kept at the front door.

If I had to guess I'd say:

Tonight: Vote for Commons Proper.
Thursday: Migrate to Commons Proper. Release of beta.
Friday: Begin discussion of the 4 or 5 new areas with a focus of closing
each one off within a week.
Weekend/Monday: Begin work on a site and all the necessary admin such as
deployment to Maven, checking on gump etc.
Friday+7: All submissions decided upon, submission freeze.
Friday+14: Code/UnitTests should be complete.
Subsequent Monday: Vote on release.


Just a guess though. What's the turbine release schedule?

> > Sorry for the problems caused,
>
> no problem .. if you don't cause more problems ;-)

The private release schedule of problems indicates that you have at least
a week until the next one.

Hen


--
To unsubscribe, e-mail:   <ma...@jakarta.apache.org>
For additional commands, e-mail: <ma...@jakarta.apache.org>


Re: [lang] Commons.Lang promotable?

Posted by Martin Poeschl <mp...@marmot.at>.
Henri Yandell wrote:
> 
> On Tue, 16 Jul 2002, Martin Poeschl wrote:
> 
> 
>>i'm currently working on a turbine 2.2 release. turbine and torque use
>>commons-lang (i think some of the code came from turbine)
> 
> 
> Yep.
> 
> 
>>everytime i upgrade the lang package it breaks evarthing!! :-(((
> 
> 
> Yep.
> 
> 
>>could you please start to deprecate stuff instead of just removing it!
> 
> 
> Nope.
> 
> 
>>is the current api stable now??
> 
> 
> Nope.
> 
> 
>>ther is no release which i could use for the turbine release, but i
>>need some kind of a stable version ... (StringUtils -> Strings ->
>>StringUtils .. i think we can leave the names now as they are ;-)
> 
> 
> Yep.
> 
> Okay I'm playing with you :) I've been thinking that when we goto Commons
> proper [I believe it should be this week], that we should release a
> beta as mentioned on the http://jakarta.apache.org/commons/versioning.html
> page.
> 
> It would be a stable initial release which should not have any/many
> external interface changes, but will have new classes added before
> release.

ok, so i'll use cvs HEAD for the beta release (planned for tomorrow)
hopefully there is a commons-lang release before the final turbine 2.2 release ;-)


> 
> The biggest issue that could hit you are the removal of Constant and the
> temporary removal of Classes/ClassUtils.
> 
> Sorry for the problems caused,

no problem .. if you don't cause more problems ;-)

martin

> 
> Hen
> 
> 
> --
> To unsubscribe, e-mail:   <ma...@jakarta.apache.org>
> For additional commands, e-mail: <ma...@jakarta.apache.org>
> 



--
To unsubscribe, e-mail:   <ma...@jakarta.apache.org>
For additional commands, e-mail: <ma...@jakarta.apache.org>


Re: [lang] Commons.Lang promotable?

Posted by Henri Yandell <ba...@generationjava.com>.

On Tue, 16 Jul 2002, Martin Poeschl wrote:

> i'm currently working on a turbine 2.2 release. turbine and torque use
> commons-lang (i think some of the code came from turbine)

Yep.

> everytime i upgrade the lang package it breaks evarthing!! :-(((

Yep.

> could you please start to deprecate stuff instead of just removing it!

Nope.

> is the current api stable now??

Nope.

> ther is no release which i could use for the turbine release, but i
> need some kind of a stable version ... (StringUtils -> Strings ->
> StringUtils .. i think we can leave the names now as they are ;-)

Yep.

Okay I'm playing with you :) I've been thinking that when we goto Commons
proper [I believe it should be this week], that we should release a
beta as mentioned on the http://jakarta.apache.org/commons/versioning.html
page.

It would be a stable initial release which should not have any/many
external interface changes, but will have new classes added before
release.

The biggest issue that could hit you are the removal of Constant and the
temporary removal of Classes/ClassUtils.

Sorry for the problems caused,

Hen


--
To unsubscribe, e-mail:   <ma...@jakarta.apache.org>
For additional commands, e-mail: <ma...@jakarta.apache.org>


Re: [lang] Commons.Lang promotable?

Posted by Martin Poeschl <mp...@marmot.at>.
Henri Yandell wrote:
> Okay, one last time then :)
> 
> Classes are renamed to xxxUtils. Let me know if I cocked any of those up.
> ClassUtils is currently cvs removed, I'll add it to Commons.Utils if we
> seem to be entering into a slow period, but until then will wait to see
> what the call on reflect is. Cvs attic comfortably has it.
> 
> So, anyone with any things that are holding back our calling a vote on
> promoting Commons.Lang?
> 
> Hen

i'm currently working on a turbine 2.2 release.
turbine and torque use commons-lang (i think some of the code came from turbine)

everytime i upgrade the lang package it breaks evarthing!! :-(((

could you please start to deprecate stuff instead of just removing it!

is the current api stable now??
ther is no release which i could use for the turbine release, but i need some kind of a stable 
version ...
(StringUtils -> Strings -> StringUtils .. i think we can leave the names now as they are ;-)


thanx

martin

> 
> 
> On Sun, 14 Jul 2002, Stephen Colebourne wrote:
> 
> 
>>I'm not that bothered. Just thought it might make things simpler. It would
>>seem a little odd having a 'live' project in both proper and sandbox.
>>
>>Stephen
>>
>>----- Original Message -----
>>From: "Henri Yandell" <ba...@generationjava.com>
>>To: "Jakarta Commons Developers List" <co...@jakarta.apache.org>
>>Sent: Sunday, July 14, 2002 3:57 PM
>>Subject: Re: [lang] Commons.Lang promotable?
>>
>>
>>
>>>Another option is to leave things in Lang-sandbox. I've not seen a project
>>>having a sandboxed version, but have also not seen anything saying there
>>>can't be a sandbox to contain research items. It would only hold the one
>>>class, but would only be temporary as the Classes/lang.reflect issue will
>>>be resolved prior to release.
>>>
>>>Alternatively, it can be cvs removed and retrieved later. Using util as
>>>that temporary a staging ground seems wrong.
>>>
>>>Hen
>>>
>>>On Sun, 14 Jul 2002, Stephen Colebourne wrote:
>>>
>>>
>>>>Move Classes to Util. This seems the best way to avoid confusion in the
>>>>promote vote.
>>>>
>>>>Stephen
>>>
>>>
>>>--
>>>To unsubscribe, e-mail:
>>
>><ma...@jakarta.apache.org>
>>
>>>For additional commands, e-mail:
>>
>><ma...@jakarta.apache.org>
>>
>>
>>--
>>To unsubscribe, e-mail:   <ma...@jakarta.apache.org>
>>For additional commands, e-mail: <ma...@jakarta.apache.org>
>>
>>
> 
> 
> --
> To unsubscribe, e-mail:   <ma...@jakarta.apache.org>
> For additional commands, e-mail: <ma...@jakarta.apache.org>
> 



--
To unsubscribe, e-mail:   <ma...@jakarta.apache.org>
For additional commands, e-mail: <ma...@jakarta.apache.org>


Re: [lang] Commons.Lang promotable?

Posted by Henri Yandell <ba...@generationjava.com>.
Okay, one last time then :)

Classes are renamed to xxxUtils. Let me know if I cocked any of those up.
ClassUtils is currently cvs removed, I'll add it to Commons.Utils if we
seem to be entering into a slow period, but until then will wait to see
what the call on reflect is. Cvs attic comfortably has it.

So, anyone with any things that are holding back our calling a vote on
promoting Commons.Lang?

Hen


On Sun, 14 Jul 2002, Stephen Colebourne wrote:

> I'm not that bothered. Just thought it might make things simpler. It would
> seem a little odd having a 'live' project in both proper and sandbox.
>
> Stephen
>
> ----- Original Message -----
> From: "Henri Yandell" <ba...@generationjava.com>
> To: "Jakarta Commons Developers List" <co...@jakarta.apache.org>
> Sent: Sunday, July 14, 2002 3:57 PM
> Subject: Re: [lang] Commons.Lang promotable?
>
>
> >
> > Another option is to leave things in Lang-sandbox. I've not seen a project
> > having a sandboxed version, but have also not seen anything saying there
> > can't be a sandbox to contain research items. It would only hold the one
> > class, but would only be temporary as the Classes/lang.reflect issue will
> > be resolved prior to release.
> >
> > Alternatively, it can be cvs removed and retrieved later. Using util as
> > that temporary a staging ground seems wrong.
> >
> > Hen
> >
> > On Sun, 14 Jul 2002, Stephen Colebourne wrote:
> >
> > > Move Classes to Util. This seems the best way to avoid confusion in the
> > > promote vote.
> > >
> > > Stephen
> >
> >
> > --
> > To unsubscribe, e-mail:
> <ma...@jakarta.apache.org>
> > For additional commands, e-mail:
> <ma...@jakarta.apache.org>
> >
>
>
> --
> To unsubscribe, e-mail:   <ma...@jakarta.apache.org>
> For additional commands, e-mail: <ma...@jakarta.apache.org>
>
>


--
To unsubscribe, e-mail:   <ma...@jakarta.apache.org>
For additional commands, e-mail: <ma...@jakarta.apache.org>


Re: [lang] Commons.Lang promotable?

Posted by Stephen Colebourne <sc...@btopenworld.com>.
I'm not that bothered. Just thought it might make things simpler. It would
seem a little odd having a 'live' project in both proper and sandbox.

Stephen

----- Original Message -----
From: "Henri Yandell" <ba...@generationjava.com>
To: "Jakarta Commons Developers List" <co...@jakarta.apache.org>
Sent: Sunday, July 14, 2002 3:57 PM
Subject: Re: [lang] Commons.Lang promotable?


>
> Another option is to leave things in Lang-sandbox. I've not seen a project
> having a sandboxed version, but have also not seen anything saying there
> can't be a sandbox to contain research items. It would only hold the one
> class, but would only be temporary as the Classes/lang.reflect issue will
> be resolved prior to release.
>
> Alternatively, it can be cvs removed and retrieved later. Using util as
> that temporary a staging ground seems wrong.
>
> Hen
>
> On Sun, 14 Jul 2002, Stephen Colebourne wrote:
>
> > Move Classes to Util. This seems the best way to avoid confusion in the
> > promote vote.
> >
> > Stephen
>
>
> --
> To unsubscribe, e-mail:
<ma...@jakarta.apache.org>
> For additional commands, e-mail:
<ma...@jakarta.apache.org>
>


--
To unsubscribe, e-mail:   <ma...@jakarta.apache.org>
For additional commands, e-mail: <ma...@jakarta.apache.org>


Re: [lang] Commons.Lang promotable?

Posted by Henri Yandell <ba...@generationjava.com>.
Another option is to leave things in Lang-sandbox. I've not seen a project
having a sandboxed version, but have also not seen anything saying there
can't be a sandbox to contain research items. It would only hold the one
class, but would only be temporary as the Classes/lang.reflect issue will
be resolved prior to release.

Alternatively, it can be cvs removed and retrieved later. Using util as
that temporary a staging ground seems wrong.

Hen

On Sun, 14 Jul 2002, Stephen Colebourne wrote:

> Move Classes to Util. This seems the best way to avoid confusion in the
> promote vote.
>
> Stephen


--
To unsubscribe, e-mail:   <ma...@jakarta.apache.org>
For additional commands, e-mail: <ma...@jakarta.apache.org>


Re: [lang] Commons.Lang promotable?

Posted by Stephen Colebourne <sc...@btopenworld.com>.
From: "Henri Yandell" <ba...@generationjava.com>
> Does anyone know of anything I've missed which is necessary before we put
> a promotion to Commons proper to the vote? Does anyone have anything they
> think we should do?

Move Classes to Util. This seems the best way to avoid confusion in the
promote vote.

Stephen


--
To unsubscribe, e-mail:   <ma...@jakarta.apache.org>
For additional commands, e-mail: <ma...@jakarta.apache.org>