code: protected void clearLocks(CmsProject project, List<CmsResource> resources) throws CmsException {
  
          CmsObject rootCms = OpenCms.initCmsObject(m_adminCms);
          rootCms.getRequestContext().setCurrentProject(project);
          rootCms.getRequestContext().setSiteRoot("");
          for (CmsResource resource : resources) {
              CmsLock lock = rootCms.getLock(resource);
              if (lock.isUnlocked()) {
                  continue;
              }
              String currentPath = resource.getRootPath();
              while (lock.isInherited()) {
                  currentPath = CmsResource.getParentFolder(currentPath);
                  lock = rootCms.getLock(currentPath);
              }
              rootCms.changeLock(currentPath);
              rootCms.unlockResource(currentPath);
          }
      }
docs: Ensures that the resources to be released are unlocked.<p>
  
  @param project the project in which to operate
  @param resources the resources for which the locks should be removed
  
  @throws CmsException if something goes wrong