Author: ron.sigal(a)jboss.com
Date: 2010-07-03 13:27:13 -0400 (Sat, 03 Jul 2010)
New Revision: 5892
Modified:
remoting2/branches/2.x/src/tests/org/jboss/test/remoting/transport/http/ssl/config/HostnameVerifierTestCase.java
Log:
JBREM-1231: Wrapped all state changing calls to InvokerRegistry in PrivilegedAction.
Modified:
remoting2/branches/2.x/src/tests/org/jboss/test/remoting/transport/http/ssl/config/HostnameVerifierTestCase.java
===================================================================
---
remoting2/branches/2.x/src/tests/org/jboss/test/remoting/transport/http/ssl/config/HostnameVerifierTestCase.java 2010-07-03
17:25:15 UTC (rev 5891)
+++
remoting2/branches/2.x/src/tests/org/jboss/test/remoting/transport/http/ssl/config/HostnameVerifierTestCase.java 2010-07-03
17:27:13 UTC (rev 5892)
@@ -37,8 +37,10 @@
import org.jboss.remoting.transport.Connector;
import org.jboss.remoting.transport.PortUtil;
import org.jboss.remoting.transport.http.ssl.HTTPSClientInvoker;
+import javax.management.MBeanServer;
-import javax.management.MBeanServer;
+import java.security.AccessController;
+import java.security.PrivilegedAction;
import java.util.ArrayList;
import java.util.HashMap;
@@ -63,9 +65,16 @@
if (connector == null)
{
// Register subclassed transport for test.
- InvokerRegistry.registerInvokerFactories(getTransport(),
- TestClientInvokerFactory.class,
- TestServerInvokerFactory.class);
+ AccessController.doPrivileged( new PrivilegedAction()
+ {
+ public Object run()
+ {
+ InvokerRegistry.registerInvokerFactories(getTransport(),
+ TestClientInvokerFactory.class,
+ TestServerInvokerFactory.class);
+ return null;
+ }
+ });
HashMap config = new HashMap();
Show replies by date