JDO 2 RI has order of overrides, properties reversed in 
getPersistenceManagerFactory(Map overrides, Map properties)
-------------------------------------------------------------------------------------------------------------------

                 Key: JDO-577
                 URL: https://issues.apache.org/jira/browse/JDO-577
             Project: JDO
          Issue Type: Bug
          Components: tck2
            Reporter: Craig Russell
            Assignee: Andy Jefferson
             Fix For: JDO 2 maintenance release 1


Looking at svn org.jpox.jdo.JDOPersistenceManagerFactory it looks like the 
signature of the getPersistenceManagerFactory(Map, Map) has the arguments 
reversed: 
   /** 
  123 * Return a new PersistenceManagerFactoryImpl with options set according 
to the given properties and 
  124 * given overrides. 
  125 * @param props Map of properties to initialise the PMF with 
  126 * @param overrides Map of properties to override the supplied props (if 
any) 
  127 * @return A PersistenceManagerFactoryImpl with options set according to 
the given Properties 
  128 */ 
  129 public synchronized static PersistenceManagerFactory 
getPersistenceManagerFactory(Map props, Map overrides) 
  130 { 
  131 

The signature should be getPersistenceManagerFactory(Map overrides, Map props) 

Usually I like to have unambiguous parameters but in this case, having both 
overrides and props being Map types, it's unavoidable. 

Here's a patch: 

- public synchronized static PersistenceManagerFactory 
getPersistenceManagerFactory(Map props, Map overrides) 
+ public synchronized static PersistenceManagerFactory 
getPersistenceManagerFactory(Map overrides, Map props) 



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

Reply via email to