Buuhuu commented on a change in pull request #4:
URL: 
https://github.com/apache/sling-org-apache-sling-sitemap/pull/4#discussion_r776693197



##########
File path: src/main/java/org/apache/sling/sitemap/impl/SitemapStorage.java
##########
@@ -323,8 +325,15 @@ public String writeSitemap(@NotNull Resource sitemapRoot, 
@NotNull String name,
     public Collection<SitemapStorageInfo> getSitemaps(Resource sitemapRoot, 
Collection<String> names) {
         try (ResourceResolver resolver = 
resourceResolverFactory.getServiceResourceResolver(AUTH)) {
             Resource topLevelSitemapRoot = getTopLevelSitemapRoot(sitemapRoot);
-            Predicate<SitemapStorageInfo> filter;
+            String storagePath = rootPath + topLevelSitemapRoot.getPath();
+            Resource storageResource = resolver.getResource(storagePath);
 
+            if (storageResource == null) {
+                LOG.debug("Resource at {} does not exist.", storagePath);
+                return Collections.emptySet();

Review comment:
       Right, that was not related. Let me revert this.




-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: dev-unsubscr...@sling.apache.org

For queries about this service, please contact Infrastructure at:
us...@infra.apache.org


Reply via email to