db-derby-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From rhille...@apache.org
Subject svn commit: r1464107 - in /db/derby/code/branches/10.10: ./ java/testing/org/apache/derbyTesting/functionTests/tests/jdbc4/UnsupportedVetter.java java/testing/org/apache/derbyTesting/junit/JDBC.java
Date Wed, 03 Apr 2013 17:02:19 GMT
Author: rhillegas
Date: Wed Apr  3 17:02:19 2013
New Revision: 1464107

URL: http://svn.apache.org/r1464107
Log:
DERBY-6000: Port 1464103 from trunk to 10.10 branch.

Modified:
    db/derby/code/branches/10.10/   (props changed)
    db/derby/code/branches/10.10/java/testing/org/apache/derbyTesting/functionTests/tests/jdbc4/UnsupportedVetter.java
    db/derby/code/branches/10.10/java/testing/org/apache/derbyTesting/junit/JDBC.java

Propchange: db/derby/code/branches/10.10/
------------------------------------------------------------------------------
  Merged /db/derby/code/trunk:r1464103

Modified: db/derby/code/branches/10.10/java/testing/org/apache/derbyTesting/functionTests/tests/jdbc4/UnsupportedVetter.java
URL: http://svn.apache.org/viewvc/db/derby/code/branches/10.10/java/testing/org/apache/derbyTesting/functionTests/tests/jdbc4/UnsupportedVetter.java?rev=1464107&r1=1464106&r2=1464107&view=diff
==============================================================================
--- db/derby/code/branches/10.10/java/testing/org/apache/derbyTesting/functionTests/tests/jdbc4/UnsupportedVetter.java
(original)
+++ db/derby/code/branches/10.10/java/testing/org/apache/derbyTesting/functionTests/tests/jdbc4/UnsupportedVetter.java
Wed Apr  3 17:02:19 2013
@@ -174,13 +174,13 @@ public class UnsupportedVetter	extends B
 					new MD( "getTimestamp", new Class[] { String.class, java.util.Calendar.class } ),
 					new MD( "getURL", new Class[] { int.class } ),
 					new MD( "getURL", new Class[] { String.class } ),
-						new MD( "registerOutParameter", new Class[] { String.class, int.class } ),
-						new MD( "registerOutParameter", new Class[] { String.class, int.class, int.class }
),
-						new MD( "registerOutParameter", new Class[] { String.class, int.class, String.class
} ),
-						new MD( "registerOutParameter", new Class[] { int.class, int.class, String.class }
),
-                        makeMD( "registerOutParameter", new String[] { "java.lang.String",
"java.sql.SQLType" }, true ),
-                        makeMD( "registerOutParameter", new String[] { "java.lang.String",
"java.sql.SQLType", "int" }, true ),
-                        makeMD( "registerOutParameter", new String[] { "java.lang.String",
"java.sql.SQLType", "java.lang.String" }, true ),
+                    new MD( "registerOutParameter", new Class[] { String.class, int.class
} ),
+                    new MD( "registerOutParameter", new Class[] { String.class, int.class,
int.class } ),
+                    new MD( "registerOutParameter", new Class[] { String.class, int.class,
String.class } ),
+                    new MD( "registerOutParameter", new Class[] { int.class, int.class, String.class
} ),
+                    makeMD( "registerOutParameter", new String[] { "java.lang.String", "java.sql.SQLType"
}, JDBC.vmSupportsJDBC42() ),
+                    makeMD( "registerOutParameter", new String[] { "java.lang.String", "java.sql.SQLType",
"int" }, JDBC.vmSupportsJDBC42() ),
+                    makeMD( "registerOutParameter", new String[] { "java.lang.String", "java.sql.SQLType",
"java.lang.String" }, JDBC.vmSupportsJDBC42() ),
 						new MD( "setArray", new Class[] { int.class, java.sql.Array.class } ),
 						new MD( "setAsciiStream", new Class[] { String.class, java.io.InputStream.class } ),
 						new MD( "setAsciiStream", new Class[] { String.class, java.io.InputStream.class, int.class
} ),
@@ -357,6 +357,8 @@ public class UnsupportedVetter	extends B
 	{
         getTestConfiguration().setVerbosity( true );
 
+        println( "Supports JDBC 4.2 = " + JDBC. vmSupportsJDBC42() );
+
 		HashSet<String>	vanishedMethodList = new HashSet<String>();
 		HashSet<String>	unsupportedList = new HashSet<String>();
 		HashSet<String>	notUnderstoodList = new HashSet<String>();

Modified: db/derby/code/branches/10.10/java/testing/org/apache/derbyTesting/junit/JDBC.java
URL: http://svn.apache.org/viewvc/db/derby/code/branches/10.10/java/testing/org/apache/derbyTesting/junit/JDBC.java?rev=1464107&r1=1464106&r2=1464107&view=diff
==============================================================================
--- db/derby/code/branches/10.10/java/testing/org/apache/derbyTesting/junit/JDBC.java (original)
+++ db/derby/code/branches/10.10/java/testing/org/apache/derbyTesting/junit/JDBC.java Wed
Apr  3 17:02:19 2013
@@ -139,6 +139,17 @@ public class JDBC {
         HAVE_REFERENCEABLE = ok;
     }
 
+    private static final boolean HAVE_SQLTYPE;
+    static {
+        boolean ok = false;
+        try {
+            Class.forName("java.sql.SQLType");
+            ok = true;
+        } catch (Throwable t) {
+        }
+        HAVE_SQLTYPE = ok;
+    }
+    
     /**
      * Is javax.management.MBeanServer available? Indicates whether the
      * JVM supports the Java Management Extensions (JMX).
@@ -162,6 +173,14 @@ public class JDBC {
     }
 
     /**
+     * Return true if the virtual machine environment supports JDBC 4.2 or
+     * later.
+     */
+    public static boolean vmSupportsJDBC42() {
+        return vmSupportsJDBC41() && HAVE_SQLTYPE;
+    }
+
+    /**
      * Return true if the virtual machine environment supports JDBC 4.1 or
      * later. JDBC 4.1 is a superset of JDBC 4.0 and of JSR-169.
      */



Mime
View raw message