Null value from resource resolver
I am getting null resourcefrom the resource resolver. Here is the function I am calling, when I debugged I found path and resourseResolver is not null.
when I am at Resource resource = resourceResolver.getResource(path); I am getting resource as null. Attaching screenshot from eclipse
private Asset getDamAssets(String path, ResourceResolver resourceResolver)
throws RepositoryException {
Asset asset = null;
LOG.info("...getDamAssets at " + path);
Resource resource = resourceResolver.getResource(path);
if (resource != null) {
// Convert resource to asset, returns null if not an asset
asset = resource.adaptTo(Asset.class);
}
return asset;
}
