commons-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Phil Steitz <stei...@yahoo.com>
Subject Re: [lang] So, about that 2.0....
Date Wed, 30 Jul 2003 20:29:02 GMT

--- Stephen Colebourne <scolebourne@btopenworld.com> wrote:
> I disagree. I added a number of extra methods to StringUtils. I don't think
> that the 'jar diff' format bit is accurate now. (Although I actually don't
> find it that friendly. Maybe we should hand write the comments in that
> section... then again maybe we should just release.)
> 
> Outstanding issues:
> - Enum tests
> - CharSetUtils.translate(*,*,"")

I have thought about the second issue some more.  Correct me if I am wrong, but
I think that the intention of translate(str, repl, with) is: 

"transform str to use the with characters in place of the repl characters",
with the understanding that if with contains fewer characters than repl, the
last with character will be used for all of the "extra" repl characters.

To me, this makes no sense if either with or repl is "" or null.  In the one
case that now throws ArrayOutOfBoundsException (repl positive length, with "")
a case could be made that this should mean the same thing as delete(str, repl),
but that is not obvious and I see no reason why this behavior should be
supported in translate.

Therefore, I think that the reasonable alternatives are

1. translate(str, with, repl) is a no-op (i.e. returns str unchanged) whenever
with, repl is null or ""

2. translate(str, with, repl) throws an exception whenever with, repl is null
or ""

Personally, I like option 2 and I would rather see IllegalArgumentException
thrown in all cases (including null).  I would also recommend modifying the
other methods in CharSetUtils that now throw NullPointerException to throw
IllegalArgumentException instead.  An alternative would be
NullArgumentException, but that would not literally apply to "". Maybe one day
we will define "EmptyArgumentException" for this kind of thing :)  For now,
seems to me that IllegalArgumentException would be best.  Just my HO.   

Phil


> 
> Stephen
> 
> ----- Original Message -----
> From: "Henri Yandell" <bayard@generationjava.com>
> To: "Jakarta Commons Developers List" <commons-dev@jakarta.apache.org>
> Sent: Wednesday, July 30, 2003 4:34 AM
> Subject: RE: [lang] So, about that 2.0....
> 
> 
> >
> > Apart from a few bug numbers [mostly javadoc, but I figured I'd list
> > them], not much else to change in the release notes. Thanks Stephen for
> > keeping them up to date with changes.
> >
> > Lots of javadoc improvement done over the last 2 weeks. Impressive.
> >
> > Hen
> >
> > On Tue, 29 Jul 2003, Henri Yandell wrote:
> >
> > >
> > > Actually I lie, I'm at Defcon this weekend so unless anyone has other
> > > thoughts I'll aim to get release-notes Tuesday, and an rc2 up for
> Thursday
> > > evening EST.
> > >
> > > Major problem with the last one from memory was the inclusion of javadoc
> > > in the jar. Will ensure the jar is nicer this time :)
> > >
> > > Shooting for a release towards the middle of next week if all goes well.
> > >
> > > Hen
> > >
> > > On Tue, 29 Jul 2003, Henri Yandell wrote:
> > >
> > > >
> > > > Guess it depends on timelines etc.
> > > >
> > > > We can spend the rest of the week checking on these bits, and I can
> build
> > > > an rc2 at the weekend for checking, or I can go ahead and build an rc2
> > > > tomorrow night and we can spend the week checking?
> > > >
> > > > Apart from Wednesday nights I'm pretty good for time and I've been
> staying
> > > > out of the way from the recent changes so I'll have the mental energy
> to
> > > > update the release-notes etc. No matter what we decide, I'll start
> > > > updating the changelog/release-notes tomorrow night.
> > > >
> > > > Hen
> > > >
> > > > On Mon, 28 Jul 2003, Gary Gregory wrote:
> > > >
> > > > > If it were all up to me, I would go ahead and commit these changes
> if they
> > > > > are good-to-go since these really about bullet-proofing the release.
> > > > >
> > > > > Gary
> > > > >
> > > > > -----Original Message-----
> > > > > From: Phil Steitz [mailto:steitzp@yahoo.com]
> > > > > Sent: Monday, July 28, 2003 18:18
> > > > > To: Jakarta Commons Developers List
> > > > > Subject: Re: [lang] So, about that 2.0....
> > > > >
> > > > >
> > > > > --- Stephen Colebourne <scolebourne@btopenworld.com> wrote:
> > > > > > has anybody got anything outstanding?
> > > > > >
> > > > > > Stephen
> > > > > >
> > > > >
> > > > > I have been working on some additional/improved unit tests for
> > > > > StringEscapeUtils and CharSetUtils (I notice that there are no unit
> tests
> > > > > for
> > > > > CharSetUtils.translate and there is a small javadoc error in the
> @throws
> > > > > tag),
> > > > > but I have not found any anomolies.  I can wait to submit this stuff
> until
> > > > > after the release if you want to roll it now.
> > > > >
> > > > > Phil
> > > > >
> > > > >
> > > > > >
> > > > >
> > ---------------------------------------------------------------------
> > > > > > To unsubscribe, e-mail: commons-dev-unsubscribe@jakarta.apache.org
> > > > > > For additional commands, e-mail:
> commons-dev-help@jakarta.apache.org
> > > > > >
> > > > >
> > > > >
> > > > > __________________________________
> > > > > Do you Yahoo!?
> > > > > Yahoo! SiteBuilder - Free, easy-to-use web site design software
> > > > > http://sitebuilder.yahoo.com
> > > > >
> > > >
> > ---------------------------------------------------------------------
> > > > > To unsubscribe, e-mail: commons-dev-unsubscribe@jakarta.apache.org
> > > > > For additional commands, e-mail: commons-dev-help@jakarta.apache.org
> > > > >
> > > >
> > > >
> > > > ---------------------------------------------------------------------
> > > > To unsubscribe, e-mail: commons-dev-unsubscribe@jakarta.apache.org
> > > > For additional commands, e-mail: commons-dev-help@jakarta.apache.org
> > > >
> > >
> > >
> > > ---------------------------------------------------------------------
> > > To unsubscribe, e-mail: commons-dev-unsubscribe@jakarta.apache.org
> > > For additional commands, e-mail: commons-dev-help@jakarta.apache.org
> > >
> >
> >
> > ---------------------------------------------------------------------
> > To unsubscribe, e-mail: commons-dev-unsubscribe@jakarta.apache.org
> > For additional commands, e-mail: commons-dev-help@jakarta.apache.org
> >
> 
> 
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: commons-dev-unsubscribe@jakarta.apache.org
> For additional commands, e-mail: commons-dev-help@jakarta.apache.org
> 


__________________________________
Do you Yahoo!?
Yahoo! SiteBuilder - Free, easy-to-use web site design software
http://sitebuilder.yahoo.com

---------------------------------------------------------------------
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