docs: protected Privilege[] toPrivilegeArray(Session session, final String... privileges) throws RepositoryException {
  
          final AccessControlManager acm = session.getAccessControlManager();
  
          final List<Privilege> privilegeList = new ArrayList<>();
          for (String p : privileges) {
              privilegeList.add(acm.privilegeFromName(p));
          }
          return privilegeList.toArray(new Privilege[privilegeList.size()]);
      }