db-jdo-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Craig L Russell <Craig.Russ...@Sun.COM>
Subject Re: JDO TCK Conference Call Friday, Apr 27 , 9 am PDT
Date Fri, 27 Apr 2007 11:18:06 GMT

On Apr 27, 2007, at 1:23 AM, Erik Bengtson wrote:

> Quoting Andy Jefferson <andy@jpox.org>:
>
>>> Another issue: deletePersistentAll((Object[]) null) (and similars
>>> operations) behavior not specified if arg is null
>>
>> See 12.6 at the end "Null management".
>>
>
> Andy,
>
> That section refers to PM methods and only with arguments Object or  
> Object[].

The text refers to Object[ ] and Collection arguments.


> Another similar section should be added to Query api too.

I agree. The text can probably just be lifted and adapted slightly to  
achieve the same effect: Null-valued Object[ ], Collection, and Map  
arguments throw NullPointerException. The reason to throw NPE instead  
of JDOUserException is that there is a standard meaning for NPE (a  
reference type cannot be null for this method), and that there would  
be no added value wrapping in a JDO exception.

Craig
>
> query.deletePersistentAll((Object[]) null)
> etc
>
> Another non specified behavior is for Map and Collection
>
> query.deletePersistentAll((Map) null)
> pm.makePersistentAll((Collection)null)
> pm.deletePersistentAll((Collection)null)
>
> For the below methods, I don't know if this is in the spec but JPOX  
> currently
> throws JDOUserException for
>
> pm.getObjectById((Collection)null)
> pm.getObjectById((Collection)null,boolean)
>
> I have only looked at a few methods, so other methods might need  
> review too.
>
> Regards,

Craig Russell
Architect, Sun Java Enterprise System http://java.sun.com/products/jdo
408 276-5638 mailto:Craig.Russell@sun.com
P.S. A good JDO? O, Gasp!


Mime
View raw message