docs: protected AccessControlList getAccessControlList(Session session, final String path) throws RepositoryException {
  
          final AccessControlManager acm = session.getAccessControlManager();
          AccessControlList acl;
          try {
              // get first applicable policy (for nodes w/o a policy)
              acl = (AccessControlList) acm.getApplicablePolicies(path).nextAccessControlPolicy();
          } catch (NoSuchElementException e) {
              LOG.debug("no applicable policy found", e);
  
              // else node already has a policy, get that one
              acl = (AccessControlList) acm.getPolicies(path)[0];
          }
          return acl;
      }