I would be happy to supply this patch. Choose your flavor... > -----Original Message----- > From: Stanley,Michael P. [mailto:[EMAIL PROTECTED] > Sent: Tuesday, March 04, 2003 11:18 AM > To: 'Jakarta Commons Developers List' > Subject: RE: [JAXL & JELLY] size() behavior question > > [snip] > > > > or should size() not throw an exception but return something like -1? > > I'm not a fan of such sloppyness, but wouldn't -1 make sense so you > > could test size() > 0 w/o fear? > > Well - the question is should size() be null safe? Some possible > options > > 1: make size() null safe by making size(null) == -1 or size(null) == 0 > 2: add a new function nullSafeSize(null) with behaves the same as above > 3: add a new function size(object val, Boolean nullSafe) so size(null) > web be the same as size(null, false) and throw an exception or > size(null, true) == -1 or 0 > > It's a design choice. I like option 3. > > - Mike > > > --------------------------------------------------------------------- > To unsubscribe, e-mail: [EMAIL PROTECTED] > For additional commands, e-mail: [EMAIL PROTECTED]
--------------------------------------------------------------------- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
