Joshua Pyle <joshua.t.pyl..mail.com> wrote:
> I passed a null value to the deleteObject call of DataContext and got
> the following.
>
> CauseCd causeCdToDelete = null;
> this.dbContext.deleteObject(causeCdToDelete);
>
> Gave me.....
>
> java.lang.NullPointerException
> at
org.objectstyle.cayenne.access.DataContext.deleteObject(DataContext.java:1008)
> at
com.ray.rms.it.esolutions.mla.Model.test.deleteCauseCdExample(test.java:206)
> at com.ray.rms.it.esolutions.mla.Model.test.main(test.java:41)
>
> Its an easy work around but I was curious if others have seen this.
> Intuitively I would think that deleteObject would just ignore a null
> value.
There's no valid use case to delete a null object.
Thus, if you're doing it, it's an error. So it throws a
NullPointerException.
-Mike
This archive was generated by hypermail 2.0.0 : Wed Jan 12 2005 - 20:29:58 EST