Uploaded image for project: 'JDO'
  1. JDO
  2. JDO-577

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

    XMLWordPrintableJSON

Details

    Description

      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)

      Attachments

        Activity

          People

            andyj Andy Jefferson
            clr Craig L Russell
            Votes:
            0 Vote for this issue
            Watchers:
            0 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved: