/** * Reads the template for the given resource; returns null if the resource doesn't exist. Note * that this method is only invoked from a synchronized block, so there shouldn't be threading * issues here. */ private ComponentTemplate parseTemplate(IRequestCycle cycle, Resource resource, IComponent component) { String encoding = getTemplateEncoding(component, resource.getLocale()); char[] templateData = readTemplate(resource, encoding); if (templateData == null) return null; return constructTemplateInstance(cycle, templateData, resource, component); }
/** * Reads the template for the given resource; returns null if the resource doesn't exist. Note * that this method is only invoked from a synchronized block, so there shouldn't be threading * issues here. */ private ComponentTemplate parseTemplate(IRequestCycle cycle, Resource resource, IComponent component) { String encoding = getTemplateEncoding(component, resource.getLocale()); char[] templateData = readTemplate(resource, encoding); if (templateData == null) return null; return constructTemplateInstance(cycle, templateData, resource, component); }