[jdom-interest] Current test suite failures [eg]

Brett McLaughlin 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 ;-)

-Brett
----- 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
represent
> > a programmer error.
> >
> > I suggest we use Collections as a model here.  For example, if you look
at
> > 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
values.
>
> -bob
>
> _______________________________________________
> To control your jdom-interest membership:
>
http://lists.denveronline.net/mailman/options/jdom-interest/youraddr@yourhos
t.com




More information about the jdom-interest mailing list