[
https://issues.apache.org/jira/browse/JEXL-397?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
]
Henri Biestro updated JEXL-397:
-------------------------------
Description:
With the default restricted permissions, dynamic proxies can not be
introspected since they extend java.lang.reflect.Proxy whose package is denied.
A 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 workaround should not be necessary.
was:
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}
> 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
> Priority: Minor
> 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.
> A 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 workaround should not be necessary.
--
This message was sent by Atlassian Jira
(v8.20.10#820010)