Henri Biestro created JEXL-397:
----------------------------------

             Summary: Dynamic proxy should not require specific permission
                 Key: JEXL-397
                 URL: https://issues.apache.org/jira/browse/JEXL-397
             Project: Commons JEXL
          Issue Type: Bug
    Affects Versions: 3.3
            Reporter: Henri Biestro
            Assignee: Henri Biestro
             Fix For: 3.4


With the default restricted permissions, dynamic proxies can not be 
introspected since they extend java.lang.reflect.Proxy whose package is denied.

The workaround is to explicitly allow them as in:
{code:java}
JexlPermissions p = new JexlPermissions.Delegate(JexlPermissions.RESTRICTED) {
  @Override public boolean allow(Class<?> clazz) {
    return Proxy.isProxyClass(clazz) || super.allow(clazz);
  }
};
{code}



--
This message was sent by Atlassian Jira
(v8.20.10#820010)

Reply via email to