Author: ron.sigal(a)jboss.com
Date: 2008-05-21 23:27:52 -0400 (Wed, 21 May 2008)
New Revision: 4209
Modified:
remoting2/branches/2.x/src/main/org/jboss/remoting/transport/coyote/CoyoteInvoker.java
Log:
JBREM-982: Checks SecurityUtility.skipAccessControl().
Modified:
remoting2/branches/2.x/src/main/org/jboss/remoting/transport/coyote/CoyoteInvoker.java
===================================================================
---
remoting2/branches/2.x/src/main/org/jboss/remoting/transport/coyote/CoyoteInvoker.java 2008-05-22
03:26:00 UTC (rev 4208)
+++
remoting2/branches/2.x/src/main/org/jboss/remoting/transport/coyote/CoyoteInvoker.java 2008-05-22
03:27:52 UTC (rev 4209)
@@ -601,16 +601,23 @@
private void populateRequestMetadata(RequestMap metadata, Request req)
{
final MimeHeaders headers = req.getMimeHeaders();
- Enumeration nameEnum
- = (Enumeration)AccessController.doPrivileged( new PrivilegedAction()
- {
- public Object run()
- {
- return headers.names();
- }}
- );
+ Enumeration nameEnum = null;
+
+ if (SecurityUtility.skipAccessControl())
+ {
+ nameEnum = headers.names();
+ }
+ else
+ {
+ nameEnum = (Enumeration)AccessController.doPrivileged( new PrivilegedAction()
+ {
+ public Object run()
+ {
+ return headers.names();
+ }}
+ );
+ }
-
while (nameEnum.hasMoreElements())
{
Object nameObj = nameEnum.nextElement();
@@ -988,13 +995,22 @@
try
{
- Method methods[] = (Method[]) AccessController.doPrivileged( new
PrivilegedAction()
+ Method[] methods = null;
+
+ if (SecurityUtility.skipAccessControl())
{
- public Object run()
+ methods = o.getClass().getMethods();
+ }
+ else
+ {
+ methods = (Method[]) AccessController.doPrivileged( new PrivilegedAction()
{
- return o.getClass().getMethods();
- }
- });
+ public Object run()
+ {
+ return o.getClass().getMethods();
+ }
+ });
+ }
Method setPropertyMethod = null;
Show replies by date