commons-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Henri Yandell <bay...@generationjava.com>
Subject Re: [lang] StringUtils.containsOnly
Date Thu, 26 Sep 2002 19:25:37 GMT


On Thu, 26 Sep 2002, Berin Loritsch wrote:

> Steve Downey wrote:

> > In any case, as I'm looking through right now, at least a few of the methods
> > that claim not to thow NPEs, do.
>
> My point is not to remove the throwing of exceptions, but to throw an
> exception that is more meaningful.  The NPE is automatically thrown by
> the system if you try to perform an action on a null reference--AKA the
> C++ pointer error analogy.  That is why I prefer to use
> IllegalArgumentExceptions instead.  We are not weakening preconditions,
> but we are letting the user of the API know where the problem is (in
> the arguments passed in).
>

Didn't this come up before? And large amounts of Java threw NPE instead of
IAE in this case?

Seem to recall deleting the thread last night while trimming my inbox...


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


Mime
View raw message