AWResource res = resourceManager.resourceNamed(name);
if (!(res instanceof AWFileResource)) {
boolean useFullUrl = requestContext.isMetaTemplateMode();
boolean isSecure = useFullUrl ? requestContext.request() != null && requestContext.request().isSecureScheme() : false;
return resourceManager.urlForResourceNamed(name, useFullUrl, isSecure, false);
}
String path = ((AWFileResource)res)._fullPath();
Assert.that(path.endsWith(name), "Resource %s resolved to file path %s, which does not end with the requested resource!", name, path);