in src/main/java/org/apache/sling/resourcemerger/impl/MergingResourceProvider.java [168:187]
protected String getRelativePath(String path) {
if (path.startsWith(mergeRootPath)) {
path = path.substring(mergeRootPath.length());
// multiple merge root paths at beginning should not be expected
// and can cause high cpu utilization, see SLING-11776
if (path.startsWith(mergeRootPath)) {
logger.debug("Multiple merge root path {} found at beginning of path {}", mergeRootPath, path);
return null;
}
if (path.length() == 0) {
return path;
} else if (path.charAt(0) == '/') {
return path.substring(1);
}
}
return null;
}