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

Method findContextVersion

java/org/apache/catalina/mapper/Mapper.java:388–411  ·  view source on GitHub ↗
(String hostName, String contextPath, String version, boolean silent)

Source from the content-addressed store, hash-verified

386
387
388 private ContextVersion findContextVersion(String hostName, String contextPath, String version, boolean silent) {
389 MappedHost host = exactFind(hosts, hostName);
390 if (host == null || host.isAlias()) {
391 if (!silent) {
392 log.error(sm.getString("mapper.findContext.noHostOrAlias", hostName));
393 }
394 return null;
395 }
396 MappedContext context = exactFind(host.contextList.contexts, contextPath);
397 if (context == null) {
398 if (!silent) {
399 log.error(sm.getString("mapper.findContext.noContext", contextPath));
400 }
401 return null;
402 }
403 ContextVersion contextVersion = exactFind(context.versions, version);
404 if (contextVersion == null) {
405 if (!silent) {
406 log.error(sm.getString("mapper.findContext.noContextVersion", contextPath, version));
407 }
408 return null;
409 }
410 return contextVersion;
411 }
412
413
414 /**

Callers 7

pauseContextVersionMethod · 0.95
addWrapperMethod · 0.95
addWrappersMethod · 0.95
removeWrapperMethod · 0.95
addWelcomeFileMethod · 0.95
removeWelcomeFileMethod · 0.95
clearWelcomeFilesMethod · 0.95

Calls 4

exactFindMethod · 0.95
isAliasMethod · 0.95
errorMethod · 0.65
getStringMethod · 0.65

Tested by

no test coverage detected