Author: ron.sigal(a)jboss.com
Date: 2008-04-02 01:35:21 -0400 (Wed, 02 Apr 2008)
New Revision: 3871
Modified:
remoting2/branches/2.x/src/tests/org/jboss/test/remoting/marshall/dynamic/remote/socket/SocketMarshallerLoadingTestCase.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/socket/SocketMarshallerLoadingTestCase.java
===================================================================
---
remoting2/branches/2.x/src/tests/org/jboss/test/remoting/marshall/dynamic/remote/socket/SocketMarshallerLoadingTestCase.java 2008-04-02
05:35:03 UTC (rev 3870)
+++
remoting2/branches/2.x/src/tests/org/jboss/test/remoting/marshall/dynamic/remote/socket/SocketMarshallerLoadingTestCase.java 2008-04-02
05:35:21 UTC (rev 3871)
@@ -22,6 +22,11 @@
package org.jboss.test.remoting.marshall.dynamic.remote.socket;
+import java.io.IOException;
+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 +48,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