in src/main/java/org/apache/sling/launchpad/base/webapp/SlingServletDelegate.java [506:540]
public Iterator<String> getChildren(String path) {
// ensure leading slash
if (path.charAt(0) != '/') {
path = "/" + path;
}
@SuppressWarnings("rawtypes")
Set resources = servletContext.getResourcePaths(path); // unchecked
if (resources == null || resources.isEmpty()) {
resources = servletContext.getResourcePaths(WEB_INF + path); // unchecked
}
@SuppressWarnings("rawtypes")
Iterator resourceIterator;
if ( resources == null || resources.isEmpty() ) {
// fall back to the class path
resourceIterator = super.getChildren(path);
if(resourceIterator.hasNext()) {
return resourceIterator;
}
// fall back to WEB-INF within the class path
resourceIterator = super.getChildren(WEB_INF + path);
if(resourceIterator.hasNext()) {
return resourceIterator;
}
}
if ( resources == null ) {
return Collections.EMPTY_LIST.iterator();
}
return resources.iterator(); // unchecked
}