[jboss-cvs] JBossAS SVN: r103662 - branches/JBPAPP_5_0/server/src/main/org/jboss/jmx/connector/invoker.

jboss-cvs-commits at lists.jboss.org jboss-cvs-commits at lists.jboss.org
Wed Apr 7 17:05:32 EDT 2010


Author: mmoyses
Date: 2010-04-07 17:05:32 -0400 (Wed, 07 Apr 2010)
New Revision: 103662

Modified:
   branches/JBPAPP_5_0/server/src/main/org/jboss/jmx/connector/invoker/AuthorizationInterceptor.java
Log:
JBPAPP-4039: fixing CCE

Modified: branches/JBPAPP_5_0/server/src/main/org/jboss/jmx/connector/invoker/AuthorizationInterceptor.java
===================================================================
--- branches/JBPAPP_5_0/server/src/main/org/jboss/jmx/connector/invoker/AuthorizationInterceptor.java	2010-04-07 21:04:52 UTC (rev 103661)
+++ branches/JBPAPP_5_0/server/src/main/org/jboss/jmx/connector/invoker/AuthorizationInterceptor.java	2010-04-07 21:05:32 UTC (rev 103662)
@@ -107,24 +107,27 @@
             if(obj != null && obj.length > 1)
             {
                ObjectName objname = (ObjectName) obj[0];
-               String opname = (String) obj[1];
-
-               try
+               if (obj[1] instanceof String)
                {
-                  checkAuthorization(caller, objname.getCanonicalName(), opname);
+	               String opname = (String) obj[1];
+	
+	               try
+	               {
+	                  checkAuthorization(caller, objname.getCanonicalName(), opname);
+	               }
+	               catch(SecurityException e)
+	               {
+	                  throw e;
+	               }
+	               catch(Exception e)
+	               {
+	                  String msg = "Failed to authorize principal=" + caller
+	                     + ",MBean=" + objname + ", Operation=" + opname;
+	                  SecurityException ex = new SecurityException(msg);
+	                  ex.initCause(e);
+	                  throw ex;
+	               }
                }
-               catch(SecurityException e)
-               {
-                  throw e;
-               }
-               catch(Exception e)
-               {
-                  String msg = "Failed to authorize principal=" + caller
-                     + ",MBean=" + objname + ", Operation=" + opname;
-                  SecurityException ex = new SecurityException(msg);
-                  ex.initCause(e);
-                  throw ex;
-               }
             }
          }
       }




More information about the jboss-cvs-commits mailing list