MCPcopy Index your code
hub / github.com/apache/tomcat / TldCache

Method TldCache

java/org/apache/jasper/compiler/TldCache.java:91–112  ·  view source on GitHub ↗

Creates a new TldCache. @param servletContext the servlet context @param uriTldResourcePathMap the pre-scanned URI to resource path mappings @param tldResourcePathTaglibXmlMap the pre-parsed TLD data

(ServletContext servletContext, Map<String,TldResourcePath> uriTldResourcePathMap,
            Map<TldResourcePath,TaglibXml> tldResourcePathTaglibXmlMap)

Source from the content-addressed store, hash-verified

89 * @param tldResourcePathTaglibXmlMap the pre-parsed TLD data
90 */
91 public TldCache(ServletContext servletContext, Map<String,TldResourcePath> uriTldResourcePathMap,
92 Map<TldResourcePath,TaglibXml> tldResourcePathTaglibXmlMap) {
93 this.servletContext = servletContext;
94 this.uriTldResourcePathMap.putAll(uriTldResourcePathMap);
95 for (Entry<TldResourcePath,TaglibXml> entry : tldResourcePathTaglibXmlMap.entrySet()) {
96 TldResourcePath tldResourcePath = entry.getKey();
97 long[] lastModified = getLastModified(tldResourcePath);
98 TaglibXmlCacheEntry cacheEntry =
99 new TaglibXmlCacheEntry(entry.getValue(), lastModified[0], lastModified[1]);
100 this.tldResourcePathTaglibXmlMap.put(tldResourcePath, cacheEntry);
101 }
102 boolean validate =
103 Boolean.parseBoolean(servletContext.getInitParameter(Constants.XML_VALIDATION_TLD_INIT_PARAM));
104 String blockExternalString = servletContext.getInitParameter(Constants.XML_BLOCK_EXTERNAL_INIT_PARAM);
105 boolean blockExternal;
106 if (blockExternalString == null) {
107 blockExternal = true;
108 } else {
109 blockExternal = Boolean.parseBoolean(blockExternalString);
110 }
111 tldParser = new TldParser(true, validate, blockExternal);
112 }
113
114
115 /**

Callers

nothing calls this directly

Calls 8

getLastModifiedMethod · 0.95
parseBooleanMethod · 0.80
getValueMethod · 0.65
putMethod · 0.65
getInitParameterMethod · 0.65
putAllMethod · 0.45
entrySetMethod · 0.45
getKeyMethod · 0.45

Tested by

no test coverage detected