You are viewing a plain text version of this content. The canonical link for it is here.
Posted to torque-dev@db.apache.org by "Thomas Fox (JIRA)" <ji...@apache.org> on 2011/05/15 22:03:47 UTC

[jira] [Resolved] (TORQUE-120) Inappropriate dependencies on Torque from TorqueInstance

     [ https://issues.apache.org/jira/browse/TORQUE-120?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Thomas Fox resolved TORQUE-120.
-------------------------------

       Resolution: Fixed
    Fix Version/s: 4.0
         Assignee: Thomas Fox

> Inappropriate dependencies on Torque from TorqueInstance
> --------------------------------------------------------
>
>                 Key: TORQUE-120
>                 URL: https://issues.apache.org/jira/browse/TORQUE-120
>             Project: Torque
>          Issue Type: Bug
>          Components: Runtime
>    Affects Versions: 3.3
>         Environment: Mac OS X Tiger (10.4.11) / PPC
>            Reporter: Moriyoshi Koizumi
>            Assignee: Thomas Fox
>             Fix For: 4.0
>
>
> 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");
>          }

--
This message is automatically generated by JIRA.
For more information on JIRA, see: http://www.atlassian.com/software/jira

---------------------------------------------------------------------
To unsubscribe, e-mail: torque-dev-unsubscribe@db.apache.org
For additional commands, e-mail: torque-dev-help@db.apache.org