jackrabbit-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From mreut...@apache.org
Subject svn commit: r587477 - /jackrabbit/trunk/jackrabbit-core/src/main/java/org/apache/jackrabbit/core/observation/EventFilter.java
Date Tue, 23 Oct 2007 12:33:08 GMT
Author: mreutegg
Date: Tue Oct 23 05:33:07 2007
New Revision: 587477

URL: http://svn.apache.org/viewvc?rev=587477&view=rev
Log:
JCR-1179: Event filtering by path not working as specified

Modified:
    jackrabbit/trunk/jackrabbit-core/src/main/java/org/apache/jackrabbit/core/observation/EventFilter.java

Modified: jackrabbit/trunk/jackrabbit-core/src/main/java/org/apache/jackrabbit/core/observation/EventFilter.java
URL: http://svn.apache.org/viewvc/jackrabbit/trunk/jackrabbit-core/src/main/java/org/apache/jackrabbit/core/observation/EventFilter.java?rev=587477&r1=587476&r2=587477&view=diff
==============================================================================
--- jackrabbit/trunk/jackrabbit-core/src/main/java/org/apache/jackrabbit/core/observation/EventFilter.java
(original)
+++ jackrabbit/trunk/jackrabbit-core/src/main/java/org/apache/jackrabbit/core/observation/EventFilter.java
Tue Oct 23 05:33:07 2007
@@ -196,22 +196,7 @@
 
         // finally check path
         try {
-            // the relevant path for the path filter depends on the event type
-            // for node events, the relevant path is the one returned by
-            // Event.getPath().
-            // for property events, the relevant path is the path of the
-            // node where the property belongs to.
-            Path eventPath;
-            if (type == Event.NODE_ADDED || type == Event.NODE_REMOVED) {
-                Path.PathElement nameElem = eventState.getChildRelPath();
-                if (nameElem.getIndex() == 0) {
-                    eventPath = Path.create(eventState.getParentPath(), nameElem.getName(),
false);
-                } else {
-                    eventPath = Path.create(eventState.getParentPath(), nameElem.getName(),
nameElem.getIndex(), false);
-                }
-            } else {
-                eventPath = eventState.getParentPath();
-            }
+            Path eventPath = eventState.getParentPath();
             boolean match = eventPath.equals(path);
             if (!match && isDeep) {
                 match = eventPath.isDescendantOf(path);



Mime
View raw message