db-torque-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From tfisc...@apache.org
Subject svn commit: r1501949 - /db/torque/torque4/trunk/torque-test/src/test/java/org/apache/torque/generated/peer/DefaultValuesFromDatabaseTest.java
Date Wed, 10 Jul 2013 20:04:41 GMT
Author: tfischer
Date: Wed Jul 10 20:04:41 2013
New Revision: 1501949

URL: http://svn.apache.org/r1501949
Log:
TORQUE-270: Test project fails with derby network server
This fixes the org.apache.torque.generated.peer.DefaultValuesFromDatabaseTest 

Modified:
    db/torque/torque4/trunk/torque-test/src/test/java/org/apache/torque/generated/peer/DefaultValuesFromDatabaseTest.java

Modified: db/torque/torque4/trunk/torque-test/src/test/java/org/apache/torque/generated/peer/DefaultValuesFromDatabaseTest.java
URL: http://svn.apache.org/viewvc/db/torque/torque4/trunk/torque-test/src/test/java/org/apache/torque/generated/peer/DefaultValuesFromDatabaseTest.java?rev=1501949&r1=1501948&r2=1501949&view=diff
==============================================================================
--- db/torque/torque4/trunk/torque-test/src/test/java/org/apache/torque/generated/peer/DefaultValuesFromDatabaseTest.java
(original)
+++ db/torque/torque4/trunk/torque-test/src/test/java/org/apache/torque/generated/peer/DefaultValuesFromDatabaseTest.java
Wed Jul 10 20:04:41 2013
@@ -357,7 +357,7 @@ public class DefaultValuesFromDatabaseTe
                         currentTimestampAfter));
     }
 
-    private Date doSelect(Date toSelect, Class<?> classToSelect)
+    private Date doSelect(final Date toSelect, final Class<?> classToSelect)
             throws Exception
     {
         String dateFormat;
@@ -374,7 +374,8 @@ public class DefaultValuesFromDatabaseTe
         {
             dateFormat = "''yyyyMMdd HH:mm:ss''";
         }
-        else if (defaultAdapter instanceof HsqldbAdapter)
+        else if (defaultAdapter instanceof HsqldbAdapter
+                || defaultAdapter instanceof DerbyAdapter)
         {
             if (classToSelect == java.sql.Date.class)
             {
@@ -397,7 +398,7 @@ public class DefaultValuesFromDatabaseTe
         return doSelect(dateString, classToSelect);
     }
 
-    private Date doSelect(String toSelect, Class<?> classToSelect)
+    private Date doSelect(final String toSelect, final Class<?> classToSelect)
             throws Exception
     {
         String sql;
@@ -520,12 +521,12 @@ public class DefaultValuesFromDatabaseTe
         return false;
     }
 
-    private static Date toDate(String toConvert) throws ParseException
+    private static Date toDate(final String toConvert) throws ParseException
     {
         return new SimpleDateFormat(DATE_FORMAT).parse(toConvert);
     }
 
-    private static String toString(Date toConvert)
+    private static String toString(final Date toConvert)
     {
         return new SimpleDateFormat(DATE_FORMAT).format(toConvert);
     }



---------------------------------------------------------------------
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