[jboss-remoting-commits] JBoss Remoting SVN: r4055 - remoting2/branches/2.x/src/tests/org/jboss/ant/taskdefs.

jboss-remoting-commits at lists.jboss.org jboss-remoting-commits at lists.jboss.org
Thu Apr 24 01:40:19 EDT 2008


Author: ron.sigal at jboss.com
Date: 2008-04-24 01:40:19 -0400 (Thu, 24 Apr 2008)
New Revision: 4055

Modified:
   remoting2/branches/2.x/src/tests/org/jboss/ant/taskdefs/XMLJUnitMultipleResultFormatter.java
Log:
JBREM-934: Replaced reference to SecurityUtility with explicit AccessControl.doPrivileged() call.

Modified: remoting2/branches/2.x/src/tests/org/jboss/ant/taskdefs/XMLJUnitMultipleResultFormatter.java
===================================================================
--- remoting2/branches/2.x/src/tests/org/jboss/ant/taskdefs/XMLJUnitMultipleResultFormatter.java	2008-04-24 05:38:43 UTC (rev 4054)
+++ remoting2/branches/2.x/src/tests/org/jboss/ant/taskdefs/XMLJUnitMultipleResultFormatter.java	2008-04-24 05:40:19 UTC (rev 4055)
@@ -28,7 +28,6 @@
 
 import org.apache.tools.ant.taskdefs.optional.junit.JUnitTest;
 import org.apache.tools.ant.taskdefs.optional.junit.XMLJUnitResultFormatter;
-import org.jboss.remoting.util.SecurityUtility;
 
 /**
  * @author <a href="mailto:tom.elrod at jboss.com">Tom Elrod</a>
@@ -38,8 +37,24 @@
 
    public void startTestSuite(final JUnitTest test)
    {
-      String configuration = SecurityUtility.getSystemProperty("jboss-junit-configuration");
+//      String configuration = SecurityUtility.getSystemProperty("jboss-junit-configuration");
+      String configuration = null;
 
+      try
+      {
+         configuration = (String)AccessController.doPrivileged( new PrivilegedExceptionAction()
+         {
+            public Object run() throws Exception
+            {
+               return System.getProperty("jboss-junit-configuration");
+            }
+         });
+      }
+      catch (PrivilegedActionException e)
+      {
+         throw (RuntimeException) e.getCause();
+      }
+      
       // if sys prop is not null, empty, or contain default variable alias
       if(configuration != null && !configuration.trim().equals("") &&
          configuration.indexOf("jboss-junit-configuration") == -1)




More information about the jboss-remoting-commits mailing list