db-derby-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From rhille...@apache.org
Subject svn commit: r524252 - /db/derby/code/trunk/java/testing/org/apache/derbyTesting/junit/SecurityManagerSetup.java
Date Fri, 30 Mar 2007 19:49:10 GMT
Author: rhillegas
Date: Fri Mar 30 12:49:09 2007
New Revision: 524252

URL: http://svn.apache.org/viewvc?view=rev&rev=524252
Log:
DERBY-2466: Attempt to fix NPE during run of SecurityPolicyReloadingTest on some environments.

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

Modified: db/derby/code/trunk/java/testing/org/apache/derbyTesting/junit/SecurityManagerSetup.java
URL: http://svn.apache.org/viewvc/db/derby/code/trunk/java/testing/org/apache/derbyTesting/junit/SecurityManagerSetup.java?view=diff&rev=524252&r1=524251&r2=524252
==============================================================================
--- db/derby/code/trunk/java/testing/org/apache/derbyTesting/junit/SecurityManagerSetup.java
(original)
+++ db/derby/code/trunk/java/testing/org/apache/derbyTesting/junit/SecurityManagerSetup.java
Fri Mar 30 12:49:09 2007
@@ -155,9 +155,13 @@
 		if (sm != null) {
 			// SecurityManager installed, see if it has the same settings.
 
-			if (set.getProperty("java.security.policy").equals(
-					BaseTestCase.getSystemProperty("java.security.policy")))
-					return;
+			String  newPolicyProperty = set.getProperty("java.security.policy" );
+			if ( newPolicyProperty == null ) { newPolicyProperty = ""; } 
+                                                   
+			String  oldPolicyProperty = BaseTestCase.getSystemProperty("java.security.policy");
+			if ( oldPolicyProperty == null ) { oldPolicyProperty = ""; }
+
+			if ( newPolicyProperty.equals( oldPolicyProperty ) ) { return; }
 			
 			// Uninstall the current manager.
 			uninstallSecurityManager();



Mime
View raw message