db-torque-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From tfisc...@apache.org
Subject svn commit: r1176836 - in /db/torque/torque4/trunk/torque-runtime: pom.xml src/main/java/org/apache/torque/TorqueInstance.java src/main/java/org/apache/torque/adapter/DB.java src/main/java/org/apache/torque/adapter/DBFactory.java
Date Wed, 28 Sep 2011 11:59:08 GMT
Author: tfischer
Date: Wed Sep 28 11:59:08 2011
New Revision: 1176836

URL: http://svn.apache.org/viewvc?rev=1176836&view=rev
Log:
cleanup code
- removed tabs
- removed trailing spaces
- fixed imports
- removed superfluous semicolon

Modified:
    db/torque/torque4/trunk/torque-runtime/pom.xml
    db/torque/torque4/trunk/torque-runtime/src/main/java/org/apache/torque/TorqueInstance.java
    db/torque/torque4/trunk/torque-runtime/src/main/java/org/apache/torque/adapter/DB.java
    db/torque/torque4/trunk/torque-runtime/src/main/java/org/apache/torque/adapter/DBFactory.java

Modified: db/torque/torque4/trunk/torque-runtime/pom.xml
URL: http://svn.apache.org/viewvc/db/torque/torque4/trunk/torque-runtime/pom.xml?rev=1176836&r1=1176835&r2=1176836&view=diff
==============================================================================
--- db/torque/torque4/trunk/torque-runtime/pom.xml (original)
+++ db/torque/torque4/trunk/torque-runtime/pom.xml Wed Sep 28 11:59:08 2011
@@ -46,10 +46,10 @@
       <artifactId>commons-configuration</artifactId>
       <version>1.6</version>
       <exclusions>
-      	<exclusion>
-      		<artifactId>commons-beanutils</artifactId>
-      		<groupId>commons-beanutils</groupId>
-      	</exclusion>
+      <exclusion>
+        <artifactId>commons-beanutils</artifactId>
+        <groupId>commons-beanutils</groupId>
+      </exclusion>
       </exclusions>
     </dependency>
 
@@ -109,7 +109,7 @@
       <artifactId>fulcrum-yaafi</artifactId>
       <version>1.0.6</version>
       <scope>test</scope>
-    </dependency>    
+    </dependency>
     
   </dependencies>
 

Modified: db/torque/torque4/trunk/torque-runtime/src/main/java/org/apache/torque/TorqueInstance.java
URL: http://svn.apache.org/viewvc/db/torque/torque4/trunk/torque-runtime/src/main/java/org/apache/torque/TorqueInstance.java?rev=1176836&r1=1176835&r2=1176836&view=diff
==============================================================================
--- db/torque/torque4/trunk/torque-runtime/src/main/java/org/apache/torque/TorqueInstance.java
(original)
+++ db/torque/torque4/trunk/torque-runtime/src/main/java/org/apache/torque/TorqueInstance.java
Wed Sep 28 11:59:08 2011
@@ -102,7 +102,6 @@ public class TorqueInstance
      */
     private Map<String, MapBuilder> mapBuilderCache
             = Collections.synchronizedMap(new HashMap<String, MapBuilder>());
