in src/main/java/org/apache/sling/maven/jspc/JspCTldLocationsCache.java [447:480]
private void processTldsInFileSystem(String startPath, ServletContext ctxt)
throws Exception {
Set dirList = ctxt.getResourcePaths(startPath);
if (dirList != null) {
for (Object aDirList : dirList) {
String path = (String) aDirList;
if (path.endsWith("/")) {
processTldsInFileSystem(path, ctxt);
}
if (!path.endsWith(".tld")) {
continue;
}
InputStream stream = ctxt.getResourceAsStream(path);
String uri;
try {
uri = getUriFromTld(path, stream);
} finally {
if (stream != null) {
try {
stream.close();
} catch (Throwable t) {
// do nothing
}
}
}
// Add implicit map entry only if its uri is not already
// present in the map
if (uri != null && mappings.get(uri) == null) {
mappings.put(uri, new String[]{path, null});
}
}
}
}