in src/main/java/org/apache/sling/scripting/sightly/impl/utils/ScriptDependencyResolver.java [157:173]
private Resource getResource(@NotNull ResourceResolver resolver, @NotNull Resource resource) {
String path = resource.getPath();
if (path.startsWith("/")) {
return resolver.getResource(path);
} else {
for (String sp : resolver.getSearchPath()) {
String absolutePath = ResourceUtil.normalize(sp + path);
if (absolutePath != null) {
Resource resolved = resolver.getResource(absolutePath);
if (resolved != null) {
return resolved;
}
}
}
}
return null;
}