db-derby-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From myrn...@apache.org
Subject svn commit: r697897 - /db/derby/code/trunk/java/client/org/apache/derby/client/am/Configuration.java
Date Mon, 22 Sep 2008 16:47:24 GMT
Author: myrnavl
Date: Mon Sep 22 09:47:23 2008
New Revision: 697897

URL: http://svn.apache.org/viewvc?rev=697897&view=rev
Log:
DERBY-3782; remove need for JVMInfo from client/am/Configuration.java

Modified:
    db/derby/code/trunk/java/client/org/apache/derby/client/am/Configuration.java

Modified: db/derby/code/trunk/java/client/org/apache/derby/client/am/Configuration.java
URL: http://svn.apache.org/viewvc/db/derby/code/trunk/java/client/org/apache/derby/client/am/Configuration.java?rev=697897&r1=697896&r2=697897&view=diff
==============================================================================
--- db/derby/code/trunk/java/client/org/apache/derby/client/am/Configuration.java (original)
+++ db/derby/code/trunk/java/client/org/apache/derby/client/am/Configuration.java Mon Sep
22 09:47:23 2008
@@ -29,7 +29,6 @@
 import org.apache.derby.iapi.services.info.ProductGenusNames;
 import org.apache.derby.iapi.services.info.ProductVersionHolder;
 import org.apache.derby.shared.common.reference.SQLState;
-import org.apache.derby.iapi.services.info.JVMInfo;
 
 public class Configuration {
 
@@ -205,10 +204,13 @@
      */
     
     public static boolean supportsJDBC40() {
-        if (JVMInfo.JDK_ID >= JVMInfo.J2SE_16) {
+        // use reflection to identify whether we support JDBC40
+        try {
+            Class.forName("java.sql.SQLXML");
             return true;
+        } catch (Exception e) {
+            return false;
         }
-        return false;
     }
 
 



Mime
View raw message