You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@sling.apache.org by GitBox <gi...@apache.org> on 2021/12/30 10:17:18 UTC

[GitHub] [sling-org-apache-sling-sitemap] joerghoh commented on a change in pull request #4: SLING-11036: use dedicated threadpool for scheduled jobs

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



##########
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:
       This change does not look related to the topic of the PR. Can you create a dedicated Issue and PR which contains this change?




-- 
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-unsubscribe@sling.apache.org

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