From: "Steve Downey" <[EMAIL PROTECTED]> On Thursday 26 September 2002 04:54 am, Stephen Colebourne wrote: > > My view is that one of the main advantages of StringUtils is to avoid NPEs. > > I actually thought that we'd been through all the methods and ensured that > > none of them did throw a NPE. > > I think that's overkill. You have to decide what to do with null, and often > the right thing to do is throw an NPE. Treating null as "" generally isn't a > good idea. If that's what you want, using StringUtils.clean() in the calling > code works.
I go further than this - in my world a product like [lang] would never throw NPEs. If it did then that would be a bug. If null is a disallowed parameter then that should be checked and thrown as an IllegalArgumentException. But thats just my coding style. Its probably a pity that we didn't agree a uniform approach to this, but its too late now. The priority is to document what we have correctly. Stephen -- To unsubscribe, e-mail: <mailto:[EMAIL PROTECTED]> For additional commands, e-mail: <mailto:[EMAIL PROTECTED]>
