jackrabbit-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From ang...@apache.org
Subject svn commit: r1022519 - /jackrabbit/trunk/jackrabbit-core/src/main/java/org/apache/jackrabbit/core/state/NodeStateMerger.java
Date Thu, 14 Oct 2010 13:20:08 GMT
Author: angela
Date: Thu Oct 14 13:20:07 2010
New Revision: 1022519

URL: http://svn.apache.org/viewvc?rev=1022519&view=rev
Log:
JCR-2784 :  NodeStateMerger.merge should abort if the primary type of the 2 states to be compare
are not the same

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

Modified: jackrabbit/trunk/jackrabbit-core/src/main/java/org/apache/jackrabbit/core/state/NodeStateMerger.java
URL: http://svn.apache.org/viewvc/jackrabbit/trunk/jackrabbit-core/src/main/java/org/apache/jackrabbit/core/state/NodeStateMerger.java?rev=1022519&r1=1022518&r2=1022519&view=diff
==============================================================================
--- jackrabbit/trunk/jackrabbit-core/src/main/java/org/apache/jackrabbit/core/state/NodeStateMerger.java
(original)
+++ jackrabbit/trunk/jackrabbit-core/src/main/java/org/apache/jackrabbit/core/state/NodeStateMerger.java
Thu Oct 14 13:20:07 2010
@@ -79,6 +79,12 @@ class NodeStateMerger {
                     return false;
                 }
 
+                // the primary node type
+                if (!state.getNodeTypeName().equals(overlayedState.getNodeTypeName())) {
+                    // the primary node type has changed either in 'state' or 'overlayedState'.
+                    return false;
+                }
+
                 // mixin types
                 if (!state.getMixinTypeNames().equals(overlayedState.getMixinTypeNames()))
{
                     // the mixins have been modified but by just looking at the diff we



Mime
View raw message