jackrabbit-oak-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From mdue...@apache.org
Subject svn commit: r1412472 - /jackrabbit/oak/trunk/oak-jcr/src/main/java/org/apache/jackrabbit/oak/jcr/SessionImpl.java
Date Thu, 22 Nov 2012 09:26:59 GMT
Author: mduerig
Date: Thu Nov 22 09:26:58 2012
New Revision: 1412472

URL: http://svn.apache.org/viewvc?rev=1412472&view=rev
Log:
OAK-250 : Enforce jcr constraints for 'protected' items
- move precondition checks into perform

Modified:
    jackrabbit/oak/trunk/oak-jcr/src/main/java/org/apache/jackrabbit/oak/jcr/SessionImpl.java

Modified: jackrabbit/oak/trunk/oak-jcr/src/main/java/org/apache/jackrabbit/oak/jcr/SessionImpl.java
URL: http://svn.apache.org/viewvc/jackrabbit/oak/trunk/oak-jcr/src/main/java/org/apache/jackrabbit/oak/jcr/SessionImpl.java?rev=1412472&r1=1412471&r2=1412472&view=diff
==============================================================================
--- jackrabbit/oak/trunk/oak-jcr/src/main/java/org/apache/jackrabbit/oak/jcr/SessionImpl.java
(original)
+++ jackrabbit/oak/trunk/oak-jcr/src/main/java/org/apache/jackrabbit/oak/jcr/SessionImpl.java
Thu Nov 22 09:26:58 2012
@@ -22,6 +22,7 @@ import java.util.HashSet;
 import java.util.Locale;
 import java.util.Map;
 import java.util.Set;
+
 import javax.annotation.Nonnull;
 import javax.jcr.AccessDeniedException;
 import javax.jcr.Credentials;
@@ -255,11 +256,10 @@ public class SessionImpl extends Abstrac
     public void move(final String srcAbsPath, final String destAbsPath) throws RepositoryException
{
         ensureIsAlive();
 
-        dlg.checkProtectedNodes(Text.getRelativeParent(srcAbsPath, 1), Text.getRelativeParent(destAbsPath,
1));
-
         dlg.perform(new SessionOperation<Void>() {
             @Override
             public Void perform() throws RepositoryException {
+                dlg.checkProtectedNodes(Text.getRelativeParent(srcAbsPath, 1), Text.getRelativeParent(destAbsPath,
1));
                 String oakPath = dlg.getOakPathKeepIndexOrThrowNotFound(destAbsPath);
                 String oakName = PathUtils.getName(oakPath);
                 // handle index



Mime
View raw message