directory-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From elecha...@apache.org
Subject svn commit: r961547 - /directory/apacheds/trunk/core/src/main/java/org/apache/directory/server/core/subtree/SubentryInterceptor.java
Date Thu, 08 Jul 2010 00:52:28 GMT
Author: elecharny
Date: Thu Jul  8 00:52:28 2010
New Revision: 961547

URL: http://svn.apache.org/viewvc?rev=961547&view=rev
Log:
Some more improvements : using DN.getParent() instead of computing it in code.

Modified:
    directory/apacheds/trunk/core/src/main/java/org/apache/directory/server/core/subtree/SubentryInterceptor.java

Modified: directory/apacheds/trunk/core/src/main/java/org/apache/directory/server/core/subtree/SubentryInterceptor.java
URL: http://svn.apache.org/viewvc/directory/apacheds/trunk/core/src/main/java/org/apache/directory/server/core/subtree/SubentryInterceptor.java?rev=961547&r1=961546&r2=961547&view=diff
==============================================================================
--- directory/apacheds/trunk/core/src/main/java/org/apache/directory/server/core/subtree/SubentryInterceptor.java
(original)
+++ directory/apacheds/trunk/core/src/main/java/org/apache/directory/server/core/subtree/SubentryInterceptor.java
Thu Jul  8 00:52:28 2010
@@ -787,12 +787,10 @@ public class SubentryInterceptor extends
             // @Todo To be reviewed !!!
             Subentry subentry = subentryCache.getSubentry( oldDn );
             SubtreeSpecification ss = subentry.getSubtreeSpecification();
-            DN apName = ( DN ) oldDn.clone();
-            apName.remove( apName.size() - 1 );
+            DN apName = oldDn.getParent();
             DN baseDn = ( DN ) apName.clone();
             baseDn.addAll( ss.getBase() );
-            DN newName = ( DN ) oldDn.clone();
-            newName.remove( newName.size() - 1 );
+            DN newName = oldDn.getParent();
 
             newName.add( renameContext.getNewRdn() );
             newName.normalize( schemaManager.getNormalizerMapping() );
@@ -1120,8 +1118,7 @@ public class SubentryInterceptor extends
             next.modify( modifyContext );
 
             // search for all entries selected by the old SS and remove references to subentry
-            DN apName = ( DN ) dn.clone();
-            apName.remove( apName.size() - 1 );
+            DN apName = dn.getParent();
             DN oldBaseDn = ( DN ) apName.clone();
             oldBaseDn.addAll( ssOld.getBase() );
             ExprNode filter = new PresenceNode( schemaManager.getAttributeTypeRegistry().getOidByName(



Mime
View raw message