Author: ron.sigal(a)jboss.com
Date: 2008-04-11 21:40:07 -0400 (Fri, 11 Apr 2008)
New Revision: 3960
Modified:
remoting2/branches/2.x/src/main/org/jboss/remoting/transport/servlet/ServletServerInvoker.java
Log:
JBREM-934: Replaced AccessController.doPrivileged() calls with
SecurityUtility.getAddressByName() calls.
Modified:
remoting2/branches/2.x/src/main/org/jboss/remoting/transport/servlet/ServletServerInvoker.java
===================================================================
---
remoting2/branches/2.x/src/main/org/jboss/remoting/transport/servlet/ServletServerInvoker.java 2008-04-12
01:38:26 UTC (rev 3959)
+++
remoting2/branches/2.x/src/main/org/jboss/remoting/transport/servlet/ServletServerInvoker.java 2008-04-12
01:40:07 UTC (rev 3960)
@@ -36,6 +36,7 @@
import org.jboss.remoting.transport.http.HTTPMetadataConstants;
import org.jboss.remoting.transport.web.WebServerInvoker;
import org.jboss.remoting.transport.web.WebUtil;
+import org.jboss.remoting.util.SecurityUtility;
import org.jboss.logging.Logger;
import javax.servlet.ServletException;
@@ -147,23 +148,8 @@
}
}
- final String remoteAddressString = request.getRemoteAddr();
- InetAddress remoteAddress = null;
- try
- {
- remoteAddress = (InetAddress)AccessController.doPrivileged( new
PrivilegedExceptionAction()
- {
- public Object run() throws UnknownHostException
- {
- return InetAddress.getByName(remoteAddressString);
- }
- });
- }
- catch (PrivilegedActionException e)
- {
- throw (UnknownHostException) e.getCause();
- }
-
+ String remoteAddressString = request.getRemoteAddr();
+ InetAddress remoteAddress =
SecurityUtility.getAddressByName(remoteAddressString);
Map requestPayload = invocationRequest.getRequestPayload();
if (requestPayload == null)
@@ -304,22 +290,8 @@
}
}
- final String remoteAddressString = request.getRemoteAddr();
- InetAddress remoteAddress = null;
- try
- {
- remoteAddress = (InetAddress)AccessController.doPrivileged( new
PrivilegedExceptionAction()
- {
- public Object run() throws UnknownHostException
- {
- return InetAddress.getByName(remoteAddressString);
- }
- });
- }
- catch (PrivilegedActionException e)
- {
- throw (UnknownHostException) e.getCause();
- }
+ String remoteAddressString = request.getRemoteAddr();
+ InetAddress remoteAddress =
SecurityUtility.getAddressByName(remoteAddressString);
Map requestPayload = invocationRequest.getRequestPayload();
if (requestPayload == null)
Show replies by date