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: Passing null to makePersistent, detachCopy, makeTransient etc
Date Wed, 04 Oct 2006 16:51:15 GMT
Hi Andy,

On Oct 4, 2006, at 6:30 AM, Andy Jefferson wrote:

> Hi,
>
> Basic stuff here ;-) ... what is the expected behaviour when calling
> PM.detachCopy(null); ?
>
> is it to return a null, or throw a JDOUserException ?
> Same applies to any of the basic PM persistence methods  
> (makePersistent,
> deletePersistent, etc).
>
> Can't find an explicit statement in the spec for that, nor are  
> there any TCK
> tests. Any ideas ?

How about filing a JIRA requesting a TCK test for this? I'm shocked,  
shocked, that there is no test case. ;-)

The expected behavior, by the way, is that null is ok and for  
makePersistent and detachCopy, null is returned in the corresponding  
element of the Array or Collection. It otherwise has no effect on the  
operation.

Craig
>
> -- 
> Andy

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