Re: [Avalon4:Fortress] Eating Crow (was Changes to RoleManager)
Stephen McConnell <[email protected]>
| Newsgroups | gmane.comp.jakarta.avalon.apps.devel,gmane.comp.jakarta.avalon.devel |
|---|---|
| Message-ID | <[email protected]> |
Berin Loritsch wrote: >I am not going to do this anymore, but I will make some >fundamental changes: > >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. > Disagree. If I am expecting a non-null argument, and if the argument is null, I will throw a NPE with the name of the parameter. If the argument is not null but is for some reason invalid, I will throw a IllegalArgumentException. Steve. -- Stephen J. McConnell OSM SARL digital products for a global economy mailto:[email protected] http://www.osm.net