Author: ron.sigal(a)jboss.com
Date: 2008-04-11 21:21:08 -0400 (Fri, 11 Apr 2008)
New Revision: 3954
Modified:
remoting2/branches/2.x/src/main/org/jboss/remoting/transport/coyote/ssl/RemotingServerSocketFactory.java
Log:
JBREM-934: Replaced AccessController.doPrivileged() call with SecurityUtility call.
Modified:
remoting2/branches/2.x/src/main/org/jboss/remoting/transport/coyote/ssl/RemotingServerSocketFactory.java
===================================================================
---
remoting2/branches/2.x/src/main/org/jboss/remoting/transport/coyote/ssl/RemotingServerSocketFactory.java 2008-04-12
01:20:29 UTC (rev 3953)
+++
remoting2/branches/2.x/src/main/org/jboss/remoting/transport/coyote/ssl/RemotingServerSocketFactory.java 2008-04-12
01:21:08 UTC (rev 3954)
@@ -26,6 +26,7 @@
import org.jboss.logging.Logger;
import org.jboss.remoting.security.ServerSocketFactoryMBean;
import org.jboss.remoting.security.ServerSocketFactoryWrapper;
+import org.jboss.remoting.util.SecurityUtility;
import javax.management.MBeanServer;
import javax.management.MBeanServerInvocationHandler;
@@ -183,25 +184,9 @@
*
* @throws java.io.IOException;
*/
- public Socket acceptSocket(final ServerSocket serverSocket) throws IOException
+ public Socket acceptSocket(ServerSocket serverSocket) throws IOException
{
- Socket socket = null;
- try
- {
- socket = (Socket)AccessController.doPrivileged( new
PrivilegedExceptionAction()
- {
- public Object run() throws Exception
- {
- return serverSocket.accept();
- }
- });
- }
- catch (PrivilegedActionException e)
- {
- throw (IOException) e.getCause();
- }
-
- return socket;
+ return SecurityUtility.accept(serverSocket);
}
/**
Show replies by date