jackrabbit-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From tri...@apache.org
Subject svn commit: r612604 - /jackrabbit/trunk/jackrabbit-core/src/main/java/org/apache/jackrabbit/core/NodeImpl.java
Date Wed, 16 Jan 2008 22:48:23 GMT
Author: tripod
Date: Wed Jan 16 14:48:22 2008
New Revision: 612604

URL: http://svn.apache.org/viewvc?rev=612604&view=rev
Log:
JCR-1046 Non-versionable children of a versionable node should not be updated when a merge
fails

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

Modified: jackrabbit/trunk/jackrabbit-core/src/main/java/org/apache/jackrabbit/core/NodeImpl.java
URL: http://svn.apache.org/viewvc/jackrabbit/trunk/jackrabbit-core/src/main/java/org/apache/jackrabbit/core/NodeImpl.java?rev=612604&r1=612603&r2=612604&view=diff
==============================================================================
--- jackrabbit/trunk/jackrabbit-core/src/main/java/org/apache/jackrabbit/core/NodeImpl.java
(original)
+++ jackrabbit/trunk/jackrabbit-core/src/main/java/org/apache/jackrabbit/core/NodeImpl.java
Wed Jan 16 14:48:22 2008
@@ -3680,11 +3680,14 @@
 
         NodeImpl srcNode = doMergeTest(srcSession, failedIds, bestEffort);
         if (srcNode == null) {
-            // leave, iterate over children
+            // leave, iterate over children, but ignore non-versionable child
+            // nodes (see JCR-1046)
             NodeIterator iter = getNodes();
             while (iter.hasNext()) {
                 NodeImpl n = (NodeImpl) iter.nextNode();
-                n.internalMerge(srcSession, failedIds, bestEffort, removeExisting, replaceExisting);
+                if (n.isNodeType(NameConstants.MIX_VERSIONABLE)) {
+                    n.internalMerge(srcSession, failedIds, bestEffort, removeExisting, replaceExisting);
+                }
             }
             return;
         }



Mime
View raw message