incubator-sling-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From cziege...@apache.org
Subject svn commit: r1416518 - /sling/trunk/bundles/jcr/resource/src/main/java/org/apache/sling/jcr/resource/internal/JcrResourceListener.java
Date Mon, 03 Dec 2012 13:53:50 GMT
Author: cziegeler
Date: Mon Dec  3 13:53:49 2012
New Revision: 1416518

URL: http://svn.apache.org/viewvc?rev=1416518&view=rev
Log:
SLING-2688 :  Node remove/add events should not be compacted 

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=1416518&r1=1416517&r2=1416518&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
Mon Dec  3 13:53:49 2012
@@ -194,12 +194,7 @@ public class JcrResourceListener impleme
                     this.updateChangedEvent(changedEvents, nodePath, event, propName);
 
                 } else if ( event.getType() == Event.NODE_ADDED ) {
-                    // check if this is a remove/add operation
-                    if ( removedEvents.remove(eventPath) != null ) {
-                        this.updateChangedEvent(changedEvents, eventPath, event, null);
-                    } else {
-                        addedEvents.put(eventPath, event);
-                    }
+                    addedEvents.put(eventPath, event);
 
                 } else if ( event.getType() == Event.NODE_REMOVED) {
                     // remove is the strongest operation, therefore remove all removed
@@ -215,7 +210,7 @@ public class JcrResourceListener impleme
         for (final Entry<String, Event> e : removedEvents.entrySet()) {
             // Launch an OSGi event
             sendOsgiEvent(e.getKey(), e.getValue(), SlingConstants.TOPIC_RESOURCE_REMOVED,
-                changedEvents.remove(e.getKey()));
+                null);
         }
 
         for (final Entry<String, Event> e : addedEvents.entrySet()) {
@@ -406,11 +401,6 @@ public class JcrResourceListener impleme
                                 path);
                             sendEvent = false;
                         }
-                    } else {
-                        // check if the resource is still available - if so the node was
not visible!
-                        if ( resource != null ) {
-                            sendEvent = false;
-                        }
                     }
 
                     if ( sendEvent ) {



Mime
View raw message