jackrabbit-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From dpfis...@apache.org
Subject svn commit: r542838 - /jackrabbit/trunk/jackrabbit-jcr-commons/src/main/java/org/apache/jackrabbit/util/PathMap.java
Date Wed, 30 May 2007 15:14:20 GMT
Author: dpfister
Date: Wed May 30 08:14:19 2007
New Revision: 542838

URL: http://svn.apache.org/viewvc?view=rev&rev=542838
Log:
JCR-950: The move method doesn't remove the source node

Modified:
    jackrabbit/trunk/jackrabbit-jcr-commons/src/main/java/org/apache/jackrabbit/util/PathMap.java

Modified: jackrabbit/trunk/jackrabbit-jcr-commons/src/main/java/org/apache/jackrabbit/util/PathMap.java
URL: http://svn.apache.org/viewvc/jackrabbit/trunk/jackrabbit-jcr-commons/src/main/java/org/apache/jackrabbit/util/PathMap.java?view=diff&rev=542838&r1=542837&r2=542838
==============================================================================
--- jackrabbit/trunk/jackrabbit-jcr-commons/src/main/java/org/apache/jackrabbit/util/PathMap.java
(original)
+++ jackrabbit/trunk/jackrabbit-jcr-commons/src/main/java/org/apache/jackrabbit/util/PathMap.java
Wed May 30 08:14:19 2007
@@ -324,6 +324,12 @@
         public void remove(boolean shift) {
             if (parent != null) {
                 parent.remove(getPathElement(), shift);
+            } else {
+                // Removing the root node is not possible: if it has become
+                // invalid, remove all its children and the associated object
+                children = null;
+                childrenCount = 0;
+                obj = null;
             }
         }
 



Mime
View raw message