db-derby-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From kahat...@apache.org
Subject svn commit: r1363508 - in /db/derby/code/trunk/java/testing/org/apache/derbyTesting: functionTests/tests/derbynet/_Suite.java junit/Derby.java
Date Thu, 19 Jul 2012 19:52:43 GMT
Author: kahatlen
Date: Thu Jul 19 19:52:42 2012
New Revision: 1363508

URL: http://svn.apache.org/viewvc?rev=1363508&view=rev
Log:
DERBY-5864: Cannot load derbynet._Suite on some J2ME platforms

Modified:
    db/derby/code/trunk/java/testing/org/apache/derbyTesting/functionTests/tests/derbynet/_Suite.java
    db/derby/code/trunk/java/testing/org/apache/derbyTesting/junit/Derby.java

Modified: db/derby/code/trunk/java/testing/org/apache/derbyTesting/functionTests/tests/derbynet/_Suite.java
URL: http://svn.apache.org/viewvc/db/derby/code/trunk/java/testing/org/apache/derbyTesting/functionTests/tests/derbynet/_Suite.java?rev=1363508&r1=1363507&r2=1363508&view=diff
==============================================================================
--- db/derby/code/trunk/java/testing/org/apache/derbyTesting/functionTests/tests/derbynet/_Suite.java
(original)
+++ db/derby/code/trunk/java/testing/org/apache/derbyTesting/functionTests/tests/derbynet/_Suite.java
Thu Jul 19 19:52:42 2012
@@ -64,7 +64,6 @@ public class _Suite extends BaseTestCase
         suite.addTest(OutBufferedStreamTest.suite());
         suite.addTest(GetCurrentPropertiesTest.suite());
         suite.addTest(Utf8CcsidManagerTest.suite());
-        suite.addTest(Utf8CcsidManagerClientTest.suite());
 
         // Disabled due to "java.sql.SQLSyntaxErrorException: The class
         // 'org.apache.derbyTesting.functionTests.tests.derbynet.checkSecMgr'
@@ -89,6 +88,7 @@ public class _Suite extends BaseTestCase
         if (Derby.hasClient()) {
             suite.addTest(ByteArrayCombinerStreamTest.suite());
             suite.addTest(SqlExceptionTest.suite());
+            suite.addTest(Utf8CcsidManagerClientTest.suite());
         }
 
         return suite;

Modified: db/derby/code/trunk/java/testing/org/apache/derbyTesting/junit/Derby.java
URL: http://svn.apache.org/viewvc/db/derby/code/trunk/java/testing/org/apache/derbyTesting/junit/Derby.java?rev=1363508&r1=1363507&r2=1363508&view=diff
==============================================================================
--- db/derby/code/trunk/java/testing/org/apache/derbyTesting/junit/Derby.java (original)
+++ db/derby/code/trunk/java/testing/org/apache/derbyTesting/junit/Derby.java Thu Jul 19 19:52:42
2012
@@ -53,6 +53,11 @@ public class Derby {
      */
     public static boolean hasServer()
     {
+        // DERBY-5864: The network server is not supported on J2ME.
+        if (JDBC.vmSupportsJSR169()) {
+            return false;
+        }
+
         // classes folder - assume all is available.
         if (!SecurityManagerSetup.isJars)
             return true;
@@ -77,19 +82,20 @@ public class Derby {
      */
     public static boolean hasClient()
     {
-        // classes folder - assume all is available.
-        if (!SecurityManagerSetup.isJars)
-            return true;
-
         // if we attempt to check on availability of the ClientDataSource with 
         // JSR169, attempts will be made to load classes not supported in
         // that environment, such as javax.naming.Referenceable. See DERBY-2269.
-        if (!JDBC.vmSupportsJSR169()) {
-            return hasCorrectJar("/derbyclient.jar",
-                "org.apache.derby.jdbc.ClientDataSource");
-        }
-        else
+        if (JDBC.vmSupportsJSR169()) {
             return false;
+        }
+
+        // classes folder - assume all is available.
+        if (!SecurityManagerSetup.isJars) {
+            return true;
+        }
+
+        return hasCorrectJar("/derbyclient.jar",
+                "org.apache.derby.jdbc.ClientDataSource");
     }
     
     private static boolean hasCorrectJar(String jarName, String className)



Mime
View raw message