[jdom-interest] Current test suite failures [eg]
brett at newInstance.com
Mon Apr 16 09:32:58 PDT 2001
+1 to NPE on any submission of null to the setList() type methods...
My $.02 ;-)
----- Original Message -----
From: "bob mcwhirter" <bob at werken.com>
To: "Joseph Bowbeer" <jozart at csi.com>
Cc: <jdom-interest at jdom.org>
Sent: Monday, April 16, 2001 11:28 AM
Subject: Re: [jdom-interest] Current test suite failures [eg]
> > > 2 - All set<List> methods like should assume that null means
> > > the same as Collections.EMPTY_LIST and do that, though I
> > > imagine that is debatable.
> > >
> > I wonder, too. Why should we cut null any slack? Null might also
> > a programmer error.
> > I suggest we use Collections as a model here. For example, if you look
> > implementations of Collection.addAll(collection), you'll find that they
> > throw NullPointerException if the Collection argument is null.
> I agree.
> I tend to favor APIs that make a programmer explicitly Do The Right Thing.
> null is not a list, of any sort, and certainly not an empty list.
> null should, in my mind, only be used for null values, not empty/zero
> To control your jdom-interest membership:
More information about the jdom-interest