if (templateResolution != null) {
final String resourceName = templateResolution.getResourceName();
final IResourceResolver resourceResolver = templateResolution.getResourceResolver();
if (logger.isTraceEnabled()) {
logger.trace("[THYMELEAF][{}] Trying to resolve template \"{}\" as resource \"{}\" with resource resolver \"{}\"", new Object[] {TemplateEngine.threadIndex(), templateName, resourceName, resourceResolver.getName()});
}
templateInputStream =
resourceResolver.getResourceAsStream(templateProcessingParameters, resourceName);
if (templateInputStream == null) {
if (logger.isTraceEnabled()) {
logger.trace("[THYMELEAF][{}] Template \"{}\" could not be resolved as resource \"{}\" with resource resolver \"{}\"", new Object[] {TemplateEngine.threadIndex(), templateName, resourceName, resourceResolver.getName()});
}
} else {
if (logger.isDebugEnabled()) {
logger.debug("[THYMELEAF][{}] Template \"{}\" was correctly resolved as resource \"{}\" in mode {} with resource resolver \"{}\"", new Object[] {TemplateEngine.threadIndex(), templateName, resourceName, templateResolution.getTemplateMode(), resourceResolver.getName()});
}
break;
}
} else {