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

bob mcwhirter bob at werken.com
Mon Apr 16 09:28:20 PDT 2001

> > 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. 


More information about the jdom-interest mailing list