docs: public static List<CmsResource> removeRedundantResources(List<CmsResource> resources) {
  
          if ((resources == null) || (resources.isEmpty())) {
              return new ArrayList<CmsResource>();
          }
          if (resources.size() == 1) {
              // if there is only one resource in the list, there can be no redundancies
              return new ArrayList<CmsResource>(resources);
          }
          // check all resources and see if a parent folder name is contained
          List<CmsResource> result = new ArrayList<CmsResource>(resources.size());
          List<CmsResource> base = new ArrayList<CmsResource>(resources);
          Collections.sort(base);
          Iterator<CmsResource> i = base.iterator();
          while (i.hasNext()) {
              // check all folders in the list
              CmsResource resource = i.next();
              boolean valid = true;
              for (int j = (result.size() - 1); j >= 0; j--) {
                  // check if this resource is indirectly contained because a parent folder is contained
                  CmsResource check = result.get(j);
                  if ((check.isFolder() && resource.getRootPath().startsWith(check.getRootPath()))
                      || resource.getRootPath().equals(check.getRootPath())) {
                      valid = false;
                      break;
                  }
              }
              if (valid) {
                  // the parent folder is not already contained in the result
                  result.add(resource);
              }
          }
          return result;
      }