db-derby-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From d..@apache.org
Subject svn commit: r602206 - /db/derby/code/trunk/java/testing/org/apache/derbyTesting/junit/NetworkServerTestSetup.java
Date Fri, 07 Dec 2007 20:24:08 GMT
Author: djd
Date: Fri Dec  7 12:24:08 2007
New Revision: 602206

URL: http://svn.apache.org/viewvc?rev=602206&view=rev
Log:
Cleanup NetworkServerTestSetup to use utility methods when setting and reading system properties
which will ensure the code works with a security manager.

Modified:
    db/derby/code/trunk/java/testing/org/apache/derbyTesting/junit/NetworkServerTestSetup.java

Modified: db/derby/code/trunk/java/testing/org/apache/derbyTesting/junit/NetworkServerTestSetup.java
URL: http://svn.apache.org/viewvc/db/derby/code/trunk/java/testing/org/apache/derbyTesting/junit/NetworkServerTestSetup.java?rev=602206&r1=602205&r2=602206&view=diff
==============================================================================
--- db/derby/code/trunk/java/testing/org/apache/derbyTesting/junit/NetworkServerTestSetup.java
(original)
+++ db/derby/code/trunk/java/testing/org/apache/derbyTesting/junit/NetworkServerTestSetup.java
Fri Dec  7 12:24:08 2007
@@ -330,16 +330,17 @@
             // This is a hack. A NetworkServerControl constructor with
             // the needed interface to control sslMode (and possibly
             // more) would be better.
-            String oldValue = 
-                System.setProperty("derby.drda.sslMode", config.getSsl());
+            String oldValue = BaseTestCase.getSystemProperty("derby.drda.sslMode");
+            BaseTestCase.setSystemProperty("derby.drda.sslMode", config.getSsl());
             NetworkServerControl control = new NetworkServerControl
                 (InetAddress.getByName(config.getHostName()), 
                  config.getPort());
+               
             if (oldValue == null) {
-                // JDK 1.4 does not have clearProperty....
-                System.getProperties().remove("derby.drda.sslMode");
+
+                BaseTestCase.removeSystemProperty("derby.drda.sslMode");
             } else {
-                System.setProperty("derby.drda.sslMode", oldValue);
+                BaseTestCase.setSystemProperty("derby.drda.sslMode", oldValue);
             }
             return control;
         }



Mime
View raw message