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

rombert pushed a commit to annotated tag 
org.apache.sling.discovery.commons-1.0.0
in repository 
https://gitbox.apache.org/repos/asf/sling-org-apache-sling-discovery-commons.git

commit 11a225dc8e883351d831b91a9602d0cccb63e379
Author: Stefan Egli <[email protected]>
AuthorDate: Fri Oct 23 09:01:18 2015 +0000

    SLING-4603 : minor fix to previous commit : turns out the path must be 
/var/xy/idMap not /var/xy/idMap/* as that would apply to children only
    
    git-svn-id: 
https://svn.apache.org/repos/asf/sling/trunk/bundles/extensions/discovery/commons@1710148
 13f79535-47bb-0310-9956-ffa450edef68
---
 .../sling/discovery/commons/providers/spi/base/IdMapService.java     | 5 ++++-
 1 file changed, 4 insertions(+), 1 deletion(-)

diff --git 
a/src/main/java/org/apache/sling/discovery/commons/providers/spi/base/IdMapService.java
 
b/src/main/java/org/apache/sling/discovery/commons/providers/spi/base/IdMapService.java
index 1ec4583..947e587 100644
--- 
a/src/main/java/org/apache/sling/discovery/commons/providers/spi/base/IdMapService.java
+++ 
b/src/main/java/org/apache/sling/discovery/commons/providers/spi/base/IdMapService.java
@@ -134,7 +134,10 @@ public class IdMapService extends 
AbstractServiceWithBackgroundCheck implements
                 SlingConstants.TOPIC_RESOURCE_CHANGED,
                 SlingConstants.TOPIC_RESOURCE_REMOVED };
         properties.put(EventConstants.EVENT_TOPIC, topics);
-        String path = getIdMapPath().endsWith("/") ? getIdMapPath() + "*" : 
getIdMapPath() + "/*";
+        String path = getIdMapPath();
+        if (path.endsWith("/")) {
+            path = path.substring(0, path.length()-1);
+        }
         properties.put(EventConstants.EVENT_FILTER, "(&(path="+path+"))");
         eventHandlerRegistration = bundleContext.registerService(
                 EventHandler.class.getName(), this, properties);

-- 
To stop receiving notification emails like this one, please contact
"[email protected]" <[email protected]>.

Reply via email to