access previlage check in file,
org.apache.commons.beanutils.MappedPropertyDescriptor.java,
how to work around the java.lang.RuntimePermission accessDelaredMembers
??
/*
* Internal method to return *public* methods within a class.
*/
private static synchronized Method[] getPublicDeclaredMethods(Class clz) {
// Looking up Class.getDeclaredMethods is relatively expensive,
// so we cache the results.
final Class fclz = clz;
Method[] result = (Method[]) declaredMethodCache.get(fclz);
if (result != null) {
return result;
}
// We have to raise privilege for getDeclaredMethods
result = (Method[])
AccessController.doPrivileged(new PrivilegedAction() {
public Object run() {
return fclz.getDeclaredMethods();
}
});
.....
ref to
https://coderanch.com/t/46525/Struts/help-security-warning-Struts-configuration