Author: ron.sigal(a)jboss.com
Date: 2008-04-11 21:06:08 -0400 (Fri, 11 Apr 2008)
New Revision: 3943
Modified:
remoting2/branches/2.x/src/main/org/jboss/remoting/network/NetworkRegistryQuery.java
Log:
JBREM-934: Replaced AccessController.doPrivileged() call with
SecurityUtility.isInstanceOf().
Modified:
remoting2/branches/2.x/src/main/org/jboss/remoting/network/NetworkRegistryQuery.java
===================================================================
---
remoting2/branches/2.x/src/main/org/jboss/remoting/network/NetworkRegistryQuery.java 2008-04-12
01:05:41 UTC (rev 3942)
+++
remoting2/branches/2.x/src/main/org/jboss/remoting/network/NetworkRegistryQuery.java 2008-04-12
01:06:08 UTC (rev 3943)
@@ -29,11 +29,14 @@
import javax.management.BadAttributeValueExpException;
import javax.management.BadBinaryOpValueExpException;
import javax.management.BadStringOperationException;
+import javax.management.InstanceNotFoundException;
import javax.management.InvalidApplicationException;
import javax.management.MBeanServer;
import javax.management.ObjectName;
import javax.management.QueryExp;
+import org.jboss.remoting.util.SecurityUtility;
+
/**
* NetworkRegistryQuery is a QueryExp that will filter on NetworkRegistryMBean mbeans.
*
@@ -49,15 +52,9 @@
{
try
{
- return ((Boolean)AccessController.doPrivileged( new PrivilegedExceptionAction()
- {
- public Object run() throws Exception
- {
- return new Boolean(server.isInstanceOf(objectName,
NetworkRegistryMBean.class.getName()));
- }
- })).booleanValue();
+ return SecurityUtility.isInstanceOf(server, objectName,
NetworkRegistryMBean.class.getName());
}
- catch (PrivilegedActionException e)
+ catch (InstanceNotFoundException e)
{
}
Show replies by date