You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@shiro.apache.org by ka...@apache.org on 2011/02/10 21:31:20 UTC

svn commit: r1069559 - /shiro/trunk/core/src/main/java/org/apache/shiro/authz/aop/AuthorizingAnnotationMethodInterceptor.java

Author: kaosko
Date: Thu Feb 10 20:31:20 2011
New Revision: 1069559

URL: http://svn.apache.org/viewvc?rev=1069559&view=rev
Log:
REOPENED - issue SHIRO-243: when method is unauthorized, please include method info in stack trace 
https://issues.apache.org/jira/browse/SHIRO-243
- breaks unit tests in aspectj module, revert and re-evaluate the suggested solution

Modified:
    shiro/trunk/core/src/main/java/org/apache/shiro/authz/aop/AuthorizingAnnotationMethodInterceptor.java

Modified: shiro/trunk/core/src/main/java/org/apache/shiro/authz/aop/AuthorizingAnnotationMethodInterceptor.java
URL: http://svn.apache.org/viewvc/shiro/trunk/core/src/main/java/org/apache/shiro/authz/aop/AuthorizingAnnotationMethodInterceptor.java?rev=1069559&r1=1069558&r2=1069559&view=diff
==============================================================================
--- shiro/trunk/core/src/main/java/org/apache/shiro/authz/aop/AuthorizingAnnotationMethodInterceptor.java (original)
+++ shiro/trunk/core/src/main/java/org/apache/shiro/authz/aop/AuthorizingAnnotationMethodInterceptor.java Thu Feb 10 20:31:20 2011
@@ -81,11 +81,6 @@ public abstract class AuthorizingAnnotat
      * @throws AuthorizationException if the method invocation is not allowed to continue/execute.
      */
     public void assertAuthorized(MethodInvocation mi) throws AuthorizationException {
-        try {
-            ((AuthorizingAnnotationHandler)getHandler()).assertAuthorized(getAnnotation(mi));
-        }
-        catch(AuthorizationException ae) {
-            throw new AuthorizationException("Not authorized to invoke method: " + mi.getMethod(), ae);
-        }         
+        ((AuthorizingAnnotationHandler)getHandler()).assertAuthorized(getAnnotation(mi));
     }
 }