jackrabbit-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From ang...@apache.org
Subject svn commit: r1540762 - in /jackrabbit/trunk/jackrabbit-core/src: main/java/org/apache/jackrabbit/core/SessionMoveOperation.java test/java/org/apache/jackrabbit/core/TestAll.java
Date Mon, 11 Nov 2013 16:28:59 GMT
Author: angela
Date: Mon Nov 11 16:28:59 2013
New Revision: 1540762

URL: http://svn.apache.org/r1540762
Log:
JCR-3692 : MoveAtRootTest fails and is not included in test suite

Modified:
    jackrabbit/trunk/jackrabbit-core/src/main/java/org/apache/jackrabbit/core/SessionMoveOperation.java
    jackrabbit/trunk/jackrabbit-core/src/test/java/org/apache/jackrabbit/core/TestAll.java

Modified: jackrabbit/trunk/jackrabbit-core/src/main/java/org/apache/jackrabbit/core/SessionMoveOperation.java
URL: http://svn.apache.org/viewvc/jackrabbit/trunk/jackrabbit-core/src/main/java/org/apache/jackrabbit/core/SessionMoveOperation.java?rev=1540762&r1=1540761&r2=1540762&view=diff
==============================================================================
--- jackrabbit/trunk/jackrabbit-core/src/main/java/org/apache/jackrabbit/core/SessionMoveOperation.java
(original)
+++ jackrabbit/trunk/jackrabbit-core/src/main/java/org/apache/jackrabbit/core/SessionMoveOperation.java
Mon Nov 11 16:28:59 2013
@@ -128,12 +128,16 @@ public class SessionMoveOperation implem
             // no name collision, fall through
         }
 
+        // verify that the targetNode can be removed
+        int options = ItemValidator.CHECK_HOLD | ItemValidator.CHECK_RETENTION;
+        context.getItemValidator().checkRemove(targetNode, options, Permission.NONE);
+
         // verify for both source and destination parent nodes that
         // - they are checked-out
         // - are not protected neither by node type constraints nor by retention/hold
-        int options = ItemValidator.CHECK_CHECKED_OUT | ItemValidator.CHECK_LOCK |
+        options = ItemValidator.CHECK_CHECKED_OUT | ItemValidator.CHECK_LOCK |
         ItemValidator.CHECK_CONSTRAINTS | ItemValidator.CHECK_HOLD | ItemValidator.CHECK_RETENTION;
-        context.getItemValidator().checkRemove(srcParentNode, options, Permission.NONE);
+        context.getItemValidator().checkModify(srcParentNode, options, Permission.NONE);
         context.getItemValidator().checkModify(destParentNode, options, Permission.NONE);
 
         // check constraints

Modified: jackrabbit/trunk/jackrabbit-core/src/test/java/org/apache/jackrabbit/core/TestAll.java
URL: http://svn.apache.org/viewvc/jackrabbit/trunk/jackrabbit-core/src/test/java/org/apache/jackrabbit/core/TestAll.java?rev=1540762&r1=1540761&r2=1540762&view=diff
==============================================================================
--- jackrabbit/trunk/jackrabbit-core/src/test/java/org/apache/jackrabbit/core/TestAll.java
(original)
+++ jackrabbit/trunk/jackrabbit-core/src/test/java/org/apache/jackrabbit/core/TestAll.java
Mon Nov 11 16:28:59 2013
@@ -79,6 +79,7 @@ public class TestAll extends TestCase {
         suite.addTestSuite(ConsistencyCheck.class);
         suite.addTestSuite(RemoveAddNodeWithUUIDTest.class);
         suite.addTestSuite(ReplacePropertyWhileOthersReadTest.class);
+        suite.addTestSuite(MoveAtRootTest.class);
 
         return suite;
     }



Mime
View raw message