[jboss-remoting-commits] JBoss Remoting SVN: r3967 - remoting2/branches/2.x/src/main/org/jboss/remoting/transporter.

jboss-remoting-commits at lists.jboss.org jboss-remoting-commits at lists.jboss.org
Fri Apr 11 21:45:35 EDT 2008


Author: ron.sigal at jboss.com
Date: 2008-04-11 21:45:35 -0400 (Fri, 11 Apr 2008)
New Revision: 3967

Modified:
   remoting2/branches/2.x/src/main/org/jboss/remoting/transporter/TransporterHandler.java
Log:
JBREM-934: Replaced AccessController.doPrivileged() call with SecurityUtility.getMethod() call.

Modified: remoting2/branches/2.x/src/main/org/jboss/remoting/transporter/TransporterHandler.java
===================================================================
--- remoting2/branches/2.x/src/main/org/jboss/remoting/transporter/TransporterHandler.java	2008-04-12 01:45:13 UTC (rev 3966)
+++ remoting2/branches/2.x/src/main/org/jboss/remoting/transporter/TransporterHandler.java	2008-04-12 01:45:35 UTC (rev 3967)
@@ -26,6 +26,7 @@
 import org.jboss.remoting.ServerInvoker;
 import org.jboss.remoting.callback.InvokerCallbackHandler;
 import org.jboss.remoting.invocation.NameBasedInvocation;
+import org.jboss.remoting.util.SecurityUtility;
 
 import javax.management.MBeanServer;
 import java.lang.reflect.Method;
@@ -82,22 +83,7 @@
       }
 
       // use reflection to make the call
-      Method method = null;
-      try
-      {
-         method = (Method)AccessController.doPrivileged( new PrivilegedExceptionAction()
-         {
-            public Object run() throws Exception
-            {
-               return targetPOJO.getClass().getMethod(methodName, classSig);
-            }
-         });
-      }
-      catch (PrivilegedActionException e)
-      {
-         throw (Exception) e.getCause();
-      }
-      
+      Method method = SecurityUtility.getMethod(targetPOJO.getClass(), methodName, classSig);      
       Object responseObject = method.invoke(targetPOJO, params);
 
       return responseObject;




More information about the jboss-remoting-commits mailing list