db-jdo-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Michael Bouschen <mbo.t...@spree.de>
Subject Re: Passing null to makePersistent, detachCopy, makeTransient etc
Date Wed, 04 Oct 2006 14:21:29 GMT
Hi Andy,

I would expect they return null. I found the following in the spec, 
section "12.6 Interface PersistenceManager" on page 110":

Null management
In the APIs that follow, Object[] and Collection are permitted parameter 
types. As these may contain nulls, the following rules apply.
Null arguments to APIs that take an Object parameter cause the API to 
have no effect.
Null arguments to APIs that take Object[] or Collection will cause the 
API to throw NullPointerException.

Regards Michael

> 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 ?

Michael Bouschen		Tech@Spree Engineering GmbH
mailto:mbo.tech@spree.de	http://www.tech.spree.de/
Tel.:++49/30/235 520-33		Buelowstr. 66
Fax.:++49/30/2175 2012		D-10783 Berlin

View raw message