directory-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From elecha...@apache.org
Subject svn commit: r954942 - in /directory/apacheds/trunk: core/src/main/java/org/apache/directory/server/core/exception/ExceptionInterceptor.java xdbm-partition/src/main/java/org/apache/directory/server/xdbm/AbstractStore.java
Date Tue, 15 Jun 2010 15:58:46 GMT
Author: elecharny
Date: Tue Jun 15 15:58:46 2010
New Revision: 954942

URL: http://svn.apache.org/viewvc?rev=954942&view=rev
Log:
Removed the checks for existence in the Exception interceptor, as those checks are already
done in the backend.

Modified:
    directory/apacheds/trunk/core/src/main/java/org/apache/directory/server/core/exception/ExceptionInterceptor.java
    directory/apacheds/trunk/xdbm-partition/src/main/java/org/apache/directory/server/xdbm/AbstractStore.java

Modified: directory/apacheds/trunk/core/src/main/java/org/apache/directory/server/core/exception/ExceptionInterceptor.java
URL: http://svn.apache.org/viewvc/directory/apacheds/trunk/core/src/main/java/org/apache/directory/server/core/exception/ExceptionInterceptor.java?rev=954942&r1=954941&r2=954942&view=diff
==============================================================================
--- directory/apacheds/trunk/core/src/main/java/org/apache/directory/server/core/exception/ExceptionInterceptor.java
(original)
+++ directory/apacheds/trunk/core/src/main/java/org/apache/directory/server/core/exception/ExceptionInterceptor.java
Tue Jun 15 15:58:46 2010
@@ -409,34 +409,14 @@ public class ExceptionInterceptor extend
         throws LdapException
     {
         DN oldDn = moveAndRenameContext.getDn();
-        DN newSuperiorDn = moveAndRenameContext.getNewSuperiorDn();
 
+        // Don't allow M&R in the SSSE
         if ( oldDn.equals( subschemSubentryDn ) )
         {
             throw new LdapUnwillingToPerformException( ResultCodeEnum.UNWILLING_TO_PERFORM,
I18n.err( I18n.ERR_258,
                 subschemSubentryDn, subschemSubentryDn ) );
         }
 
-        // check if child to move exists
-        String msg = "Attempt to move to non-existant parent: ";
-        assertHasEntry( moveAndRenameContext, msg, oldDn );
-
-        // check if parent to move to exists
-        msg = "Attempt to move to non-existant parent: ";
-        assertHasEntry( moveAndRenameContext, msg, newSuperiorDn );
-
-        // check to see if target entry exists
-        DN newDn = moveAndRenameContext.getNewDn();
-
-        if ( nextInterceptor.hasEntry( new EntryOperationContext( moveAndRenameContext.getSession(),
newDn ) ) )
-        {
-            // we must calculate the resolved name using the user provided Rdn value
-            LdapEntryAlreadyExistsException e;
-            e = new LdapEntryAlreadyExistsException( I18n.err( I18n.ERR_250_ENTRY_ALREADY_EXISTS,
newDn ) );
-            //e.setResolvedName( new DN( upTarget.getName() ) );
-            throw e;
-        }
-
         // Remove the original entry from the NotAlias cache, if needed
         synchronized ( notAliasCache )
         {

Modified: directory/apacheds/trunk/xdbm-partition/src/main/java/org/apache/directory/server/xdbm/AbstractStore.java
URL: http://svn.apache.org/viewvc/directory/apacheds/trunk/xdbm-partition/src/main/java/org/apache/directory/server/xdbm/AbstractStore.java?rev=954942&r1=954941&r2=954942&view=diff
==============================================================================
--- directory/apacheds/trunk/xdbm-partition/src/main/java/org/apache/directory/server/xdbm/AbstractStore.java
(original)
+++ directory/apacheds/trunk/xdbm-partition/src/main/java/org/apache/directory/server/xdbm/AbstractStore.java
Tue Jun 15 15:58:46 2010
@@ -1203,8 +1203,7 @@ public abstract class AbstractStore<E, I
      */
     public synchronized void moveAndRename( DN oldDn, DN newSuperiorDn, RDN newRdn, Entry
modifiedEntry, boolean deleteOldRdn ) throws Exception
     {
-    	// Check that the old entry exists, that the new superior exists and
-    	// that the new DN does not exist
+    	// Check that the old entry exists
         ID oldId = getEntryId( oldDn );
         
         if ( oldId == null )
@@ -1215,6 +1214,7 @@ public abstract class AbstractStore<E, I
             throw nse;
         }
         
+        // Check that the new superior exist
         ID newSuperiorId = getEntryId( newSuperiorDn );
         
         if ( newSuperiorId == null )



Mime
View raw message