docs: private IAuthorizationPrincipal[] getPrincipalsFromPermissions(IPermission[] permissions)
              throws AuthorizationException {
          Set principals = new HashSet();
          for (int i = 0; i < permissions.length; i++) {
              IAuthorizationPrincipal principal = getPrincipal(permissions[i]);
              principals.add(principal);
          }
          return ((IAuthorizationPrincipal[])
                  principals.toArray(new IAuthorizationPrincipal[principals.size()]));
      }