db-jdo-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Craig Russell (JIRA)" <j...@apache.org>
Subject [jira] Commented: (JDO-453) Create a test for illegal arguments for PersistenceManager.newInstance
Date Fri, 14 Dec 2007 18:32:43 GMT

    [ https://issues.apache.org/jira/browse/JDO-453?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel#action_12551889
] 

Craig Russell commented on JDO-453:
-----------------------------------

I didn't notice until just now that the spec is inconsistent.

In 12.6.6, 
an abstract class that is declared in the metadata as persistence-capable, in which all abstract
methods are persistent properties, or 
an interface that is declared in the metadata as persistence-capable, in which all methods
are persistent properties, or...
If the parameter does not satisfy the above requirements, JDOUserException is thrown.

But in 18.3,
Persistent properties declared in the interface are defined as those that have both a get
and a set method or both an is and a set method, named according to the JavaBeans naming conventions,
and of a type supported as a persistent type.
The implementing class will provide a suitable implementation for all property access methods
and will throw JDOUserException for all other methods of the interface.

We need to clean up one or the other. :-(



> Create a test for illegal arguments for PersistenceManager.newInstance
> ----------------------------------------------------------------------
>
>                 Key: JDO-453
>                 URL: https://issues.apache.org/jira/browse/JDO-453
>             Project: JDO
>          Issue Type: Test
>          Components: tck2, tck2-legacy
>    Affects Versions: JDO 2 final
>            Reporter: Craig Russell
>            Assignee: Michelle Caisse
>             Fix For: JDO 2 maintenance release 1
>
>         Attachments: JDO-453.patch
>
>
> New test cases are needed for illegal arguments of newInstance. 
> One strategy is to define classes in a new package along with metadata, but no mapping
(since these are error classes). A new test should try to instantiate the classes using the
newInstance method and verify that JDOUserException is thrown.
> Classes to test include:
> Abstract class with abstract method not declared as a property (missing metadata for
the method)
> Interface with method not declared as a property (missing metadata for the method)
> Concrete class with missing public no-args constructor

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.


Mime
View raw message