-;
 
     /**
      * Creates a new instance with default configuration.
@@ -291,24 +290,24 @@ public class TorqueInstance
 
                     if (StringUtils.equals(DB.AUTODETECT_ADAPTER, adapter))
                     {
-                    	Connection con = null;
-                    	try
-                    	{
-                    		con = database.getDataSourceFactory().getDataSource().getConnection();
-							db = DBFactory.autoDetectAdapter(con);
-						}
-                    	catch (SQLException e)
-                    	{
-                    		log.error("Could not get product information from JDBC", e);
-						}
-                    	finally
-                    	{
-                    		closeConnection(con);
-                    	}
+                        Connection con = null;
+                        try
+                        {
+                            con = database.getDataSourceFactory().getDataSource().getConnection();
+                            db = DBFactory.autoDetectAdapter(con);
+                        }
+                        catch (SQLException e)
+                        {
+                            log.error("Could not get product information from JDBC", e);
+                        }
+                        finally
+                        {
+                            closeConnection(con);
+                        }
                     }
                     else
                     {
-                    	db = DBFactory.create(adapter);
+                        db = DBFactory.create(adapter);
                     }
 
                     // Not supported, try manually defined adapter class

Modified: db/torque/torque4/trunk/torque-runtime/src/main/java/org/apache/torque/adapter/DB.java
URL: http://svn.apache.org/viewvc/db/torque/torque4/trunk/torque-runtime/src/main/java/org/apache/torque/adapter/DB.java?rev=1176836&r1=1176835&r2=1176836&view=diff
==============================================================================
--- db/torque/torque4/trunk/torque-runtime/src/main/java/org/apache/torque/adapter/DB.java
(original)
+++ db/torque/torque4/trunk/torque-runtime/src/main/java/org/apache/torque/adapter/DB.java
Wed Sep 28 11:59:08 2011
@@ -26,10 +26,7 @@ import java.util.Date;
 
 import org.apache.torque.TorqueException;
 import org.apache.torque.sql.Query;
-import org.apache.torque.util.functions.AbstractFunction;
-import org.apache.torque.util.functions.Aggregate;
 import org.apache.torque.util.functions.FunctionEnum;
-import org.apache.torque.util.functions.SQLFunction;
 
 /**
  * <code>DB</code> defines the interface for a Torque database
@@ -288,9 +285,9 @@ public interface DB extends Serializable
      * @return The SQLFunction implementation for a function of this type that
      *         will work with this type of DB. Null indicates a class was not
      *         found.
-     * @see SQLFunction
-     * @see AbstractFunction
-     * @see Aggregate
+     * @see org.apache.torque.util.functions.AbstractFunction
+     * @see org.apache.torque.util.functions.Aggregate
+     * @see org.apache.torque.util.functions.SQLFunction
      */
     Class<?> getFunctionClass(FunctionEnum function);
 }

Modified: db/torque/torque4/trunk/torque-runtime/src/main/java/org/apache/torque/adapter/DBFactory.java
URL: http://svn.apache.org/viewvc/db/torque/torque4/trunk/torque-runtime/src/main/java/org/apache/torque/adapter/DBFactory.java?rev=1176836&r1=1176835&r2=1176836&view=diff
==============================================================================
--- db/torque/torque4/trunk/torque-runtime/src/main/java/org/apache/torque/adapter/DBFactory.java
(original)
+++ db/torque/torque4/trunk/torque-runtime/src/main/java/org/apache/torque/adapter/DBFactory.java
Wed Sep 28 11:59:08 2011
@@ -42,10 +42,10 @@ import org.apache.commons.logging.LogFac
  */
 public final class DBFactory
 {
-	/** Local logger */
-	private static final Log log = LogFactory.getLog(DBFactory.class);
+    /** Local logger */
+    private static final Log log = LogFactory.getLog(DBFactory.class);
 
-	/**
+    /**
      * JDBC driver to Torque Adapter map.
      */
     private static Map<String, Class<? extends DB>> adapters
@@ -149,12 +149,12 @@ public final class DBFactory
     public static DB autoDetectAdapter(Connection con)
         throws InstantiationException, SQLException
     {
-    	DatabaseMetaData dmd = con.getMetaData();
+        DatabaseMetaData dmd = con.getMetaData();
         String dbmsName = dmd.getDatabaseProductName();
 
-    	Class<? extends DB> adapterClass = adapters.get(dbmsName);
+        Class<? extends DB> adapterClass = adapters.get(dbmsName);
 
-    	if (adapterClass == null)
+        if (adapterClass == null)
         {
             throw new InstantiationException("Could not detect adapter for database: " +
dbmsName);
         }



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


Mime
View raw message