[ http://issues.apache.org/jira/browse/JDO-432?page=all ]
Michelle Caisse updated JDO-432:
--------------------------------
Attachment: jdo-432.patch
The attached patch supplies code for the first of a set of tests. This one
tests makePersistent() and makePersistentAll(). It creates a new package
org.apache.jdo.tck.api.persistencemanager.nullargs, a new superclass for null
argument tests PersistenceManagerNullsTest.java and a new test class
MakePersistentNullArgs.java. Please review and comment.
The RI fails on three of the five test methods by throwing an NPE rather than
doing nothing with a null pc instance or a null element of an array or
Collection of pc instances.
> Test for behaviour of null passed to detachCopy(), makePersistent(), etc
> ------------------------------------------------------------------------
>
> Key: JDO-432
> URL: http://issues.apache.org/jira/browse/JDO-432
> Project: JDO
> Issue Type: Task
> Components: tck20
> Affects Versions: JDO 2 final
> Reporter: Andy Jefferson
> Assigned To: Michelle Caisse
> Priority: Minor
> Fix For: JDO 2 maintenance release 1
>
> Attachments: jdo-432.patch
>
>
> The JDO2 spec adequately defines (section 12.6.0 "Null Management")
> behaviour when null values are passed in to the PersistenceManager methods
> makePersistent, detachCopy, etc but there doesnt seem to be a test for these
> situations currently. JPOX 1.1.2 on calling detachCopy(null) actually throws
> an NPE, which is outside of spec ... now fixed.
--
This message is automatically generated by JIRA.
-
If you think it was sent incorrectly contact one of the administrators:
http://issues.apache.org/jira/secure/Administrators.jspa
-
For more information on JIRA, see: http://www.atlassian.com/software/jira