commons-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Henri Yandell <>
Subject Re: [lang] StringUtils.containsOnly
Date Thu, 26 Sep 2002 20:42:12 GMT

On Thu, 26 Sep 2002, Berin Loritsch wrote:

> Henri Yandell wrote:
> >

> > Didn't this come up before?
> Dunno, I wasn't paying attention.
> > And large amounts of Java threw NPE instead of
> > IAE in this case?
> That's a lemming argument if I ever heard it.  "All my friends are
> jumping off a cliff, it must be the right thing to do!"  ;P
> Seriously, my suggestion will help the users of the API to debug
> their applications faster.  The fact that NPE is automatically
> thrown by the JVM makes it confusing to track down the origination
> of that exception.  At least with an IAE the user has a clue that
> their code is at fault.

Yeah, I think it's something that needs to be done as a rule by the Lang
project. All XxxUtils classes should protect from NPE and throw IAE.

Big question for me is, does this hold up a 1.0 release?

Modifying a method that currently takes null to throw an IAE is a big bomb
for an addicted future user, does it matter if we release with quiet
methods in some places?

Equally, we have many addicted users already, so we're going to have the
big bomb problem at some point.


To unsubscribe, e-mail:   <>
For additional commands, e-mail: <>

View raw message