db-derby-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From kmars...@apache.org
Subject svn commit: r586049 - /db/derby/code/trunk/java/testing/org/apache/derbyTesting/functionTests/tests/jdbcapi/ParameterMappingTest.java
Date Thu, 18 Oct 2007 18:18:00 GMT
Author: kmarsden
Date: Thu Oct 18 11:18:00 2007
New Revision: 586049

URL: http://svn.apache.org/viewvc?rev=586049&view=rev
Log:
DERBY-3126 omit negative scale testing for jdk 1.4.2


Modified:
    db/derby/code/trunk/java/testing/org/apache/derbyTesting/functionTests/tests/jdbcapi/ParameterMappingTest.java

Modified: db/derby/code/trunk/java/testing/org/apache/derbyTesting/functionTests/tests/jdbcapi/ParameterMappingTest.java
URL: http://svn.apache.org/viewvc/db/derby/code/trunk/java/testing/org/apache/derbyTesting/functionTests/tests/jdbcapi/ParameterMappingTest.java?rev=586049&r1=586048&r2=586049&view=diff
==============================================================================
--- db/derby/code/trunk/java/testing/org/apache/derbyTesting/functionTests/tests/jdbcapi/ParameterMappingTest.java
(original)
+++ db/derby/code/trunk/java/testing/org/apache/derbyTesting/functionTests/tests/jdbcapi/ParameterMappingTest.java
Thu Oct 18 11:18:00 2007
@@ -386,14 +386,22 @@
         ps.setBigDecimal(3, null);
         ps.setBigDecimal(4, null);
         ps.executeUpdate();
-        
-        // Test with negative scale.
-        value = new BigDecimal(new BigInteger("2"), -3);
+
+        // Can't use negative scale on jdk1.4.2
+        if (JDBC.vmSupportsJDBC4())
+        {
+            // Test with negative scale.
+            value = new BigDecimal(new BigInteger("2"), -3);
+        }
+        else
+        {
+            value = new BigDecimal("2000");
+        }
         ps.setBigDecimal(1,value);
         ps.setBigDecimal(2,value);
         ps.setBigDecimal(3,value);
         ps.setBigDecimal(4,value);
-        ps.executeUpdate();
+        ps.executeUpdate();        
         
         value = new BigDecimal("123.45");
         // Test with setObject and scale of 2
@@ -427,8 +435,15 @@
         ps.setObject(4, value);
         ps.executeUpdate();
         
-        // Test with setObject and negative scale.
-        value = new BigDecimal(new BigInteger("2"), -3);
+        // Can't use negative scale on jdk1.4.2
+        if (JDBC.vmSupportsJDBC4())
+        {
+            // Test with setObject and negative scale.
+            value = new BigDecimal(new BigInteger("2"), -3);
+        } else
+        {
+            value = new BigDecimal("2000");
+        }
         ps.setObject(1,value);
         ps.setObject(2,value);
         ps.setObject(3,value);



Mime
View raw message