docs: private Privilege[] includePrivilege( AccessControlManager acm,
                                            Privilege[] privileges,
                                            JcrPermission permission ) throws RepositoryException {
          ArrayList<Privilege> list = new ArrayList<>();
  
          for (Privilege privilege : privileges) {
              if (!privilege.getName().equalsIgnoreCase(permission.getName())) {
                  list.add(privilege);
              }
          }
  
          list.add(acm.privilegeFromName(permission.getJcrName()));
          Privilege[] res = new Privilege[list.size()];
          list.toArray(res);
          return res;
      }