Author: ron.sigal(a)jboss.com
Date: 2008-03-26 01:06:06 -0400 (Wed, 26 Mar 2008)
New Revision: 3772
Modified:
remoting2/branches/2.x/src/main/org/jboss/remoting/transport/http/HTTPClientInvoker.java
Log:
JBREM-934: Put Class.getMethod() (second one) in AccessController.doPrivileged() call.
Modified:
remoting2/branches/2.x/src/main/org/jboss/remoting/transport/http/HTTPClientInvoker.java
===================================================================
---
remoting2/branches/2.x/src/main/org/jboss/remoting/transport/http/HTTPClientInvoker.java 2008-03-26
05:03:07 UTC (rev 3771)
+++
remoting2/branches/2.x/src/main/org/jboss/remoting/transport/http/HTTPClientInvoker.java 2008-03-26
05:06:06 UTC (rev 3772)
@@ -598,10 +598,23 @@
{
throw (Exception) e.getCause();
}
+ setTimeoutMethod.invoke(conn, new Object[]{new Integer(timeout)});
+ try
+ {
+ setTimeoutMethod = (Method)AccessController.doPrivileged( new
PrivilegedExceptionAction()
+ {
+ public Object run() throws Exception
+ {
+ return conn.getClass().getMethod("setReadTimeout", new
Class[]{int.class});
+ }
+ });
+ }
+ catch (PrivilegedActionException e)
+ {
+ throw (Exception) e.getCause();
+ }
setTimeoutMethod.invoke(conn, new Object[]{new Integer(timeout)});
- setTimeoutMethod = conn.getClass().getMethod("setReadTimeout", new
Class[]{int.class});
- setTimeoutMethod.invoke(conn, new Object[]{new Integer(timeout)});
return -1;
}
catch (NoSuchMethodException e)
Show replies by date