Author: ron.sigal(a)jboss.com
Date: 2008-04-02 01:35:03 -0400 (Wed, 02 Apr 2008)
New Revision: 3870
Modified:
remoting2/branches/2.x/src/tests/org/jboss/test/remoting/marshall/dynamic/remote/http/HTTPMarshallerLoadingTestCase.java
Log:
JBREM-934: Put System.getProperty() call in AccessController.doPrivileged() call.
Modified:
remoting2/branches/2.x/src/tests/org/jboss/test/remoting/marshall/dynamic/remote/http/HTTPMarshallerLoadingTestCase.java
===================================================================
---
remoting2/branches/2.x/src/tests/org/jboss/test/remoting/marshall/dynamic/remote/http/HTTPMarshallerLoadingTestCase.java 2008-04-02
05:34:48 UTC (rev 3869)
+++
remoting2/branches/2.x/src/tests/org/jboss/test/remoting/marshall/dynamic/remote/http/HTTPMarshallerLoadingTestCase.java 2008-04-02
05:35:03 UTC (rev 3870)
@@ -22,6 +22,12 @@
package org.jboss.test.remoting.marshall.dynamic.remote.http;
+import java.io.IOException;
+import java.net.InetAddress;
+import java.security.AccessController;
+import java.security.PrivilegedActionException;
+import java.security.PrivilegedExceptionAction;
+
import org.apache.log4j.Level;
import org.jboss.jrunit.harness.TestDriver;
@@ -43,7 +49,22 @@
*/
protected String getExtendedServerClasspath()
{
- return System.getProperty("loader.path");
+ String path = null;
+ try
+ {
+ path = (String)AccessController.doPrivileged( new PrivilegedExceptionAction()
+ {
+ public Object run() throws IOException
+ {
+ return System.getProperty("loader.path");
+ }
+ });
+ }
+ catch (PrivilegedActionException e)
+ {
+ }
+
+ return path;
}
public void declareTestClasses()
Show replies by date