Author: cziegeler
Date: Sun Oct 16 13:49:42 2016
New Revision: 1765155

URL: http://svn.apache.org/viewvc?rev=1765155&view=rev
Log:
SLING-6163 : Improve observation of files in JCR

Modified:
    
sling/trunk/bundles/jcr/resource/src/main/java/org/apache/sling/jcr/resource/internal/JcrResourceListener.java

Modified: 
sling/trunk/bundles/jcr/resource/src/main/java/org/apache/sling/jcr/resource/internal/JcrResourceListener.java
URL: 
http://svn.apache.org/viewvc/sling/trunk/bundles/jcr/resource/src/main/java/org/apache/sling/jcr/resource/internal/JcrResourceListener.java?rev=1765155&r1=1765154&r2=1765155&view=diff
==============================================================================
--- 
sling/trunk/bundles/jcr/resource/src/main/java/org/apache/sling/jcr/resource/internal/JcrResourceListener.java
 (original)
+++ 
sling/trunk/bundles/jcr/resource/src/main/java/org/apache/sling/jcr/resource/internal/JcrResourceListener.java
 Sun Oct 16 13:49:42 2016
@@ -160,18 +160,16 @@ public class JcrResourceListener impleme
                         changedEvents.put(rsrcPath, 
createResourceChange(event, rsrcPath, ChangeType.CHANGED));
                     }
                 } else {
-                    final String rsrcPath = (type == NODE_REMOVED ? eventPath 
: stripNtFilePath(eventPath, refreshedSession));
-
-                    if ( ctx.getExcludedPaths().matches(rsrcPath) == null ) {
+                    if ( ctx.getExcludedPaths().matches(eventPath) == null ) {
                         if ( type == NODE_ADDED ) {
                             // add is stronger than update
-                            changedEvents.remove(rsrcPath);
-                            addedEvents.put(rsrcPath, 
createResourceChange(event, rsrcPath, ChangeType.ADDED));
+                            changedEvents.remove(eventPath);
+                            addedEvents.put(eventPath, 
createResourceChange(event, eventPath, ChangeType.ADDED));
                         } else if ( type == NODE_REMOVED) {
                             // remove is stronger than add and change
-                            addedEvents.remove(rsrcPath);
-                            changedEvents.remove(rsrcPath);
-                            removedEvents.put(rsrcPath, 
createResourceChange(event, rsrcPath, ChangeType.REMOVED));
+                            addedEvents.remove(eventPath);
+                            changedEvents.remove(eventPath);
+                            removedEvents.put(eventPath, 
createResourceChange(event, eventPath, ChangeType.REMOVED));
                         }
                     }
                 }


Reply via email to