private void addEEOrDeclaredPermissions(ClassLoader cloader, final PermissionCollection pc, final boolean isEEPermission) {
if(!(cloader instanceof DDPermissionsLoader))
return;
final DDPermissionsLoader ddpl = (DDPermissionsLoader)cloader;
try {
AccessController.doPrivileged(
new PrivilegedExceptionAction<Object>() {
public Object run() throws SecurityException {
if (isEEPermission)
ddpl.addEEPermissions(pc);
else
ddpl.addDeclaredPermissions(pc);
return null;
}
});
} catch (PrivilegedActionException e) {