in src/main/java/org/apache/sling/jcr/maintenance/internal/VersionCleanup.java [79:88]
private String getPath(final Session session, final VersionHistory versionHistory) throws RepositoryException {
String identifier = versionHistory.getVersionableIdentifier();
try {
Node versionableNode = session.getNodeByIdentifier(identifier);
return versionableNode.getPath();
} catch (ItemNotFoundException infe) {
log.debug("Unable to get versionable node by ID: {}, exception: {}", identifier, infe.getMessage());
return versionHistory.getProperty(session.getWorkspace().getName()).getString();
}
}