protected BundlePermissionCollection createPermissions(PermissionInfo[] info, final AbstractBundle bundle, boolean implied) {
if (info == null)
info = new PermissionInfo[0];
if (implied) {
// create the implied AdminPermission actions for this bundle
PermissionInfo impliedInfo = new PermissionInfo(AdminPermission.class.getName(), "(id=" + bundle.getBundleId() + ")", ADMIN_IMPLIED_ACTIONS); //$NON-NLS-1$ //$NON-NLS-2$
if (Debug.DEBUG && Debug.DEBUG_SECURITY)
Debug.println("Created permission: " + impliedInfo); //$NON-NLS-1$
PermissionInfo[] impliedInfos = new PermissionInfo[info.length + 1];
System.arraycopy(info, 0, impliedInfos, 0, info.length);
impliedInfos[info.length] = impliedInfo;