avalon-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Peter Royal <pro...@apache.org>
Subject Re: [Avalon4:Fortress] Eating Crow (was Changes to RoleManager)
Date Thu, 12 Dec 2002 19:13:21 GMT
On Thursday, December 12, 2002, at 02:08  PM, Berin Loritsch wrote:
> 1) We should *never* explicitly throw a NullPointerException.
>    If an argument is required, throw an IllegalArgumentException
>    instead.  The meaning of the error is much more clear.

I'd actually prefer it the other way.. Why?

Throw a NullPointerException when an argument that is expected is null.

Use IllegalArgumentException when there is an argument supplied, but it 
is invalid for other reasons.

-pete


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


Mime
View raw message