jackrabbit-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From mreut...@apache.org
Subject svn commit: rev 56655 - in incubator/jackrabbit/trunk/src/java/org/apache/jackrabbit/core: . observation
Date Fri, 05 Nov 2004 09:15:59 GMT
Author: mreutegg
Date: Fri Nov  5 01:15:59 2004
New Revision: 56655

Modified:
   incubator/jackrabbit/trunk/src/java/org/apache/jackrabbit/core/SearchManager.java
   incubator/jackrabbit/trunk/src/java/org/apache/jackrabbit/core/observation/EventImpl.java
Log:
jira issue JCR-16
- fixed EventImpl to return the path of the child item associated with the event
- fixed SearchManager handling of property change events related to wrong path returned by
Event.getPath()

Modified: incubator/jackrabbit/trunk/src/java/org/apache/jackrabbit/core/SearchManager.java
==============================================================================
--- incubator/jackrabbit/trunk/src/java/org/apache/jackrabbit/core/SearchManager.java	(original)
+++ incubator/jackrabbit/trunk/src/java/org/apache/jackrabbit/core/SearchManager.java	Fri
Nov  5 01:15:59 2004
@@ -175,7 +175,7 @@
 
                     Path path = Path.create(e.getPath(),
                             session.getNamespaceResolver(),
-                            true);
+                            true).getAncestor(1);
                     if (!modified.contains(e.getParentUUID())) {
                         deleteNode(path, e.getParentUUID());
                         modified.add(e.getParentUUID());

Modified: incubator/jackrabbit/trunk/src/java/org/apache/jackrabbit/core/observation/EventImpl.java
==============================================================================
--- incubator/jackrabbit/trunk/src/java/org/apache/jackrabbit/core/observation/EventImpl.java
(original)
+++ incubator/jackrabbit/trunk/src/java/org/apache/jackrabbit/core/observation/EventImpl.java
Fri Nov  5 01:15:59 2004
@@ -17,6 +17,8 @@
 
 import org.apache.jackrabbit.core.NoPrefixDeclaredException;
 import org.apache.jackrabbit.core.SessionImpl;
+import org.apache.jackrabbit.core.Path;
+import org.apache.jackrabbit.core.MalformedPathException;
 import org.apache.log4j.Logger;
 
 import javax.jcr.RepositoryException;
@@ -78,7 +80,12 @@
      */
     public String getPath() throws RepositoryException {
         try {
-            return eventState.getParentPath().toJCRPath(session.getNamespaceResolver());
+            Path p = Path.create(eventState.getParentPath(), eventState.getChildItemQName(),
false);
+            return p.toJCRPath(session.getNamespaceResolver());
+        } catch (MalformedPathException e) {
+            String msg = "internal error: malformed path for event";
+            log.error(msg, e);
+            throw new RepositoryException(msg, e);
         } catch (NoPrefixDeclaredException e) {
             String msg = "internal error: encountered unregistered namespace in path";
             log.error(msg, e);

Mime
View raw message