private boolean findVersions()

in src/main/java/org/apache/sling/jcr/maintenance/internal/VersionCleanup.java [126:142]


    private boolean findVersions(final Session session, final Resource resource) throws RepositoryException {
        if (Thread.interrupted()) {
            return true;
        }
        log.debug("Finding versions under: {}", resource.getPath());
        if ("nt:versionHistory".equals(resource.getResourceType())) {
            resource.getResourceResolver().refresh();
            cleanupVersions(session, resource);
        } else {
            for (final Resource child : resource.getChildren()) {
                if (findVersions(session, child)) {
                    return true;
                }
            }
        }
        return false;
    }