Uploaded image for project: 'Torque'
  1. Torque
  2. TORQUE-120

Inappropriate dependencies on Torque from TorqueInstance

    XMLWordPrintableJSON

Details

    • Bug
    • Status: Closed
    • Major
    • Resolution: Fixed
    • 3.3
    • 4.0-beta1
    • Runtime
    • None
    • Mac OS X Tiger (10.4.11) / PPC

    Description

      I found a number of inappropriate invocations from org.apache.torque.TorqueInstance to static methods of org.apache.torque.Torque. I'm not sure but I suspect this bug was created during the transition from Torque to TorqueInstance.

      Index: src/java/org/apache/torque/TorqueInstance.java
      ===================================================================
      — src/java/org/apache/torque/TorqueInstance.java (revision 721316)
      +++ src/java/org/apache/torque/TorqueInstance.java (working copy)
      @@ -312,7 +312,7 @@

      // check that at least the default database has got an adapter.
      Database defaultDatabase

      • = (Database) databases.get(Torque.getDefaultDB());
        + = (Database) databases.get(getDefaultDB());
        if (defaultDatabase == null
        defaultDatabase.getAdapter() == null)
        {
        @@ -323,7 +323,7 @@
        + "."
        + Torque.DATABASE_KEY
        + "."
      • + Torque.getDefaultDB()
        + + getDefaultDB()
        + "."
        + DB.ADAPTER_KEY;
        log.error(error);
        @@ -903,7 +903,7 @@
        public Connection getConnection(String name)
        throws TorqueException
        {
      • if (!Torque.isInit())
        + if (!isInit()) { throw new TorqueException("Torque is not initialized"); }
        @@ -966,7 +966,7 @@
        String password)
        throws TorqueException
        {
        - if (!Torque.isInit())
        + if (!isInit())
        { throw new TorqueException("Torque is not initialized"); }

      Attachments

        Activity

          People

            tfischer Thomas Fox
            moriyoshi Moriyoshi Koizumi
            Votes:
            0 Vote for this issue
            Watchers:
            0 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved: