Github user dpolivaev commented on a diff in the pull request:

    https://github.com/apache/groovy/pull/532#discussion_r117188226
  
    --- Diff: src/main/org/codehaus/groovy/reflection/CachedMethod.java ---
    @@ -90,6 +92,12 @@ public CachedClass getDeclaringClass() {
     
         public final Object invoke(Object object, Object[] arguments) {
             try {
    +            AccessPermissionChecker.checkAccessPermission(cachedMethod);
    +        }
    +        catch (AccessControlException ex) {
    +            throw new InvokerInvocationException(new 
GroovyRuntimeException("Illegal access to method" + cachedMethod.getName()));
    +        }
    +        try {
                 return cachedMethod.invoke(object, arguments);
    --- End diff --
    
    I think that InvokerInvocationException is specific to call of invoke() and 
it should be not thrown  by AccessPermissionChecker directly.


---
If your project is set up for it, you can reply to this email and have your
reply appear on GitHub as well. If your project does not have this feature
enabled and wishes so, or if the feature is enabled but not working, please
contact infrastructure at infrastruct...@apache.org or file a JIRA ticket
with INFRA.
---

Reply via email to