You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@sling.apache.org by st...@apache.org on 2015/10/23 11:01:18 UTC

svn commit: r1710148 - /sling/trunk/bundles/extensions/discovery/commons/src/main/java/org/apache/sling/discovery/commons/providers/spi/base/IdMapService.java

Author: stefanegli
Date: Fri Oct 23 09:01:18 2015
New Revision: 1710148

URL: http://svn.apache.org/viewvc?rev=1710148&view=rev
Log:
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

Modified:
    sling/trunk/bundles/extensions/discovery/commons/src/main/java/org/apache/sling/discovery/commons/providers/spi/base/IdMapService.java

Modified: sling/trunk/bundles/extensions/discovery/commons/src/main/java/org/apache/sling/discovery/commons/providers/spi/base/IdMapService.java
URL: http://svn.apache.org/viewvc/sling/trunk/bundles/extensions/discovery/commons/src/main/java/org/apache/sling/discovery/commons/providers/spi/base/IdMapService.java?rev=1710148&r1=1710147&r2=1710148&view=diff
==============================================================================
--- sling/trunk/bundles/extensions/discovery/commons/src/main/java/org/apache/sling/discovery/commons/providers/spi/base/IdMapService.java (original)
+++ sling/trunk/bundles/extensions/discovery/commons/src/main/java/org/apache/sling/discovery/commons/providers/spi/base/IdMapService.java Fri Oct 23 09:01:18 2015
@@ -134,7 +134,10 @@ public class IdMapService extends Abstra
                 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);