You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@sling.apache.org by cz...@apache.org on 2022/06/15 05:15:08 UTC

[sling-org-apache-sling-resourceresolver] branch feature/resource-provider-mode updated: Fix calculating observation configuration

This is an automated email from the ASF dual-hosted git repository.

cziegeler pushed a commit to branch feature/resource-provider-mode
in repository https://gitbox.apache.org/repos/asf/sling-org-apache-sling-resourceresolver.git


The following commit(s) were added to refs/heads/feature/resource-provider-mode by this push:
     new 31b8f7e  Fix calculating observation configuration
31b8f7e is described below

commit 31b8f7ec16351f41e55e69e74ea815e0c01d3330
Author: Carsten Ziegeler <cz...@apache.org>
AuthorDate: Wed Jun 15 07:15:02 2022 +0200

    Fix calculating observation configuration
---
 .../resourceresolver/impl/providers/ResourceProviderTracker.java  | 8 ++++----
 1 file changed, 4 insertions(+), 4 deletions(-)

diff --git a/src/main/java/org/apache/sling/resourceresolver/impl/providers/ResourceProviderTracker.java b/src/main/java/org/apache/sling/resourceresolver/impl/providers/ResourceProviderTracker.java
index 5a326d6..45a6371 100644
--- a/src/main/java/org/apache/sling/resourceresolver/impl/providers/ResourceProviderTracker.java
+++ b/src/main/java/org/apache/sling/resourceresolver/impl/providers/ResourceProviderTracker.java
@@ -486,12 +486,12 @@ public class ResourceProviderTracker implements ResourceProviderStorageProvider
         final Set<String> excludedPaths = new HashSet<>();
         final Path handlerPath = new Path(handler.getPath());
 
-        for(final String otherPath : handlers.keySet()) {
-            if ( handler.getInfo().getMode() == Mode.PASSTHROUGH ) {
+        for(final Map.Entry<String, List<ResourceProviderHandler>> entry : handlers.entrySet()) {
+            if ( entry.getValue().get(0).getInfo().getMode() == Mode.PASSTHROUGH ) {
                 continue;
             }
-            if ( !handler.getPath().equals(otherPath) && handlerPath.matches(otherPath) ) {
-                excludedPaths.add(otherPath);
+            if ( !handler.getPath().equals(entry.getKey()) && handlerPath.matches(entry.getKey()) ) {
+                excludedPaths.add(entry.getKey());
             }
         }