dlr         01/08/20 20:50:50

  Modified:    src/java/org/apache/torque/adapter DBFactory.java
  Log:
  cleanup
  
  Revision  Changes    Path
  1.5       +11 -6     
jakarta-turbine-torque/src/java/org/apache/torque/adapter/DBFactory.java
  
  Index: DBFactory.java
  ===================================================================
  RCS file: 
/home/cvs/jakarta-turbine-torque/src/java/org/apache/torque/adapter/DBFactory.java,v
  retrieving revision 1.4
  retrieving revision 1.5
  diff -u -u -r1.4 -r1.5
  --- DBFactory.java    2001/08/21 03:36:01     1.4
  +++ DBFactory.java    2001/08/21 03:50:50     1.5
  @@ -60,6 +60,7 @@
   
   import org.apache.commons.collections.ExtendedProperties;
   import org.apache.commons.util.StringUtils;
  +
   import org.apache.log4j.Category;
   
   /**
  @@ -70,7 +71,8 @@
    * @author <a href="mailto:[EMAIL PROTECTED]";>Jon S. Stevens</a>
    * @author <a href="mailto:[EMAIL PROTECTED]";>Brett McLaughlin</a>
    * @author <a href="mailto:[EMAIL PROTECTED]";>Ralf Stranzenbach</a>
  - * @version $Id: DBFactory.java,v 1.4 2001/08/21 03:36:01 dlr Exp $
  + * @author <a href="mailto:[EMAIL PROTECTED]";>Daniel Rall</a>
  + * @version $Id: DBFactory.java,v 1.5 2001/08/21 03:50:50 dlr Exp $
    */
   public class DBFactory
   {
  @@ -112,6 +114,7 @@
               // spelled incorrectly.
               adapters = configuration.getVector("database.adaptor").elements();
           }
  +
           while (adapters.hasMoreElements())
           {
               String adapter = (String) adapters.nextElement();
  @@ -133,18 +136,20 @@
                   c = Class.forName(
                       "org.apache.torque.adapter." + adapter);
               }
  -            catch (ClassNotFoundException ign1)
  +            catch (ClassNotFoundException ignored)
               {
  +                // Try adapter name as the fully qualified class name.
                   try
                   {
                       c = Class.forName(adapter);
                   }
  -                catch (ClassNotFoundException ign2)
  +                catch (ClassNotFoundException e)
                   {
  -                    category.error(ign2);
  +                    category.error(e);
                   }
               }
  -            if ((c != null) && (driver != null))
  +
  +            if (c != null && driver != null)
               {
                   registerDriver(driver, c);
               }
  @@ -183,7 +188,7 @@
       public static DB create(String driver)
           throws InstantiationException
       {
  -        Class dc = (Class)drivers.get(driver);
  +        Class dc = (Class) drivers.get(driver);
   
           if (dc != null)
           {
  
  
  

---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]

Reply via email to