jackrabbit-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From bae...@apache.org
Subject svn commit: r1601634 - in /jackrabbit/branches/2.6: ./ jackrabbit-core/src/main/java/org/apache/jackrabbit/core/state/ChangeLog.java jackrabbit-core/src/main/java/org/apache/jackrabbit/core/state/SharedItemStateManager.java
Date Tue, 10 Jun 2014 13:41:23 GMT
Author: baedke
Date: Tue Jun 10 13:41:22 2014
New Revision: 1601634

URL: http://svn.apache.org/r1601634
Log:
JCR-3770: refine validateHierarchy check in order to avoid false-positives

Modified:
    jackrabbit/branches/2.6/   (props changed)
    jackrabbit/branches/2.6/jackrabbit-core/src/main/java/org/apache/jackrabbit/core/state/ChangeLog.java
    jackrabbit/branches/2.6/jackrabbit-core/src/main/java/org/apache/jackrabbit/core/state/SharedItemStateManager.java

Propchange: jackrabbit/branches/2.6/
------------------------------------------------------------------------------
  Merged /jackrabbit/trunk:r1587619

Modified: jackrabbit/branches/2.6/jackrabbit-core/src/main/java/org/apache/jackrabbit/core/state/ChangeLog.java
URL: http://svn.apache.org/viewvc/jackrabbit/branches/2.6/jackrabbit-core/src/main/java/org/apache/jackrabbit/core/state/ChangeLog.java?rev=1601634&r1=1601633&r2=1601634&view=diff
==============================================================================
--- jackrabbit/branches/2.6/jackrabbit-core/src/main/java/org/apache/jackrabbit/core/state/ChangeLog.java
(original)
+++ jackrabbit/branches/2.6/jackrabbit-core/src/main/java/org/apache/jackrabbit/core/state/ChangeLog.java
Tue Jun 10 13:41:22 2014
@@ -175,6 +175,17 @@ public class ChangeLog {
     }
 
     /**
+     * Return a flag indicating whether a given item state is marked as
+     * added in this log.
+     *
+     * @return <code>true</code> if item state is marked as added in this
+     *         log; <code>false</code> otherwise
+     */
+    public boolean isAdded(ItemId id) {
+        return addedStates.containsKey(id);
+    }
+
+    /**
      * Returns a flag indicating whether a given item state is marked as
      * modified in this log.
      *

Modified: jackrabbit/branches/2.6/jackrabbit-core/src/main/java/org/apache/jackrabbit/core/state/SharedItemStateManager.java
URL: http://svn.apache.org/viewvc/jackrabbit/branches/2.6/jackrabbit-core/src/main/java/org/apache/jackrabbit/core/state/SharedItemStateManager.java?rev=1601634&r1=1601633&r2=1601634&view=diff
==============================================================================
--- jackrabbit/branches/2.6/jackrabbit-core/src/main/java/org/apache/jackrabbit/core/state/SharedItemStateManager.java
(original)
+++ jackrabbit/branches/2.6/jackrabbit-core/src/main/java/org/apache/jackrabbit/core/state/SharedItemStateManager.java
Tue Jun 10 13:41:22 2014
@@ -1350,7 +1350,7 @@ public class SharedItemStateManager
                 NodeId oldParentId = overlayedState.getParentId();
 
                 // The parent should not be deleted
-                if (parentId != null && changeLog.deleted(parentId)) {
+                if (parentId != null && changeLog.deleted(parentId) && !changeLog.isAdded(parentId))
{
                     String message = "Parent of node with id " + id + " has been deleted";
                     log.error(message);
                     throw new ItemStateException(message);



Mime
View raw message