Re: Commons Lang 3: Validate

2009-11-22 Thread Henri Yandell
On Sun, Nov 22, 2009 at 4:36 PM, Stephen Colebourne wrote: > Henri Yandell wrote: >> >> On Thu, Nov 19, 2009 at 9:24 AM, Paul Benedict >> wrote: >>> >>> On Thu, Nov 19, 2009 at 1:39 AM, Henri Yandell >>> wrote: >>> Your argument being that the JDK and others do NPE when null? i.e. NPE

Re: Commons Lang 3: Validate

2009-11-22 Thread Paul Benedict
Stephen, that's why I thought a static flag would be a compromise, but I don't think it's the best solution. Anyway, the changes I made locally so far are this: * notNull - throws NPE * isTrue - throws IAE * isValidIndex - throws IOOBE Paul On Sun, Nov 22, 2009 at 6:36 PM, Stephen Colebourne wr

Re: Commons Lang 3: Validate

2009-11-22 Thread Stephen Colebourne
Henri Yandell wrote: On Thu, Nov 19, 2009 at 9:24 AM, Paul Benedict wrote: On Thu, Nov 19, 2009 at 1:39 AM, Henri Yandell wrote: Your argument being that the JDK and others do NPE when null? i.e. NPE = IAE(null)? Yes. Some things to note: * The JDK does this as their pattern * JDK 7 definit

Re: Commons Lang 3: Validate

2009-11-19 Thread Henri Yandell
On Thu, Nov 19, 2009 at 9:24 AM, Paul Benedict wrote: > On Thu, Nov 19, 2009 at 1:39 AM, Henri Yandell wrote: > >> Your argument being that the JDK and others do NPE when null? i.e. NPE >> = IAE(null)? > > Yes. Some things to note: > * The JDK does this as their pattern > * JDK 7 definitely encod

Re: Commons Lang 3: Validate

2009-11-19 Thread Paul Benedict
On Thu, Nov 19, 2009 at 1:39 AM, Henri Yandell wrote: > Your argument being that the JDK and others do NPE when null? i.e. NPE > = IAE(null)? Yes. Some things to note: * The JDK does this as their pattern * JDK 7 definitely encodes this patter in their new Object.notNull() method. * Google Colle

Re: Commons Lang 3: Validate

2009-11-18 Thread Henri Yandell
On Wed, Nov 18, 2009 at 7:40 PM, Paul Benedict wrote: > On Wed, Nov 18, 2009 at 12:35 AM, Henri Yandell wrote: >> On Tue, Nov 17, 2009 at 10:04 PM, Paul Benedict wrote: >>> I would like to make the following changes. Looking for some feedback: >>> >>> * Append var-args to the method signatures t

Re: Commons Lang 3: Validate

2009-11-18 Thread Paul Benedict
On Wed, Nov 18, 2009 at 12:35 AM, Henri Yandell wrote: > On Tue, Nov 17, 2009 at 10:04 PM, Paul Benedict wrote: >> I would like to make the following changes. Looking for some feedback: >> >> * Append var-args to the method signatures to accept message format >> parameters where a message is prov

Re: Commons Lang 3: Validate

2009-11-17 Thread Henri Yandell
On Tue, Nov 17, 2009 at 10:04 PM, Paul Benedict wrote: > I would like to make the following changes. Looking for some feedback: > > * Append var-args to the method signatures to accept message format > parameters where a message is provided. This issue https://issues.apache.org/jira/browse/LANG-5

Commons Lang 3: Validate

2009-11-17 Thread Paul Benedict
I would like to make the following changes. Looking for some feedback: * Append var-args to the method signatures to accept message format parameters where a message is provided. * A flag to throw NPE rather IAE on notNull and potentially notEmpty checks Paul