You are viewing a plain text version of this content. The canonical link for it is here.
Posted to derby-commits@db.apache.org by rh...@apache.org on 2007/03/30 21:49:10 UTC
svn commit: r524252 -
/db/derby/code/trunk/java/testing/org/apache/derbyTesting/junit/SecurityManagerSetup.java
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();