directory-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From kayyag...@apache.org
Subject svn commit: r980925 [1/2] - in /directory/apacheds/branches/apacheds-dnfactory-experiment: core-api/src/main/java/org/apache/directory/server/core/ core-api/src/main/java/org/apache/directory/server/core/interceptor/context/ core-api/src/main/java/org/...
Date Fri, 30 Jul 2010 19:05:05 GMT
Author: kayyagari
Date: Fri Jul 30 19:05:03 2010
New Revision: 980925

URL: http://svn.apache.org/viewvc?rev=980925&view=rev
Log:
o updated after making DN immutable
  the pattern followed is to keep the old assignments of DN.clone() same e.x 
  
  OLD code:
       
       XXXX XXXX;
       DN newDn = ( DN ) dn.clone();
       newDn.remove( 1, "xx=yy" );

  UPDATED code:
    
      XXXX XXXX;     
      DN newDn = dn; // this assignment was left as it is, though it makes no sense after removing clone(), this was done to make debugging easier while reading code comparing with old code
      newDn = newDn.remove( 1, "xx=yy" );


Modified:
    directory/apacheds/branches/apacheds-dnfactory-experiment/core-api/src/main/java/org/apache/directory/server/core/LdapCoreSessionConnection.java
    directory/apacheds/branches/apacheds-dnfactory-experiment/core-api/src/main/java/org/apache/directory/server/core/LdapPrincipal.java
    directory/apacheds/branches/apacheds-dnfactory-experiment/core-api/src/main/java/org/apache/directory/server/core/interceptor/context/MoveAndRenameOperationContext.java
    directory/apacheds/branches/apacheds-dnfactory-experiment/core-api/src/main/java/org/apache/directory/server/core/interceptor/context/MoveOperationContext.java
    directory/apacheds/branches/apacheds-dnfactory-experiment/core-api/src/main/java/org/apache/directory/server/core/schema/registries/synchronizers/AttributeTypeSynchronizer.java
    directory/apacheds/branches/apacheds-dnfactory-experiment/core-api/src/main/java/org/apache/directory/server/core/schema/registries/synchronizers/ComparatorSynchronizer.java
    directory/apacheds/branches/apacheds-dnfactory-experiment/core-api/src/main/java/org/apache/directory/server/core/schema/registries/synchronizers/MatchingRuleSynchronizer.java
    directory/apacheds/branches/apacheds-dnfactory-experiment/core-api/src/main/java/org/apache/directory/server/core/schema/registries/synchronizers/NormalizerSynchronizer.java
    directory/apacheds/branches/apacheds-dnfactory-experiment/core-api/src/main/java/org/apache/directory/server/core/schema/registries/synchronizers/ObjectClassSynchronizer.java
    directory/apacheds/branches/apacheds-dnfactory-experiment/core-api/src/main/java/org/apache/directory/server/core/schema/registries/synchronizers/SchemaSynchronizer.java
    directory/apacheds/branches/apacheds-dnfactory-experiment/core-api/src/main/java/org/apache/directory/server/core/schema/registries/synchronizers/SyntaxCheckerSynchronizer.java
    directory/apacheds/branches/apacheds-dnfactory-experiment/core-api/src/main/java/org/apache/directory/server/core/schema/registries/synchronizers/SyntaxSynchronizer.java
    directory/apacheds/branches/apacheds-dnfactory-experiment/core-integ/src/test/java/org/apache/directory/server/core/authz/MoveRenameAuthorizationIT.java
    directory/apacheds/branches/apacheds-dnfactory-experiment/core-integ/src/test/java/org/apache/directory/server/core/authz/SearchAuthorizationIT.java
    directory/apacheds/branches/apacheds-dnfactory-experiment/core-integ/src/test/java/org/apache/directory/server/core/exception/ExceptionServiceIT.java
    directory/apacheds/branches/apacheds-dnfactory-experiment/core-integ/src/test/java/org/apache/directory/server/core/schema/MetaAttributeTypeHandlerIT.java
    directory/apacheds/branches/apacheds-dnfactory-experiment/core-integ/src/test/java/org/apache/directory/server/core/schema/MetaComparatorHandlerIT.java
    directory/apacheds/branches/apacheds-dnfactory-experiment/core-integ/src/test/java/org/apache/directory/server/core/schema/MetaMatchingRuleHandlerIT.java
    directory/apacheds/branches/apacheds-dnfactory-experiment/core-integ/src/test/java/org/apache/directory/server/core/schema/MetaNormalizerHandlerIT.java
    directory/apacheds/branches/apacheds-dnfactory-experiment/core-integ/src/test/java/org/apache/directory/server/core/schema/MetaObjectClassHandlerIT.java
    directory/apacheds/branches/apacheds-dnfactory-experiment/core-integ/src/test/java/org/apache/directory/server/core/schema/MetaSyntaxCheckerHandlerIT.java
    directory/apacheds/branches/apacheds-dnfactory-experiment/core-integ/src/test/java/org/apache/directory/server/core/schema/MetaSyntaxHandlerIT.java
    directory/apacheds/branches/apacheds-dnfactory-experiment/core-integ/src/test/java/org/apache/directory/server/core/schema/ObjectClassCreateIT.java
    directory/apacheds/branches/apacheds-dnfactory-experiment/core-integ/src/test/java/org/apache/directory/server/core/trigger/BackupUtilitiesSP.java
    directory/apacheds/branches/apacheds-dnfactory-experiment/core-jndi/src/main/java/org/apache/directory/server/core/jndi/ServerContext.java
    directory/apacheds/branches/apacheds-dnfactory-experiment/core/src/main/java/org/apache/directory/server/core/DNFactory.java
    directory/apacheds/branches/apacheds-dnfactory-experiment/core/src/main/java/org/apache/directory/server/core/DefaultDirectoryService.java
    directory/apacheds/branches/apacheds-dnfactory-experiment/core/src/main/java/org/apache/directory/server/core/DefaultOperationManager.java
    directory/apacheds/branches/apacheds-dnfactory-experiment/core/src/main/java/org/apache/directory/server/core/authz/AciAuthorizationInterceptor.java
    directory/apacheds/branches/apacheds-dnfactory-experiment/core/src/main/java/org/apache/directory/server/core/exception/ExceptionInterceptor.java
    directory/apacheds/branches/apacheds-dnfactory-experiment/core/src/main/java/org/apache/directory/server/core/operational/OperationalAttributeInterceptor.java
    directory/apacheds/branches/apacheds-dnfactory-experiment/core/src/main/java/org/apache/directory/server/core/partition/DefaultPartitionNexus.java
    directory/apacheds/branches/apacheds-dnfactory-experiment/core/src/main/java/org/apache/directory/server/core/prefs/PreferencesUtils.java
    directory/apacheds/branches/apacheds-dnfactory-experiment/core/src/main/java/org/apache/directory/server/core/subtree/SubentryInterceptor.java
    directory/apacheds/branches/apacheds-dnfactory-experiment/core/src/main/java/org/apache/directory/server/core/subtree/SubtreeEvaluator.java
    directory/apacheds/branches/apacheds-dnfactory-experiment/core/src/main/java/org/apache/directory/server/core/trigger/ModifyDNStoredProcedureParameterInjector.java
    directory/apacheds/branches/apacheds-dnfactory-experiment/core/src/main/java/org/apache/directory/server/core/trigger/TriggerInterceptor.java
    directory/apacheds/branches/apacheds-dnfactory-experiment/jdbm-partition/src/test/java/org/apache/directory/server/core/partition/impl/btree/jdbm/JdbmStoreTest.java
    directory/apacheds/branches/apacheds-dnfactory-experiment/jdbm-partition/src/test/java/org/apache/directory/server/core/partition/impl/btree/jdbm/ServerEntrySerializerTest.java
    directory/apacheds/branches/apacheds-dnfactory-experiment/protocol-ldap/src/main/java/org/apache/directory/server/ldap/handlers/SearchHandler.java
    directory/apacheds/branches/apacheds-dnfactory-experiment/server-integ/src/test/java/org/apache/directory/server/operations/extended/DITUtilitiesSP.java
    directory/apacheds/branches/apacheds-dnfactory-experiment/xdbm-partition/src/main/java/org/apache/directory/server/xdbm/AbstractStore.java
    directory/apacheds/branches/apacheds-dnfactory-experiment/xdbm-partition/src/test/java/org/apache/directory/server/xdbm/impl/avl/AvlStoreTest.java

Modified: directory/apacheds/branches/apacheds-dnfactory-experiment/core-api/src/main/java/org/apache/directory/server/core/LdapCoreSessionConnection.java
URL: http://svn.apache.org/viewvc/directory/apacheds/branches/apacheds-dnfactory-experiment/core-api/src/main/java/org/apache/directory/server/core/LdapCoreSessionConnection.java?rev=980925&r1=980924&r2=980925&view=diff
==============================================================================
--- directory/apacheds/branches/apacheds-dnfactory-experiment/core-api/src/main/java/org/apache/directory/server/core/LdapCoreSessionConnection.java (original)
+++ directory/apacheds/branches/apacheds-dnfactory-experiment/core-api/src/main/java/org/apache/directory/server/core/LdapCoreSessionConnection.java Fri Jul 30 19:05:03 2010
@@ -174,6 +174,7 @@ public class LdapCoreSessionConnection i
         }
         catch ( Exception e )
         {
+            //e.printStackTrace();
             resp.getLdapResult().setResultCode( ResultCodeEnum.getResultCode( e ) );
         }
 
@@ -197,6 +198,7 @@ public class LdapCoreSessionConnection i
         }
         catch ( Exception e )
         {
+            //e.printStackTrace();
             resp.getLdapResult().setResultCode( ResultCodeEnum.getResultCode( e ) );
         }
 
@@ -233,6 +235,7 @@ public class LdapCoreSessionConnection i
         }
         catch ( Exception e )
         {
+            //e.printStackTrace();
             resp.getLdapResult().setResultCode( ResultCodeEnum.getResultCode( e ) );
         }
 
@@ -254,6 +257,7 @@ public class LdapCoreSessionConnection i
         }
         catch ( Exception e )
         {
+            //e.printStackTrace();
             resp.getLdapResult().setResultCode( ResultCodeEnum.getResultCode( e ) );
         }
 
@@ -275,6 +279,7 @@ public class LdapCoreSessionConnection i
         }
         catch ( Exception e )
         {
+            //e.printStackTrace();
             resp.getLdapResult().setResultCode( ResultCodeEnum.getResultCode( e ) );
         }
 
@@ -314,6 +319,7 @@ public class LdapCoreSessionConnection i
         }
         catch ( Exception e )
         {
+            //e.printStackTrace();
             resp.getLdapResult().setResultCode( ResultCodeEnum.getResultCode( e ) );
         }
 
@@ -345,6 +351,7 @@ public class LdapCoreSessionConnection i
         }
         catch ( Exception e )
         {
+            //e.printStackTrace();
             resp.getLdapResult().setResultCode( ResultCodeEnum.getResultCode( e ) );
         }
 
@@ -366,6 +373,7 @@ public class LdapCoreSessionConnection i
         }
         catch ( Exception e )
         {
+            //e.printStackTrace();
             resp.getLdapResult().setResultCode( ResultCodeEnum.getResultCode( e ) );
         }
 
@@ -460,6 +468,7 @@ public class LdapCoreSessionConnection i
         }
         catch ( Exception e )
         {
+            //e.printStackTrace();
             // do nothing
             LOG.warn( e.getMessage(), e );
         }
@@ -492,6 +501,7 @@ public class LdapCoreSessionConnection i
         }
         catch ( Exception e )
         {
+            //e.printStackTrace();
             // do nothing
             LOG.warn( e.getMessage(), e );
         }
@@ -529,6 +539,7 @@ public class LdapCoreSessionConnection i
         }
         catch ( Exception e )
         {
+            //e.printStackTrace();
             resp.getLdapResult().setResultCode( ResultCodeEnum.getResultCode( e ) );
         }
 
@@ -565,6 +576,7 @@ public class LdapCoreSessionConnection i
         }
         catch ( Exception e )
         {
+            //e.printStackTrace();
             resp.getLdapResult().setResultCode( ResultCodeEnum.getResultCode( e ) );
         }
 
@@ -595,6 +607,7 @@ public class LdapCoreSessionConnection i
         }
         catch ( Exception e )
         {
+            //e.printStackTrace();
             resp.getLdapResult().setResultCode( ResultCodeEnum.getResultCode( e ) );
         }
 
@@ -622,6 +635,7 @@ public class LdapCoreSessionConnection i
         }
         catch ( Exception e )
         {
+            //e.printStackTrace();
             resp.getLdapResult().setResultCode( ResultCodeEnum.getResultCode( e ) );
         }
 
@@ -643,6 +657,7 @@ public class LdapCoreSessionConnection i
         }
         catch ( Exception e )
         {
+            //e.printStackTrace();
             resp.getLdapResult().setResultCode( ResultCodeEnum.getResultCode( e ) );
         }
 
@@ -673,6 +688,7 @@ public class LdapCoreSessionConnection i
         }
         catch ( Exception e )
         {
+            //e.printStackTrace();
             resp.getLdapResult().setResultCode( ResultCodeEnum.getResultCode( e ) );
         }
 
@@ -694,6 +710,7 @@ public class LdapCoreSessionConnection i
         }
         catch ( Exception e )
         {
+            //e.printStackTrace();
             resp.getLdapResult().setResultCode( ResultCodeEnum.getResultCode( e ) );
         }
 
@@ -780,6 +797,7 @@ public class LdapCoreSessionConnection i
         }
         catch ( Exception e )
         {
+            //e.printStackTrace();
             resp.getLdapResult().setResultCode( ResultCodeEnum.getResultCode( e ) );
         }
 
@@ -830,6 +848,7 @@ public class LdapCoreSessionConnection i
         }
         catch ( Exception e )
         {
+            //e.printStackTrace();
             LOG.warn( e.getMessage(), e );
         }
 

Modified: directory/apacheds/branches/apacheds-dnfactory-experiment/core-api/src/main/java/org/apache/directory/server/core/LdapPrincipal.java
URL: http://svn.apache.org/viewvc/directory/apacheds/branches/apacheds-dnfactory-experiment/core-api/src/main/java/org/apache/directory/server/core/LdapPrincipal.java?rev=980925&r1=980924&r2=980925&view=diff
==============================================================================
--- directory/apacheds/branches/apacheds-dnfactory-experiment/core-api/src/main/java/org/apache/directory/server/core/LdapPrincipal.java (original)
+++ directory/apacheds/branches/apacheds-dnfactory-experiment/core-api/src/main/java/org/apache/directory/server/core/LdapPrincipal.java Fri Jul 30 19:05:03 2010
@@ -129,7 +129,7 @@ public final class LdapPrincipal impleme
      */
     public DN getDN()
     {
-        return ( DN ) dn.clone();
+        return dn;
     }
 
 

Modified: directory/apacheds/branches/apacheds-dnfactory-experiment/core-api/src/main/java/org/apache/directory/server/core/interceptor/context/MoveAndRenameOperationContext.java
URL: http://svn.apache.org/viewvc/directory/apacheds/branches/apacheds-dnfactory-experiment/core-api/src/main/java/org/apache/directory/server/core/interceptor/context/MoveAndRenameOperationContext.java?rev=980925&r1=980924&r2=980925&view=diff
==============================================================================
--- directory/apacheds/branches/apacheds-dnfactory-experiment/core-api/src/main/java/org/apache/directory/server/core/interceptor/context/MoveAndRenameOperationContext.java (original)
+++ directory/apacheds/branches/apacheds-dnfactory-experiment/core-api/src/main/java/org/apache/directory/server/core/interceptor/context/MoveAndRenameOperationContext.java Fri Jul 30 19:05:03 2010
@@ -61,7 +61,7 @@ public class MoveAndRenameOperationConte
     {
         super( session, oldDn, newRdn, delOldRdn );
         this.newSuperiorDn = newSuperiorDn;
-        newDn = ((DN)newSuperiorDn.clone()).add( newRdn );
+        newDn = newSuperiorDn.add( newRdn );
     }
 
 
@@ -85,7 +85,7 @@ public class MoveAndRenameOperationConte
             throwReferral();
         }
         
-        newDn = ((DN)newSuperiorDn.clone()).add(newRdn);
+        newDn = newSuperiorDn.add(newRdn);
         
         try
         {

Modified: directory/apacheds/branches/apacheds-dnfactory-experiment/core-api/src/main/java/org/apache/directory/server/core/interceptor/context/MoveOperationContext.java
URL: http://svn.apache.org/viewvc/directory/apacheds/branches/apacheds-dnfactory-experiment/core-api/src/main/java/org/apache/directory/server/core/interceptor/context/MoveOperationContext.java?rev=980925&r1=980924&r2=980925&view=diff
==============================================================================
--- directory/apacheds/branches/apacheds-dnfactory-experiment/core-api/src/main/java/org/apache/directory/server/core/interceptor/context/MoveOperationContext.java (original)
+++ directory/apacheds/branches/apacheds-dnfactory-experiment/core-api/src/main/java/org/apache/directory/server/core/interceptor/context/MoveOperationContext.java Fri Jul 30 19:05:03 2010
@@ -68,7 +68,7 @@ public class MoveOperationContext extend
         this.newSuperior = newSuperior;
         oldSuperior = oldDn.getParent();
         rdn = ( RDN )(oldDn.getRdn().clone());
-        newDn = ((DN)(newSuperior.clone())).add( rdn );
+        newDn = newSuperior.add( rdn );
     }
 
     
@@ -100,7 +100,7 @@ public class MoveOperationContext extend
 
         oldSuperior = modifyDnRequest.getName().getParent();
         rdn = ( RDN )(modifyDnRequest.getName().getRdn().clone());
-        newDn = ((DN)(newSuperior.clone())).add( rdn );
+        newDn = newSuperior.add( rdn );
     }
 
 

Modified: directory/apacheds/branches/apacheds-dnfactory-experiment/core-api/src/main/java/org/apache/directory/server/core/schema/registries/synchronizers/AttributeTypeSynchronizer.java
URL: http://svn.apache.org/viewvc/directory/apacheds/branches/apacheds-dnfactory-experiment/core-api/src/main/java/org/apache/directory/server/core/schema/registries/synchronizers/AttributeTypeSynchronizer.java?rev=980925&r1=980924&r2=980925&view=diff
==============================================================================
--- directory/apacheds/branches/apacheds-dnfactory-experiment/core-api/src/main/java/org/apache/directory/server/core/schema/registries/synchronizers/AttributeTypeSynchronizer.java (original)
+++ directory/apacheds/branches/apacheds-dnfactory-experiment/core-api/src/main/java/org/apache/directory/server/core/schema/registries/synchronizers/AttributeTypeSynchronizer.java Fri Jul 30 19:05:03 2010
@@ -68,8 +68,8 @@ public class AttributeTypeSynchronizer e
     public void add( Entry entry ) throws LdapException
     {
         DN dn = entry.getDn();
-        DN parentDn = ( DN ) dn.clone();
-        parentDn.remove( parentDn.size() - 1 );
+        DN parentDn = dn;
+        parentDn = parentDn.remove( parentDn.size() - 1 );
 
         // The parent DN must be ou=attributetypes,cn=<schemaName>,ou=schema
         checkParent( parentDn, schemaManager, SchemaConstants.ATTRIBUTE_TYPE );
@@ -144,8 +144,8 @@ public class AttributeTypeSynchronizer e
     public void delete( Entry entry, boolean cascade ) throws LdapException
     {
         DN dn = entry.getDn();
-        DN parentDn = ( DN ) dn.clone();
-        parentDn.remove( parentDn.size() - 1 );
+        DN parentDn = dn;
+        parentDn = parentDn.remove( parentDn.size() - 1 );
 
         // The parent DN must be ou=attributetypes,cn=<schemaName>,ou=schema
         checkParent( parentDn, schemaManager, SchemaConstants.ATTRIBUTE_TYPE );
@@ -207,8 +207,8 @@ public class AttributeTypeSynchronizer e
 
         // Inject the new DN
         DN newDn = new DN( targetEntry.getDn() );
-        newDn.remove( newDn.size() - 1 );
-        newDn.add( newRdn );
+        newDn = newDn.remove( newDn.size() - 1 );
+        newDn = newDn.add( newRdn );
         targetEntry.setDn( newDn );
 
         AttributeType at = factory.getAttributeType( schemaManager, targetEntry, schemaManager.getRegistries(),

Modified: directory/apacheds/branches/apacheds-dnfactory-experiment/core-api/src/main/java/org/apache/directory/server/core/schema/registries/synchronizers/ComparatorSynchronizer.java
URL: http://svn.apache.org/viewvc/directory/apacheds/branches/apacheds-dnfactory-experiment/core-api/src/main/java/org/apache/directory/server/core/schema/registries/synchronizers/ComparatorSynchronizer.java?rev=980925&r1=980924&r2=980925&view=diff
==============================================================================
--- directory/apacheds/branches/apacheds-dnfactory-experiment/core-api/src/main/java/org/apache/directory/server/core/schema/registries/synchronizers/ComparatorSynchronizer.java (original)
+++ directory/apacheds/branches/apacheds-dnfactory-experiment/core-api/src/main/java/org/apache/directory/server/core/schema/registries/synchronizers/ComparatorSynchronizer.java Fri Jul 30 19:05:03 2010
@@ -100,8 +100,8 @@ public class ComparatorSynchronizer exte
     public void add( Entry entry ) throws LdapException
     {
         DN dn = entry.getDn();
-        DN parentDn = ( DN ) dn.clone();
-        parentDn.remove( parentDn.size() - 1 );
+        DN parentDn = dn;
+        parentDn = parentDn.remove( parentDn.size() - 1 );
 
         // The parent DN must be ou=comparators,cn=<schemaName>,ou=schema
         checkParent( parentDn, schemaManager, SchemaConstants.COMPARATOR );
@@ -148,8 +148,8 @@ public class ComparatorSynchronizer exte
     public void delete( Entry entry, boolean cascade ) throws LdapException
     {
         DN dn = entry.getDn();
-        DN parentDn = ( DN ) dn.clone();
-        parentDn.remove( parentDn.size() - 1 );
+        DN parentDn = dn;
+        parentDn = parentDn.remove( parentDn.size() - 1 );
 
         // The parent DN must be ou=comparators,cn=<schemaName>,ou=schema
         checkParent( parentDn, schemaManager, SchemaConstants.COMPARATOR );
@@ -248,8 +248,8 @@ public class ComparatorSynchronizer exte
 
             // Inject the new DN
             DN newDn = new DN( targetEntry.getDn() );
-            newDn.remove( newDn.size() - 1 );
-            newDn.add( newRdn );
+            newDn = newDn.remove( newDn.size() - 1 );
+            newDn = newDn.add( newRdn );
             targetEntry.setDn( newDn );
 
             // Register the new comparator, and unregister the old one

Modified: directory/apacheds/branches/apacheds-dnfactory-experiment/core-api/src/main/java/org/apache/directory/server/core/schema/registries/synchronizers/MatchingRuleSynchronizer.java
URL: http://svn.apache.org/viewvc/directory/apacheds/branches/apacheds-dnfactory-experiment/core-api/src/main/java/org/apache/directory/server/core/schema/registries/synchronizers/MatchingRuleSynchronizer.java?rev=980925&r1=980924&r2=980925&view=diff
==============================================================================
--- directory/apacheds/branches/apacheds-dnfactory-experiment/core-api/src/main/java/org/apache/directory/server/core/schema/registries/synchronizers/MatchingRuleSynchronizer.java (original)
+++ directory/apacheds/branches/apacheds-dnfactory-experiment/core-api/src/main/java/org/apache/directory/server/core/schema/registries/synchronizers/MatchingRuleSynchronizer.java Fri Jul 30 19:05:03 2010
@@ -97,8 +97,8 @@ public class MatchingRuleSynchronizer ex
     public void add( Entry entry ) throws LdapException
     {
         DN dn = entry.getDn();
-        DN parentDn = ( DN ) dn.clone();
-        parentDn.remove( parentDn.size() - 1 );
+        DN parentDn = dn;
+        parentDn = parentDn.remove( parentDn.size() - 1 );
 
         // The parent DN must be ou=matchingrules,cn=<schemaName>,ou=schema
         checkParent( parentDn, schemaManager, SchemaConstants.MATCHING_RULE );
@@ -145,8 +145,8 @@ public class MatchingRuleSynchronizer ex
     public void delete( Entry entry, boolean cascade ) throws LdapException
     {
         DN dn = entry.getDn();
-        DN parentDn = ( DN ) dn.clone();
-        parentDn.remove( parentDn.size() - 1 );
+        DN parentDn = dn;
+        parentDn = parentDn.remove( parentDn.size() - 1 );
 
         // The parent DN must be ou=matchingrules,cn=<schemaName>,ou=schema
         checkParent( parentDn, schemaManager, SchemaConstants.MATCHING_RULE );

Modified: directory/apacheds/branches/apacheds-dnfactory-experiment/core-api/src/main/java/org/apache/directory/server/core/schema/registries/synchronizers/NormalizerSynchronizer.java
URL: http://svn.apache.org/viewvc/directory/apacheds/branches/apacheds-dnfactory-experiment/core-api/src/main/java/org/apache/directory/server/core/schema/registries/synchronizers/NormalizerSynchronizer.java?rev=980925&r1=980924&r2=980925&view=diff
==============================================================================
--- directory/apacheds/branches/apacheds-dnfactory-experiment/core-api/src/main/java/org/apache/directory/server/core/schema/registries/synchronizers/NormalizerSynchronizer.java (original)
+++ directory/apacheds/branches/apacheds-dnfactory-experiment/core-api/src/main/java/org/apache/directory/server/core/schema/registries/synchronizers/NormalizerSynchronizer.java Fri Jul 30 19:05:03 2010
@@ -99,8 +99,8 @@ public class NormalizerSynchronizer exte
     public void add( Entry entry ) throws LdapException
     {
         DN dn = entry.getDn();
-        DN parentDn = ( DN ) dn.clone();
-        parentDn.remove( parentDn.size() - 1 );
+        DN parentDn = dn;
+        parentDn = parentDn.remove( parentDn.size() - 1 );
 
         // The parent DN must be ou=normalizers,cn=<schemaName>,ou=schema
         checkParent( parentDn, schemaManager, SchemaConstants.NORMALIZER );
@@ -157,8 +157,8 @@ public class NormalizerSynchronizer exte
     public void delete( Entry entry, boolean cascade ) throws LdapException
     {
         DN dn = entry.getDn();
-        DN parentDn = ( DN ) dn.clone();
-        parentDn.remove( parentDn.size() - 1 );
+        DN parentDn = dn;
+        parentDn = parentDn.remove( parentDn.size() - 1 );
 
         // The parent DN must be ou=normalizers,cn=<schemaName>,ou=schema
         checkParent( parentDn, schemaManager, SchemaConstants.NORMALIZER );
@@ -220,8 +220,8 @@ public class NormalizerSynchronizer exte
 
             // Inject the new DN
             DN newDn = new DN( targetEntry.getDn() );
-            newDn.remove( newDn.size() - 1 );
-            newDn.add( newRdn );
+            newDn = newDn.remove( newDn.size() - 1 );
+            newDn = newDn.add( newRdn );
             targetEntry.setDn( newDn );
 
             Normalizer normalizer = factory.getNormalizer( schemaManager, targetEntry, schemaManager.getRegistries(),

Modified: directory/apacheds/branches/apacheds-dnfactory-experiment/core-api/src/main/java/org/apache/directory/server/core/schema/registries/synchronizers/ObjectClassSynchronizer.java
URL: http://svn.apache.org/viewvc/directory/apacheds/branches/apacheds-dnfactory-experiment/core-api/src/main/java/org/apache/directory/server/core/schema/registries/synchronizers/ObjectClassSynchronizer.java?rev=980925&r1=980924&r2=980925&view=diff
==============================================================================
--- directory/apacheds/branches/apacheds-dnfactory-experiment/core-api/src/main/java/org/apache/directory/server/core/schema/registries/synchronizers/ObjectClassSynchronizer.java (original)
+++ directory/apacheds/branches/apacheds-dnfactory-experiment/core-api/src/main/java/org/apache/directory/server/core/schema/registries/synchronizers/ObjectClassSynchronizer.java Fri Jul 30 19:05:03 2010
@@ -93,8 +93,8 @@ public class ObjectClassSynchronizer ext
     public void add( Entry entry ) throws LdapException
     {
         DN dn = entry.getDn();
-        DN parentDn = ( DN ) dn.clone();
-        parentDn.remove( parentDn.size() - 1 );
+        DN parentDn = dn;
+        parentDn = parentDn.remove( parentDn.size() - 1 );
 
         // The parent DN must be ou=objectclasses,cn=<schemaName>,ou=schema
         checkParent( parentDn, schemaManager, SchemaConstants.OBJECT_CLASS );
@@ -142,8 +142,8 @@ public class ObjectClassSynchronizer ext
     public void delete( Entry entry, boolean cascade ) throws LdapException
     {
         DN dn = entry.getDn();
-        DN parentDn = ( DN ) dn.clone();
-        parentDn.remove( parentDn.size() - 1 );
+        DN parentDn = dn;
+        parentDn = parentDn.remove( parentDn.size() - 1 );
 
         // The parent DN must be ou=objectclasses,cn=<schemaName>,ou=schema
         checkParent( parentDn, schemaManager, SchemaConstants.OBJECT_CLASS );
@@ -214,8 +214,8 @@ public class ObjectClassSynchronizer ext
 
         // Inject the new DN
         DN newDn = new DN( targetEntry.getDn() );
-        newDn.remove( newDn.size() - 1 );
-        newDn.add( newRdn );
+        newDn = newDn.remove( newDn.size() - 1 );
+        newDn = newDn.add( newRdn );
 
         checkOidIsUnique( newOid );
         ObjectClass oc = factory.getObjectClass( schemaManager, targetEntry, schemaManager.getRegistries(), schemaName );

Modified: directory/apacheds/branches/apacheds-dnfactory-experiment/core-api/src/main/java/org/apache/directory/server/core/schema/registries/synchronizers/SchemaSynchronizer.java
URL: http://svn.apache.org/viewvc/directory/apacheds/branches/apacheds-dnfactory-experiment/core-api/src/main/java/org/apache/directory/server/core/schema/registries/synchronizers/SchemaSynchronizer.java?rev=980925&r1=980924&r2=980925&view=diff
==============================================================================
--- directory/apacheds/branches/apacheds-dnfactory-experiment/core-api/src/main/java/org/apache/directory/server/core/schema/registries/synchronizers/SchemaSynchronizer.java (original)
+++ directory/apacheds/branches/apacheds-dnfactory-experiment/core-api/src/main/java/org/apache/directory/server/core/schema/registries/synchronizers/SchemaSynchronizer.java Fri Jul 30 19:05:03 2010
@@ -160,8 +160,8 @@ public class SchemaSynchronizer implemen
     public void add( Entry entry ) throws LdapException
     {
         DN dn = entry.getDn();
-        DN parentDn = ( DN ) dn.clone();
-        parentDn.remove( parentDn.size() - 1 );
+        DN parentDn = dn;
+        parentDn = parentDn.remove( parentDn.size() - 1 );
         parentDn.normalize( registries.getAttributeTypeRegistry().getNormalizerMapping() );
 
         if ( !parentDn.equals( ouSchemaDN ) )

Modified: directory/apacheds/branches/apacheds-dnfactory-experiment/core-api/src/main/java/org/apache/directory/server/core/schema/registries/synchronizers/SyntaxCheckerSynchronizer.java
URL: http://svn.apache.org/viewvc/directory/apacheds/branches/apacheds-dnfactory-experiment/core-api/src/main/java/org/apache/directory/server/core/schema/registries/synchronizers/SyntaxCheckerSynchronizer.java?rev=980925&r1=980924&r2=980925&view=diff
==============================================================================
--- directory/apacheds/branches/apacheds-dnfactory-experiment/core-api/src/main/java/org/apache/directory/server/core/schema/registries/synchronizers/SyntaxCheckerSynchronizer.java (original)
+++ directory/apacheds/branches/apacheds-dnfactory-experiment/core-api/src/main/java/org/apache/directory/server/core/schema/registries/synchronizers/SyntaxCheckerSynchronizer.java Fri Jul 30 19:05:03 2010
@@ -98,8 +98,8 @@ public class SyntaxCheckerSynchronizer e
     public void add( Entry entry ) throws LdapException
     {
         DN dn = entry.getDn();
-        DN parentDn = ( DN ) dn.clone();
-        parentDn.remove( parentDn.size() - 1 );
+        DN parentDn = dn;
+        parentDn = parentDn.remove( parentDn.size() - 1 );
 
         // The parent DN must be ou=syntaxcheckers,cn=<schemaName>,ou=schema
         checkParent( parentDn, schemaManager, SchemaConstants.SYNTAX_CHECKER );
@@ -145,8 +145,8 @@ public class SyntaxCheckerSynchronizer e
     public void delete( Entry entry, boolean cascade ) throws LdapException
     {
         DN dn = entry.getDn();
-        DN parentDn = ( DN ) dn.clone();
-        parentDn.remove( parentDn.size() - 1 );
+        DN parentDn = dn;
+        parentDn = parentDn.remove( parentDn.size() - 1 );
 
         // The parent DN must be ou=syntaxcheckers,cn=<schemaName>,ou=schema
         checkParent( parentDn, schemaManager, SchemaConstants.SYNTAX_CHECKER );

Modified: directory/apacheds/branches/apacheds-dnfactory-experiment/core-api/src/main/java/org/apache/directory/server/core/schema/registries/synchronizers/SyntaxSynchronizer.java
URL: http://svn.apache.org/viewvc/directory/apacheds/branches/apacheds-dnfactory-experiment/core-api/src/main/java/org/apache/directory/server/core/schema/registries/synchronizers/SyntaxSynchronizer.java?rev=980925&r1=980924&r2=980925&view=diff
==============================================================================
--- directory/apacheds/branches/apacheds-dnfactory-experiment/core-api/src/main/java/org/apache/directory/server/core/schema/registries/synchronizers/SyntaxSynchronizer.java (original)
+++ directory/apacheds/branches/apacheds-dnfactory-experiment/core-api/src/main/java/org/apache/directory/server/core/schema/registries/synchronizers/SyntaxSynchronizer.java Fri Jul 30 19:05:03 2010
@@ -100,8 +100,8 @@ public class SyntaxSynchronizer extends 
     public void add( Entry entry ) throws LdapException
     {
         DN dn = entry.getDn();
-        DN parentDn = ( DN ) dn.clone();
-        parentDn.remove( parentDn.size() - 1 );
+        DN parentDn = dn;
+        parentDn = parentDn.remove( parentDn.size() - 1 );
 
         // The parent DN must be ou=syntaxes,cn=<schemaName>,ou=schema
         checkParent( parentDn, schemaManager, SchemaConstants.SYNTAX );
@@ -200,8 +200,8 @@ public class SyntaxSynchronizer extends 
     public void delete( Entry entry, boolean cascade ) throws LdapException
     {
         DN dn = entry.getDn();
-        DN parentDn = ( DN ) dn.clone();
-        parentDn.remove( parentDn.size() - 1 );
+        DN parentDn = dn;
+        parentDn = parentDn.remove( parentDn.size() - 1 );
 
         // The parent DN must be ou=syntaxes,cn=<schemaName>,ou=schema
         checkParent( parentDn, schemaManager, SchemaConstants.SYNTAX );

Modified: directory/apacheds/branches/apacheds-dnfactory-experiment/core-integ/src/test/java/org/apache/directory/server/core/authz/MoveRenameAuthorizationIT.java
URL: http://svn.apache.org/viewvc/directory/apacheds/branches/apacheds-dnfactory-experiment/core-integ/src/test/java/org/apache/directory/server/core/authz/MoveRenameAuthorizationIT.java?rev=980925&r1=980924&r2=980925&view=diff
==============================================================================
--- directory/apacheds/branches/apacheds-dnfactory-experiment/core-integ/src/test/java/org/apache/directory/server/core/authz/MoveRenameAuthorizationIT.java (original)
+++ directory/apacheds/branches/apacheds-dnfactory-experiment/core-integ/src/test/java/org/apache/directory/server/core/authz/MoveRenameAuthorizationIT.java Fri Jul 30 19:05:03 2010
@@ -164,7 +164,7 @@ public class MoveRenameAuthorizationIT e
         {
             if( isMoved )
             {
-                entryDN.add( 1, newParentRdn );
+                entryDN = entryDN.add( 1, newParentRdn );
                 adminConnection.delete( entryDN );
             }
             

Modified: directory/apacheds/branches/apacheds-dnfactory-experiment/core-integ/src/test/java/org/apache/directory/server/core/authz/SearchAuthorizationIT.java
URL: http://svn.apache.org/viewvc/directory/apacheds/branches/apacheds-dnfactory-experiment/core-integ/src/test/java/org/apache/directory/server/core/authz/SearchAuthorizationIT.java?rev=980925&r1=980924&r2=980925&view=diff
==============================================================================
--- directory/apacheds/branches/apacheds-dnfactory-experiment/core-integ/src/test/java/org/apache/directory/server/core/authz/SearchAuthorizationIT.java (original)
+++ directory/apacheds/branches/apacheds-dnfactory-experiment/core-integ/src/test/java/org/apache/directory/server/core/authz/SearchAuthorizationIT.java Fri Jul 30 19:05:03 2010
@@ -135,8 +135,8 @@ public class SearchAuthorizationIT exten
         for ( int i = 0; ( i < children.length ) && ( count[0] < sizeLimit ); i++ )
         {
             DN childRdn = new DN();
-            childRdn.addAll( parent );
-            childRdn.add( "ou=" + i );
+            childRdn = childRdn.addAll( parent );
+            childRdn = childRdn.add( "ou=" + i );
             childRdns[i] = childRdn;
             children[i].setDn( childRdn );
             reusableAdminCon.add( children[i] );

Modified: directory/apacheds/branches/apacheds-dnfactory-experiment/core-integ/src/test/java/org/apache/directory/server/core/exception/ExceptionServiceIT.java
URL: http://svn.apache.org/viewvc/directory/apacheds/branches/apacheds-dnfactory-experiment/core-integ/src/test/java/org/apache/directory/server/core/exception/ExceptionServiceIT.java?rev=980925&r1=980924&r2=980925&view=diff
==============================================================================
--- directory/apacheds/branches/apacheds-dnfactory-experiment/core-integ/src/test/java/org/apache/directory/server/core/exception/ExceptionServiceIT.java (original)
+++ directory/apacheds/branches/apacheds-dnfactory-experiment/core-integ/src/test/java/org/apache/directory/server/core/exception/ExceptionServiceIT.java Fri Jul 30 19:05:03 2010
@@ -72,8 +72,8 @@ public class ExceptionServiceIT extends 
 
     private AddResponse createSubContext( DN parent, String type, String value ) throws Exception
     {
-        DN dn = ( DN ) parent.clone();
-        dn.add( "ou=" + value );
+        DN dn = parent;
+        dn = dn.add( "ou=" + value );
         Entry entry = new DefaultEntry( dn );
         entry.add( SchemaConstants.OBJECT_CLASS_AT, "person" );
         entry.add( SchemaConstants.OBJECT_CLASS_AT, "OrganizationalPerson" );

Modified: directory/apacheds/branches/apacheds-dnfactory-experiment/core-integ/src/test/java/org/apache/directory/server/core/schema/MetaAttributeTypeHandlerIT.java
URL: http://svn.apache.org/viewvc/directory/apacheds/branches/apacheds-dnfactory-experiment/core-integ/src/test/java/org/apache/directory/server/core/schema/MetaAttributeTypeHandlerIT.java?rev=980925&r1=980924&r2=980925&view=diff
==============================================================================
--- directory/apacheds/branches/apacheds-dnfactory-experiment/core-integ/src/test/java/org/apache/directory/server/core/schema/MetaAttributeTypeHandlerIT.java (original)
+++ directory/apacheds/branches/apacheds-dnfactory-experiment/core-integ/src/test/java/org/apache/directory/server/core/schema/MetaAttributeTypeHandlerIT.java Fri Jul 30 19:05:03 2010
@@ -89,7 +89,7 @@ public class MetaAttributeTypeHandlerIT 
          );
         
         DN dn = getAttributeTypeContainer( "apachemeta" );
-        dn.add( "m-oid=2.5.4.58" );
+        dn = dn.add( "m-oid=2.5.4.58" );
         
         // Pre-checks
         assertFalse( isOnDisk( dn ) );
@@ -120,7 +120,7 @@ public class MetaAttributeTypeHandlerIT 
             "m-usage: directoryOperation" );
         
         DN dn = getAttributeTypeContainer( "apachemeta" );
-        dn.add( "m-oid=" + OID );
+        dn = dn.add( "m-oid=" + OID );
         
         // Pre-checks
         assertFalse( isOnDisk( dn ) );
@@ -151,7 +151,7 @@ public class MetaAttributeTypeHandlerIT 
             "m-usage: directoryOperation" );
 
         DN dn = getAttributeTypeContainer( "notloaded" );
-        dn.add( "m-oid=" + OID );
+        dn = dn.add( "m-oid=" + OID );
         
         try
         {
@@ -186,7 +186,7 @@ public class MetaAttributeTypeHandlerIT 
             "m-usage: directoryOperation" );
 
         DN dn = getAttributeTypeContainer( "nis" );
-        dn.add( "m-oid=" + OID );
+        dn = dn.add( "m-oid=" + OID );
         
         getSchemaContext( service ).createSubcontext( DN.toName( dn ), attrs );
         
@@ -210,7 +210,7 @@ public class MetaAttributeTypeHandlerIT 
         testAddAttributeTypeToEnabledSchema();
 
         DN dn = getAttributeTypeContainer( "apachemeta" );
-        dn.add( "m-oid=" + OID );
+        dn = dn.add( "m-oid=" + OID );
 
         // Check in Registries
         assertTrue( "attributeType should be removed from the registry after being deleted", 
@@ -242,7 +242,7 @@ public class MetaAttributeTypeHandlerIT 
         testAddAttributeTypeToDisabledSchema();
 
         DN dn = getAttributeTypeContainer( "nis" );
-        dn.add( "m-oid=" + OID );
+        dn = dn.add( "m-oid=" + OID );
 
         // Check in Registries
         assertFalse( "attributeType should be removed from the registry after being deleted", 
@@ -270,7 +270,7 @@ public class MetaAttributeTypeHandlerIT 
         testAddAttributeTypeToEnabledSchema();
 
         DN dn = getAttributeTypeContainer( "apachemeta" );
-        dn.add( "m-oid=" + OID );
+        dn = dn.add( "m-oid=" + OID );
         addDependeeAttributeType();
         
         try
@@ -301,7 +301,7 @@ public class MetaAttributeTypeHandlerIT 
         assertEquals( at.getSyntax().getOid(), SchemaConstants.INTEGER_SYNTAX );
 
         DN dn = getAttributeTypeContainer( "apachemeta" );
-        dn.add( "m-oid=" + OID );
+        dn = dn.add( "m-oid=" + OID );
         
         ModificationItem[] mods = new ModificationItem[2];
         Attribute attr = new BasicAttribute( "m-description", DESCRIPTION1 );
@@ -333,7 +333,7 @@ public class MetaAttributeTypeHandlerIT 
         assertEquals( at.getSyntax().getOid(), SchemaConstants.INTEGER_SYNTAX );
 
         DN dn = getAttributeTypeContainer( "apachemeta" );
-        dn.add( "m-oid=" + OID );
+        dn = dn.add( "m-oid=" + OID );
         
         Attributes mods = new BasicAttributes( true );
         mods.put( "m-description", DESCRIPTION1 );
@@ -363,10 +363,10 @@ public class MetaAttributeTypeHandlerIT 
 
         LdapContext schemaRoot = getSchemaContext( service );
         DN dn = getAttributeTypeContainer( "apachemeta" );
-        dn.add( "m-oid=" + OID );
+        dn = dn.add( "m-oid=" + OID );
         
         DN newdn = getAttributeTypeContainer( "apachemeta" );
-        newdn.add( "m-oid=" + NEW_OID );
+        dn = newdn.add( "m-oid=" + NEW_OID );
         schemaRoot.rename( DN.toName( dn ), DN.toName( newdn ) );
 
         assertFalse( "old attributeType OID should be removed from the registry after being renamed", 
@@ -386,11 +386,11 @@ public class MetaAttributeTypeHandlerIT 
         testAddAttributeTypeToEnabledSchema();
 
         DN dn = getAttributeTypeContainer( "apachemeta" );
-        dn.add( "m-oid=" + OID );
+        dn = dn.add( "m-oid=" + OID );
         addDependeeAttributeType();
         
         DN newdn = getAttributeTypeContainer( "apachemeta" );
-        newdn.add( "m-oid=" + NEW_OID );
+        newdn = newdn.add( "m-oid=" + NEW_OID );
         
         try
         {
@@ -417,10 +417,10 @@ public class MetaAttributeTypeHandlerIT 
         testAddAttributeTypeToEnabledSchema();
         
         DN dn = getAttributeTypeContainer( "apachemeta" );
-        dn.add( "m-oid=" + OID );
+        dn = dn.add( "m-oid=" + OID );
 
         DN newdn = getAttributeTypeContainer( "apache" );
-        newdn.add( "m-oid=" + OID );
+        newdn = newdn.add( "m-oid=" + OID );
         
         getSchemaContext( service ).rename( DN.toName( dn ), DN.toName( newdn ) );
 
@@ -439,10 +439,10 @@ public class MetaAttributeTypeHandlerIT 
         testAddAttributeTypeToEnabledSchema();
         
         DN dn = getAttributeTypeContainer( "apachemeta" );
-        dn.add( "m-oid=" + OID );
+        dn = dn.add( "m-oid=" + OID );
 
         DN newdn = getAttributeTypeContainer( "apache" );
-        newdn.add( "m-oid=" + NEW_OID );
+        newdn = newdn.add( "m-oid=" + NEW_OID );
         
         getSchemaContext( service ).rename( DN.toName( dn ), DN.toName( newdn ) );
 
@@ -464,10 +464,10 @@ public class MetaAttributeTypeHandlerIT 
         testAddAttributeTypeToEnabledSchema();
         
         DN dn = getAttributeTypeContainer( "apachemeta" );
-        dn.add( "m-oid=" + OID );
+        dn = dn.add( "m-oid=" + OID );
 
         DN top = new DN();
-        top.add( "m-oid=" + OID );
+        top = top.add( "m-oid=" + OID );
         
         try
         {
@@ -491,10 +491,10 @@ public class MetaAttributeTypeHandlerIT 
         testAddAttributeTypeToEnabledSchema();
         
         DN dn = getAttributeTypeContainer( "apachemeta" );
-        dn.add( "m-oid=" + OID );
+        dn = dn.add( "m-oid=" + OID );
 
         DN newdn = new DN( "ou=comparators,cn=apachemeta" );
-        newdn.add( "m-oid=" + OID );
+        newdn = newdn.add( "m-oid=" + OID );
         
         try
         {
@@ -518,11 +518,11 @@ public class MetaAttributeTypeHandlerIT 
         testAddAttributeTypeToEnabledSchema();
         
         DN dn = getAttributeTypeContainer( "apachemeta" );
-        dn.add( "m-oid=" + OID );
+        dn = dn.add( "m-oid=" + OID );
 
         // nis is inactive by default
         DN newdn = getAttributeTypeContainer( "nis" );
-        newdn.add( "m-oid=" + OID );
+        newdn = newdn.add( "m-oid=" + OID );
         
         getSchemaContext( service ).rename( DN.toName( dn ), DN.toName( newdn ) );
 
@@ -539,10 +539,10 @@ public class MetaAttributeTypeHandlerIT 
         addDependeeAttributeType();
         
         DN dn = getAttributeTypeContainer( "apachemeta" );
-        dn.add( "m-oid=" + OID );
+        dn = dn.add( "m-oid=" + OID );
 
         DN newdn = getAttributeTypeContainer( "apache" );
-        newdn.add( "m-oid=" + OID );
+        newdn = newdn.add( "m-oid=" + OID );
         
         try
         {
@@ -567,10 +567,10 @@ public class MetaAttributeTypeHandlerIT 
         addDependeeAttributeType();
         
         DN dn = getAttributeTypeContainer( "apachemeta" );
-        dn.add( "m-oid=" + OID );
+        dn = dn.add( "m-oid=" + OID );
 
         DN newdn = getAttributeTypeContainer( "apache" );
-        newdn.add( "m-oid=" + NEW_OID );
+        newdn = newdn.add( "m-oid=" + NEW_OID );
         
         try
         {
@@ -605,7 +605,7 @@ public class MetaAttributeTypeHandlerIT 
             "m-supAttributeType", OID );
         
         DN dn = getAttributeTypeContainer( "apachemeta" );
-        dn.add( "m-oid=" + DEPENDEE_OID );
+        dn = dn.add( "m-oid=" + DEPENDEE_OID );
         getSchemaContext( service ).createSubcontext( DN.toName( dn ), attrs );
         
         assertTrue( service.getSchemaManager().getAttributeTypeRegistry().contains( DEPENDEE_OID ) );

Modified: directory/apacheds/branches/apacheds-dnfactory-experiment/core-integ/src/test/java/org/apache/directory/server/core/schema/MetaComparatorHandlerIT.java
URL: http://svn.apache.org/viewvc/directory/apacheds/branches/apacheds-dnfactory-experiment/core-integ/src/test/java/org/apache/directory/server/core/schema/MetaComparatorHandlerIT.java?rev=980925&r1=980924&r2=980925&view=diff
==============================================================================
--- directory/apacheds/branches/apacheds-dnfactory-experiment/core-integ/src/test/java/org/apache/directory/server/core/schema/MetaComparatorHandlerIT.java (original)
+++ directory/apacheds/branches/apacheds-dnfactory-experiment/core-integ/src/test/java/org/apache/directory/server/core/schema/MetaComparatorHandlerIT.java Fri Jul 30 19:05:03 2010
@@ -102,7 +102,7 @@ public class MetaComparatorHandlerIT ext
             "m-description: A test comparator" );
 
         DN dn = getComparatorContainer( "apachemeta" );
-        dn.add( "m-oid" + "=" + OID );
+        dn = dn.add( "m-oid" + "=" + OID );
 
         // Pre-checks
         assertFalse( isOnDisk( dn ) );
@@ -129,7 +129,7 @@ public class MetaComparatorHandlerIT ext
 
         // nis is by default inactive
         DN dn = getComparatorContainer( "nis" );
-        dn.add( "m-oid" + "=" + OID );
+        dn = dn.add( "m-oid" + "=" + OID );
 
         // Pre-checks
         assertFalse( isOnDisk( dn ) );
@@ -154,7 +154,7 @@ public class MetaComparatorHandlerIT ext
 
         // nis is by default inactive
         DN dn = getComparatorContainer( "notloaded" );
-        dn.add( "m-oid" + "=" + OID );
+        dn = dn.add( "m-oid" + "=" + OID );
 
         // Pre-checks
         assertFalse( isOnDisk( dn ) );
@@ -195,7 +195,7 @@ public class MetaComparatorHandlerIT ext
                 .toByteArray(), "m-oid", OID, "m-description: A test comparator" );
 
         DN dn = getComparatorContainer( "apachemeta" );
-        dn.add( "m-oid" + "=" + OID );
+        dn = dn.add( "m-oid" + "=" + OID );
 
         // Pre-checks
         assertFalse( isOnDisk( dn ) );
@@ -231,7 +231,7 @@ public class MetaComparatorHandlerIT ext
 
         // nis is by default inactive
         DN dn = getComparatorContainer( "nis" );
-        dn.add( "m-oid" + "=" + OID );
+        dn = dn.add( "m-oid" + "=" + OID );
 
         // Pre-checks
         assertFalse( isOnDisk( dn ) );
@@ -255,7 +255,7 @@ public class MetaComparatorHandlerIT ext
     public void testDeleteComparatorFromEnabledSchema() throws Exception
     {
         DN dn = getComparatorContainer( "apachemeta" );
-        dn.add( "m-oid" + "=" + OID );
+        dn = dn.add( "m-oid" + "=" + OID );
 
         testAddComparatorToEnabledSchema();
 
@@ -287,7 +287,7 @@ public class MetaComparatorHandlerIT ext
     public void testDeleteComparatorFromDisabledSchema() throws Exception
     {
         DN dn = getComparatorContainer( "nis" );
-        dn.add( "m-oid" + "=" + OID );
+        dn = dn.add( "m-oid" + "=" + OID );
         testAddComparatorToDisabledSchema();
 
         // Pre-checks
@@ -319,7 +319,7 @@ public class MetaComparatorHandlerIT ext
     public void testDeleteComparatorWhenInUse() throws Exception
     {
         DN cDn = getComparatorContainer( "apachemeta" );
-        cDn.add( "m-oid" + "=" + OID );
+        cDn = cDn.add( "m-oid" + "=" + OID );
 
         // Create a new Comparator
         testAddComparatorToEnabledSchema();
@@ -336,7 +336,7 @@ public class MetaComparatorHandlerIT ext
             "m-description: test" );
 
         DN mrDn = getMatchingRuleContainer( "apachemeta" );
-        mrDn.add( "m-oid" + "=" + OID );
+        mrDn = mrDn.add( "m-oid" + "=" + OID );
 
         // Pre-checks
         assertFalse( isOnDisk( mrDn ) );
@@ -373,7 +373,7 @@ public class MetaComparatorHandlerIT ext
         testAddComparatorToEnabledSchema();
 
         DN dn = getComparatorContainer( "apachemeta" );
-        dn.add( "m-oid" + "=" + OID );
+        dn = dn.add( "m-oid" + "=" + OID );
 
         ModificationItem[] mods = new ModificationItem[1];
         Attribute attr = new BasicAttribute( "m-fqcn", BooleanComparator.class.getName() );
@@ -397,7 +397,7 @@ public class MetaComparatorHandlerIT ext
         testAddComparatorToEnabledSchema();
 
         DN dn = getComparatorContainer( "apachemeta" );
-        dn.add( "m-oid" + "=" + OID );
+        dn = dn.add( "m-oid" + "=" + OID );
 
         Attributes mods = new BasicAttributes( true );
         mods.put( "m-fqcn", BooleanComparator.class.getName() );
@@ -421,11 +421,11 @@ public class MetaComparatorHandlerIT ext
     public void testRenameComparator() throws Exception
     {
         DN dn = getComparatorContainer( "apachemeta" );
-        dn.add( "m-oid" + "=" + OID );
+        dn = dn.add( "m-oid" + "=" + OID );
         testAddComparatorToEnabledSchema();
 
         DN newdn = getComparatorContainer( "apachemeta" );
-        newdn.add( "m-oid" + "=" + NEW_OID );
+        newdn = newdn.add( "m-oid" + "=" + NEW_OID );
         getSchemaContext( service ).rename( DN.toName( dn ), DN.toName( newdn ) );
 
         assertFalse( "old comparator OID should be removed from the registry after being renamed", schemaManager
@@ -451,12 +451,12 @@ public class MetaComparatorHandlerIT ext
     public void testRenameComparatorWhenInUse() throws Exception
     {
         DN dn = getComparatorContainer( "apachemeta" );
-        dn.add( "m-oid" + "=" + OID );
+        dn = dn.add( "m-oid" + "=" + OID );
         testAddComparatorToEnabledSchema();
         schemaManager.getMatchingRuleRegistry().register( new DummyMR() );
 
         DN newdn = getComparatorContainer( "apachemeta" );
-        newdn.add( "m-oid" + "=" + NEW_OID );
+        newdn = newdn.add( "m-oid" + "=" + NEW_OID );
 
         try
         {
@@ -485,10 +485,10 @@ public class MetaComparatorHandlerIT ext
         testAddComparatorToEnabledSchema();
 
         DN dn = getComparatorContainer( "apachemeta" );
-        dn.add( "m-oid" + "=" + OID );
+        dn = dn.add( "m-oid" + "=" + OID );
 
         DN newdn = getComparatorContainer( "apache" );
-        newdn.add( "m-oid" + "=" + OID );
+        newdn = newdn.add( "m-oid" + "=" + OID );
 
         getSchemaContext( service ).rename( DN.toName( dn ), DN.toName( newdn ) );
 
@@ -509,10 +509,10 @@ public class MetaComparatorHandlerIT ext
         testAddComparatorToEnabledSchema();
 
         DN dn = getComparatorContainer( "apachemeta" );
-        dn.add( "m-oid" + "=" + OID );
+        dn = dn.add( "m-oid" + "=" + OID );
 
         DN newdn = getComparatorContainer( "apache" );
-        newdn.add( "m-oid" + "=" + NEW_OID );
+        newdn = newdn.add( "m-oid" + "=" + NEW_OID );
 
         getSchemaContext( service ).rename( DN.toName( dn ), DN.toName( newdn ) );
 
@@ -539,10 +539,10 @@ public class MetaComparatorHandlerIT ext
         schemaManager.getMatchingRuleRegistry().register( new DummyMR() );
 
         DN dn = getComparatorContainer( "apachemeta" );
-        dn.add( "m-oid" + "=" + OID );
+        dn = dn.add( "m-oid" + "=" + OID );
 
         DN newdn = getComparatorContainer( "apache" );
-        newdn.add( "m-oid" + "=" + OID );
+        newdn = newdn.add( "m-oid" + "=" + OID );
 
         try
         {
@@ -569,10 +569,10 @@ public class MetaComparatorHandlerIT ext
         schemaManager.getMatchingRuleRegistry().register( new DummyMR() );
 
         DN dn = getComparatorContainer( "apachemeta" );
-        dn.add( "m-oid" + "=" + OID );
+        dn = dn.add( "m-oid" + "=" + OID );
 
         DN newdn = getComparatorContainer( "apache" );
-        newdn.add( "m-oid" + "=" + NEW_OID );
+        newdn = newdn.add( "m-oid" + "=" + NEW_OID );
 
         try
         {
@@ -602,10 +602,10 @@ public class MetaComparatorHandlerIT ext
         testAddComparatorToEnabledSchema();
 
         DN dn = getComparatorContainer( "apachemeta" );
-        dn.add( "m-oid" + "=" + OID );
+        dn = dn.add( "m-oid" + "=" + OID );
 
         DN top = new DN();
-        top.add( "m-oid" + "=" + OID );
+        top = top.add( "m-oid" + "=" + OID );
 
         try
         {
@@ -629,10 +629,10 @@ public class MetaComparatorHandlerIT ext
         testAddComparatorToEnabledSchema();
 
         DN dn = getComparatorContainer( "apachemeta" );
-        dn.add( "m-oid" + "=" + OID );
+        dn = dn.add( "m-oid" + "=" + OID );
 
         DN newdn = new DN( "ou=normalizers,cn=apachemeta" );
-        newdn.add( "m-oid" + "=" + OID );
+        newdn = newdn.add( "m-oid" + "=" + OID );
 
         try
         {
@@ -656,11 +656,11 @@ public class MetaComparatorHandlerIT ext
         testAddComparatorToEnabledSchema();
 
         DN dn = getComparatorContainer( "apachemeta" );
-        dn.add( "m-oid" + "=" + OID );
+        dn = dn.add( "m-oid" + "=" + OID );
 
         // nis is inactive by default
         DN newdn = getComparatorContainer( "nis" );
-        newdn.add( "m-oid" + "=" + OID );
+        newdn = newdn.add( "m-oid" + "=" + OID );
 
         getSchemaContext( service ).rename( DN.toName( dn ), DN.toName( newdn ) );
 
@@ -676,13 +676,13 @@ public class MetaComparatorHandlerIT ext
 
         // nis is inactive by default
         DN dn = getComparatorContainer( "nis" );
-        dn.add( "m-oid" + "=" + OID );
+        dn = dn.add( "m-oid" + "=" + OID );
 
         assertFalse( "comparator OID should NOT be present when added to disabled nis schema", schemaManager
             .getComparatorRegistry().contains( OID ) );
 
         DN newdn = getComparatorContainer( "apachemeta" );
-        newdn.add( "m-oid" + "=" + OID );
+        newdn = newdn.add( "m-oid" + "=" + OID );
 
         getSchemaContext( service ).rename( DN.toName( dn ), DN.toName( newdn ) );
 

Modified: directory/apacheds/branches/apacheds-dnfactory-experiment/core-integ/src/test/java/org/apache/directory/server/core/schema/MetaMatchingRuleHandlerIT.java
URL: http://svn.apache.org/viewvc/directory/apacheds/branches/apacheds-dnfactory-experiment/core-integ/src/test/java/org/apache/directory/server/core/schema/MetaMatchingRuleHandlerIT.java?rev=980925&r1=980924&r2=980925&view=diff
==============================================================================
--- directory/apacheds/branches/apacheds-dnfactory-experiment/core-integ/src/test/java/org/apache/directory/server/core/schema/MetaMatchingRuleHandlerIT.java (original)
+++ directory/apacheds/branches/apacheds-dnfactory-experiment/core-integ/src/test/java/org/apache/directory/server/core/schema/MetaMatchingRuleHandlerIT.java Fri Jul 30 19:05:03 2010
@@ -87,7 +87,7 @@ public class MetaMatchingRuleHandlerIT e
             "m-description: A test comparator" );
         
         DN dn = getComparatorContainer( "apachemeta" );
-        dn.add( "m-oid" + "=" + OID );
+        dn = dn.add( "m-oid" + "=" + OID );
         
         // Addition
         getSchemaContext( service ).createSubcontext( DN.toName( dn ), attrs );
@@ -116,7 +116,7 @@ public class MetaMatchingRuleHandlerIT e
             "m-description", DESCRIPTION0 );
 
         DN dn = getMatchingRuleContainer( "apachemeta" );
-        dn.add( "m-oid" + "=" + OID );
+        dn = dn.add( "m-oid" + "=" + OID );
         
         // Pre-checks
         assertFalse( isOnDisk( dn ) );
@@ -146,7 +146,7 @@ public class MetaMatchingRuleHandlerIT e
             "m-description", DESCRIPTION0 );
         
         DN dn = getMatchingRuleContainer( "nis" );
-        dn.add( "m-oid" + "=" + OID );
+        dn = dn.add( "m-oid" + "=" + OID );
         getSchemaContext( service ).createSubcontext( DN.toName( dn ), attrs );
         
         assertFalse( "adding new matchingRule to disabled schema should not register it into the registries", 
@@ -169,7 +169,7 @@ public class MetaMatchingRuleHandlerIT e
             "m-description", DESCRIPTION0 );
         
         DN dn = getMatchingRuleContainer( "notloaded" );
-        dn.add( "m-oid" + "=" + OID );
+        dn = dn.add( "m-oid" + "=" + OID );
         
         try
         {
@@ -194,7 +194,7 @@ public class MetaMatchingRuleHandlerIT e
     public void testDeleteMatchingRuleFromEnabledSchema() throws Exception
     {
         DN dn = getMatchingRuleContainer( "apachemeta" );
-        dn.add( "m-oid" + "=" + OID );
+        dn = dn.add( "m-oid" + "=" + OID );
         testAddMatchingRuleToEnabledSchema();
         
         assertTrue( "matchingRule should be removed from the registry after being deleted", 
@@ -223,7 +223,7 @@ public class MetaMatchingRuleHandlerIT e
     public void testDeleteMatchingRuleFromDisabledSchema() throws Exception
     {
         DN dn = getMatchingRuleContainer( "nis" );
-        dn.add( "m-oid" + "=" + OID );
+        dn = dn.add( "m-oid" + "=" + OID );
         testAddMatchingRuleToDisabledSchema();
         
         assertFalse( "matchingRule should be removed from the registry after being deleted", 
@@ -252,7 +252,7 @@ public class MetaMatchingRuleHandlerIT e
         assertEquals( mr.getSyntax().getOid(), SchemaConstants.INTEGER_SYNTAX );
 
         DN dn = getMatchingRuleContainer( "apachemeta" );
-        dn.add( "m-oid" + "=" + OID );
+        dn = dn.add( "m-oid" + "=" + OID );
         
         ModificationItem[] mods = new ModificationItem[2];
         Attribute attr = new BasicAttribute( "m-description", DESCRIPTION1 );
@@ -284,7 +284,7 @@ public class MetaMatchingRuleHandlerIT e
         assertEquals( mr.getSyntax().getOid(), SchemaConstants.INTEGER_SYNTAX );
 
         DN dn = getMatchingRuleContainer( "apachemeta" );
-        dn.add( "m-oid" + "=" + OID );
+        dn = dn.add( "m-oid" + "=" + OID );
         
         Attributes mods = new BasicAttributes( true );
         mods.put( "m-description", DESCRIPTION1 );
@@ -311,11 +311,11 @@ public class MetaMatchingRuleHandlerIT e
     public void testRenameMatchingRule() throws Exception
     {
         DN dn = getMatchingRuleContainer( "apachemeta" );
-        dn.add( "m-oid" + "=" + OID );
+        dn = dn.add( "m-oid" + "=" + OID );
         testAddMatchingRuleToEnabledSchema();
         
         DN newdn = getMatchingRuleContainer( "apachemeta" );
-        newdn.add( "m-oid" + "=" + NEW_OID );
+        newdn = newdn.add( "m-oid" + "=" + NEW_OID );
         getSchemaContext( service ).rename( DN.toName( dn ), DN.toName( newdn ) );
 
         assertFalse( "old matchingRule OID should be removed from the registry after being renamed", 
@@ -344,10 +344,10 @@ public class MetaMatchingRuleHandlerIT e
         testAddMatchingRuleToEnabledSchema();
         
         DN dn = getMatchingRuleContainer( "apachemeta" );
-        dn.add( "m-oid" + "=" + OID );
+        dn = dn.add( "m-oid" + "=" + OID );
 
         DN newdn = getMatchingRuleContainer( "apache" );
-        newdn.add( "m-oid" + "=" + OID );
+        newdn = newdn.add( "m-oid" + "=" + OID );
         
         getSchemaContext( service ).rename( DN.toName( dn ), DN.toName( newdn ) );
 
@@ -366,10 +366,10 @@ public class MetaMatchingRuleHandlerIT e
         testAddMatchingRuleToEnabledSchema();
         
         DN dn = getMatchingRuleContainer( "apachemeta" );
-        dn.add( "m-oid" + "=" + OID );
+        dn = dn.add( "m-oid" + "=" + OID );
 
         DN newdn = getMatchingRuleContainer( "apache" );
-        newdn.add( "m-oid" + "=" + NEW_OID );
+        newdn = newdn.add( "m-oid" + "=" + NEW_OID );
         
         getSchemaContext( service ).rename( DN.toName( dn ), DN.toName( newdn ) );
 
@@ -420,7 +420,7 @@ public class MetaMatchingRuleHandlerIT e
 //        dn.add( "m-oid" + "=" + OID );
 //
 //        DN newdn = getSyntaxContainer( "apache" );
-//        newdn.add( "m-oid" + "=" + OID );
+//        newdn = newdn.add( "m-oid" + "=" + OID );
 //        
 //        try
 //        {
@@ -446,7 +446,7 @@ public class MetaMatchingRuleHandlerIT e
 //        dn.add( "m-oid" + "=" + OID );s
 //
 //        DN newdn = getSyntaxContainer( "apache" );
-//        newdn.add( "m-oid" + "=" + NEW_OID );
+//        newdn = newdn.add( "m-oid" + "=" + NEW_OID );
 //        
 //        try
 //        {
@@ -480,7 +480,7 @@ public class MetaMatchingRuleHandlerIT e
 //        addDependeeMatchingRule();
 //        
 //        DN newdn = getSyntaxContainer( "apachemeta" );
-//        newdn.add( "m-oid" + "=" + NEW_OID );
+//        newdn = newdn.add( "m-oid" + "=" + NEW_OID );
 //        
 //        try
 //        {
@@ -509,10 +509,10 @@ public class MetaMatchingRuleHandlerIT e
         testAddMatchingRuleToEnabledSchema();
         
         DN dn = getMatchingRuleContainer( "apachemeta" );
-        dn.add( "m-oid" + "=" + OID );
+        dn = dn.add( "m-oid" + "=" + OID );
 
         DN top = new DN();
-        top.add( "m-oid" + "=" + OID );
+        top = top.add( "m-oid" + "=" + OID );
         
         try
         {
@@ -536,10 +536,10 @@ public class MetaMatchingRuleHandlerIT e
         testAddMatchingRuleToEnabledSchema();
         
         DN dn = getMatchingRuleContainer( "apachemeta" );
-        dn.add( "m-oid" + "=" + OID );
+        dn = dn.add( "m-oid" + "=" + OID );
 
         DN newdn = new DN( "ou=comparators,cn=apachemeta" );
-        newdn.add( "m-oid" + "=" + OID );
+        newdn = newdn.add( "m-oid" + "=" + OID );
         
         try
         {
@@ -563,11 +563,11 @@ public class MetaMatchingRuleHandlerIT e
         testAddMatchingRuleToEnabledSchema();
         
         DN dn = getMatchingRuleContainer( "apachemeta" );
-        dn.add( "m-oid" + "=" + OID );
+        dn = dn.add( "m-oid" + "=" + OID );
 
         // nis is inactive by default
         DN newdn = getMatchingRuleContainer( "nis" );
-        newdn.add( "m-oid" + "=" + OID );
+        newdn = newdn.add( "m-oid" + "=" + OID );
         
         getSchemaContext( service ).rename( DN.toName( dn ), DN.toName( newdn ) );
 
@@ -584,13 +584,13 @@ public class MetaMatchingRuleHandlerIT e
         
         // nis is inactive by default
         DN dn = getMatchingRuleContainer( "nis" );
-        dn.add( "m-oid" + "=" + OID );
+        dn = dn.add( "m-oid" + "=" + OID );
 
         assertFalse( "matchingRule OID should NOT be present when added to disabled nis schema", 
             schemaManager.getMatchingRuleRegistry().contains( OID ) );
 
         DN newdn = getMatchingRuleContainer( "apachemeta" );
-        newdn.add( "m-oid" + "=" + OID );
+        newdn = newdn.add( "m-oid" + "=" + OID );
         
         getSchemaContext( service ).rename( DN.toName( dn ), DN.toName( newdn ) );
 

Modified: directory/apacheds/branches/apacheds-dnfactory-experiment/core-integ/src/test/java/org/apache/directory/server/core/schema/MetaNormalizerHandlerIT.java
URL: http://svn.apache.org/viewvc/directory/apacheds/branches/apacheds-dnfactory-experiment/core-integ/src/test/java/org/apache/directory/server/core/schema/MetaNormalizerHandlerIT.java?rev=980925&r1=980924&r2=980925&view=diff
==============================================================================
--- directory/apacheds/branches/apacheds-dnfactory-experiment/core-integ/src/test/java/org/apache/directory/server/core/schema/MetaNormalizerHandlerIT.java (original)
+++ directory/apacheds/branches/apacheds-dnfactory-experiment/core-integ/src/test/java/org/apache/directory/server/core/schema/MetaNormalizerHandlerIT.java Fri Jul 30 19:05:03 2010
@@ -93,7 +93,7 @@ public class MetaNormalizerHandlerIT ext
             "m-description: A test normalizer" );
         
         DN dn = getNormalizerContainer( "apachemeta" );
-        dn.add( "m-oid" + "=" + OID );
+        dn = dn.add( "m-oid" + "=" + OID );
         getSchemaContext( service ).createSubcontext( DN.toName( dn ), attrs );
         
         assertTrue( schemaManager.getNormalizerRegistry().contains( OID ) );
@@ -117,7 +117,7 @@ public class MetaNormalizerHandlerIT ext
         
         // nis is by default inactive
         DN dn = getNormalizerContainer( "nis" );
-        dn.add( "m-oid" + "=" + OID );
+        dn = dn.add( "m-oid" + "=" + OID );
         getSchemaContext( service ).createSubcontext( DN.toName( dn ), attrs );
         
         assertFalse( "adding new normalizer to disabled schema should not register it into the registries", 
@@ -139,7 +139,7 @@ public class MetaNormalizerHandlerIT ext
         
         // nis is by default inactive
         DN dn = getNormalizerContainer( "notloaded" );
-        dn.add( "m-oid" + "=" + OID );
+        dn = dn.add( "m-oid" + "=" + OID );
 
         try
         {
@@ -178,7 +178,7 @@ public class MetaNormalizerHandlerIT ext
             "m-description: A test normalizer" );
         
         DN dn = getNormalizerContainer( "apachemeta" );
-        dn.add( "m-oid" + "=" + OID );
+        dn = dn.add( "m-oid" + "=" + OID );
         getSchemaContext( service ).createSubcontext( DN.toName( dn ), attrs );
         
         assertTrue( schemaManager.getNormalizerRegistry().contains( OID ) );
@@ -210,7 +210,7 @@ public class MetaNormalizerHandlerIT ext
             "m-description: A test normalizer" );
         
         DN dn = getNormalizerContainer( "nis" );
-        dn.add( "m-oid" + "=" + OID );
+        dn = dn.add( "m-oid" + "=" + OID );
         getSchemaContext( service ).createSubcontext( DN.toName( dn ), attrs );
         
         assertFalse( schemaManager.getNormalizerRegistry().contains( OID ) );
@@ -222,7 +222,7 @@ public class MetaNormalizerHandlerIT ext
     public void testDeleteNormalizerFromEnabledSchema() throws Exception
     {
         DN dn = getNormalizerContainer( "apachemeta" );
-        dn.add( "m-oid" + "=" + OID );
+        dn = dn.add( "m-oid" + "=" + OID );
         testAddNormalizerToEnabledSchema();
         
         assertTrue( "normalizer should be removed from the registry after being deleted", 
@@ -251,7 +251,7 @@ public class MetaNormalizerHandlerIT ext
     public void testDeleteNormalizerFromDisabledSchema() throws Exception
     {
         DN dn = getNormalizerContainer( "apachemeta" );
-        dn.add( "m-oid" + "=" + OID );
+        dn = dn.add( "m-oid" + "=" + OID );
         testAddNormalizerToEnabledSchema();
 
         assertTrue( "normalizer should be removed from the registry after being deleted", 
@@ -281,11 +281,11 @@ public class MetaNormalizerHandlerIT ext
     public void testRenameNormalizer() throws Exception
     {
         DN dn = getNormalizerContainer( "apachemeta" );
-        dn.add( "m-oid" + "=" + OID );
+        dn = dn.add( "m-oid" + "=" + OID );
         testAddNormalizerToEnabledSchema();
         
         DN newdn = getNormalizerContainer( "apachemeta" );
-        newdn.add( "m-oid" + "=" + NEW_OID );
+        newdn = newdn.add( "m-oid" + "=" + NEW_OID );
         getSchemaContext( service ).rename( DN.toName( dn ), DN.toName( newdn ) );
 
         assertFalse( "old normalizer OID should be removed from the registry after being renamed", 
@@ -314,10 +314,10 @@ public class MetaNormalizerHandlerIT ext
         testAddNormalizerToEnabledSchema();
         
         DN dn = getNormalizerContainer( "apachemeta" );
-        dn.add( "m-oid" + "=" + OID );
+        dn = dn.add( "m-oid" + "=" + OID );
 
         DN newdn = getNormalizerContainer( "apache" );
-        newdn.add( "m-oid" + "=" + OID );
+        newdn = newdn.add( "m-oid" + "=" + OID );
         
         getSchemaContext( service ).rename( DN.toName( dn ), DN.toName( newdn ) );
 
@@ -339,10 +339,10 @@ public class MetaNormalizerHandlerIT ext
         testAddNormalizerToEnabledSchema();
         
         DN dn = getNormalizerContainer( "apachemeta" );
-        dn.add( "m-oid" + "=" + OID );
+        dn = dn.add( "m-oid" + "=" + OID );
 
         DN newdn = getNormalizerContainer( "apache" );
-        newdn.add( "m-oid" + "=" + NEW_OID );
+        newdn = newdn.add( "m-oid" + "=" + NEW_OID );
         
         getSchemaContext( service ).rename( DN.toName( dn ), DN.toName( newdn ) );
 
@@ -367,7 +367,7 @@ public class MetaNormalizerHandlerIT ext
         testAddNormalizerToEnabledSchema();
         
         DN dn = getNormalizerContainer( "apachemeta" );
-        dn.add( "m-oid" + "=" + OID );
+        dn = dn.add( "m-oid" + "=" + OID );
         
         ModificationItem[] mods = new ModificationItem[1];
         Attribute attr = new BasicAttribute( "m-fqcn", DeepTrimNormalizer.class.getName() );
@@ -392,7 +392,7 @@ public class MetaNormalizerHandlerIT ext
         testAddNormalizerToEnabledSchema();
         
         DN dn = getNormalizerContainer( "apachemeta" );
-        dn.add( "m-oid" + "=" + OID );
+        dn = dn.add( "m-oid" + "=" + OID );
         
         Attributes mods = new BasicAttributes( true );
         mods.put( "m-fqcn", DeepTrimNormalizer.class.getName() );
@@ -416,7 +416,7 @@ public class MetaNormalizerHandlerIT ext
     public void testDeleteNormalizerWhenInUse() throws Exception
     {
         DN nDn = getNormalizerContainer( "apachemeta" );
-        nDn.add( "m-oid" + "=" + OID );
+        nDn = nDn.add( "m-oid" + "=" + OID );
 
         // Create a new Normalizer
         testAddNormalizerToEnabledSchema();
@@ -433,7 +433,7 @@ public class MetaNormalizerHandlerIT ext
             "m-description: test" );
 
         DN mrDn = getMatchingRuleContainer( "apachemeta" );
-        mrDn.add( "m-oid" + "=" + OID );
+        mrDn = mrDn.add( "m-oid" + "=" + OID );
 
         // Pre-checks
         assertFalse( isOnDisk( mrDn ) );
@@ -468,10 +468,10 @@ public class MetaNormalizerHandlerIT ext
         schemaManager.getMatchingRuleRegistry().register( new DummyMR() );
         
         DN dn = getNormalizerContainer( "apachemeta" );
-        dn.add( "m-oid" + "=" + OID );
+        dn = dn.add( "m-oid" + "=" + OID );
 
         DN newdn = getNormalizerContainer( "apache" );
-        newdn.add( "m-oid" + "=" + OID );
+        newdn = newdn.add( "m-oid" + "=" + OID );
         
         try
         {
@@ -497,10 +497,10 @@ public class MetaNormalizerHandlerIT ext
         schemaManager.getMatchingRuleRegistry().register( new DummyMR() );
         
         DN dn = getNormalizerContainer( "apachemeta" );
-        dn.add( "m-oid" + "=" + OID );
+        dn = dn.add( "m-oid" + "=" + OID );
 
         DN newdn = getNormalizerContainer( "apache" );
-        newdn.add( "m-oid" + "=" + NEW_OID );
+        newdn = newdn.add( "m-oid" + "=" + NEW_OID );
         
         try
         {
@@ -523,12 +523,12 @@ public class MetaNormalizerHandlerIT ext
     public void testRenameNormalizerWhenInUse() throws Exception
     {
         DN dn = getNormalizerContainer( "apachemeta" );
-        dn.add( "m-oid" + "=" + OID );
+        dn = dn.add( "m-oid" + "=" + OID );
         testAddNormalizerToEnabledSchema();
         schemaManager.getMatchingRuleRegistry().register( new DummyMR() );
         
         DN newdn = getNormalizerContainer( "apachemeta" );
-        newdn.add( "m-oid" + "=" + NEW_OID );
+        newdn = newdn.add( "m-oid" + "=" + NEW_OID );
         
         try
         {
@@ -558,10 +558,10 @@ public class MetaNormalizerHandlerIT ext
         testAddNormalizerToEnabledSchema();
         
         DN dn = getNormalizerContainer( "apachemeta" );
-        dn.add( "m-oid" + "=" + OID );
+        dn = dn.add( "m-oid" + "=" + OID );
 
         DN top = new DN();
-        top.add( "m-oid" + "=" + OID );
+        top = top.add( "m-oid" + "=" + OID );
         
         try
         {
@@ -585,10 +585,10 @@ public class MetaNormalizerHandlerIT ext
         testAddNormalizerToEnabledSchema();
         
         DN dn = getNormalizerContainer( "apachemeta" );
-        dn.add( "m-oid" + "=" + OID );
+        dn = dn.add( "m-oid" + "=" + OID );
 
         DN newdn = new DN( "ou=comparators,cn=apachemeta" );
-        newdn.add( "m-oid" + "=" + OID );
+        newdn = newdn.add( "m-oid" + "=" + OID );
         
         try
         {
@@ -612,11 +612,11 @@ public class MetaNormalizerHandlerIT ext
         testAddNormalizerToEnabledSchema();
         
         DN dn = getNormalizerContainer( "apachemeta" );
-        dn.add( "m-oid" + "=" + OID );
+        dn = dn.add( "m-oid" + "=" + OID );
 
         // nis is inactive by default
         DN newdn = getNormalizerContainer( "nis" );
-        newdn.add( "m-oid" + "=" + OID );
+        newdn = newdn.add( "m-oid" + "=" + OID );
         
         getSchemaContext( service ).rename( DN.toName( dn ), DN.toName( newdn ) );
 
@@ -633,13 +633,13 @@ public class MetaNormalizerHandlerIT ext
         
         // nis is inactive by default
         DN dn = getNormalizerContainer( "nis" );
-        dn.add( "m-oid" + "=" + OID );
+        dn = dn.add( "m-oid" + "=" + OID );
 
         assertFalse( "normalizer OID should NOT be present when added to disabled nis schema", 
             schemaManager.getNormalizerRegistry().contains( OID ) );
 
         DN newdn = getNormalizerContainer( "apachemeta" );
-        newdn.add( "m-oid" + "=" + OID );
+        newdn = newdn.add( "m-oid" + "=" + OID );
         
         getSchemaContext( service ).rename( DN.toName( dn ), DN.toName( newdn ) );
 

Modified: directory/apacheds/branches/apacheds-dnfactory-experiment/core-integ/src/test/java/org/apache/directory/server/core/schema/MetaObjectClassHandlerIT.java
URL: http://svn.apache.org/viewvc/directory/apacheds/branches/apacheds-dnfactory-experiment/core-integ/src/test/java/org/apache/directory/server/core/schema/MetaObjectClassHandlerIT.java?rev=980925&r1=980924&r2=980925&view=diff
==============================================================================
--- directory/apacheds/branches/apacheds-dnfactory-experiment/core-integ/src/test/java/org/apache/directory/server/core/schema/MetaObjectClassHandlerIT.java (original)
+++ directory/apacheds/branches/apacheds-dnfactory-experiment/core-integ/src/test/java/org/apache/directory/server/core/schema/MetaObjectClassHandlerIT.java Fri Jul 30 19:05:03 2010
@@ -89,7 +89,7 @@ public class MetaObjectClassHandlerIT ex
             "m-may: ou" );
         
         DN dn = getObjectClassContainer( "apachemeta" );
-        dn.add( "m-oid" + "=" + OID );
+        dn = dn.add( "m-oid" + "=" + OID );
         getSchemaContext( service ).createSubcontext( DN.toName( dn ), attrs );
         
         return dn;
@@ -136,7 +136,7 @@ public class MetaObjectClassHandlerIT ex
             "m-may: ou" );
 
         DN dn = getObjectClassContainer( "notloaded" );
-        dn.add( "m-oid" + "=" + OID );
+        dn = dn.add( "m-oid" + "=" + OID );
         
         try
         {
@@ -158,7 +158,7 @@ public class MetaObjectClassHandlerIT ex
     public void testDeleteObjectClassFromEnabledSchema() throws Exception
     {
         DN dn = getObjectClassContainer( "apachemeta" );
-        dn.add( "m-oid" + "=" + OID );
+        dn = dn.add( "m-oid" + "=" + OID );
         addObjectClass();
 
         assertTrue( "objectClass should be removed from the registry after being deleted", 
@@ -187,7 +187,7 @@ public class MetaObjectClassHandlerIT ex
     public void testDeleteObjectClassFromDisabledSchema() throws Exception
     {
         DN dn = getObjectClassContainer( "nis" );
-        dn.add( "m-oid" + "=" + OID );
+        dn = dn.add( "m-oid" + "=" + OID );
         addObjectClassToDisabledSchema();
         
         assertFalse( "objectClass should be removed from the registry after being deleted", 
@@ -217,11 +217,11 @@ public class MetaObjectClassHandlerIT ex
     public void testRenameObjectClassType() throws Exception
     {
         DN dn = getObjectClassContainer( "apachemeta" );
-        dn.add( "m-oid" + "=" + OID );
+        dn = dn.add( "m-oid" + "=" + OID );
         addObjectClass();
         
         DN newdn = getObjectClassContainer( "apachemeta" );
-        newdn.add( "m-oid" + "=" + NEW_OID );
+        newdn = newdn.add( "m-oid" + "=" + NEW_OID );
         getSchemaContext( service ).rename( DN.toName( dn ), DN.toName( newdn ) );
 
         assertFalse( "old objectClass OID should be removed from the registry after being renamed", 
@@ -248,10 +248,10 @@ public class MetaObjectClassHandlerIT ex
         addObjectClass();
         
         DN dn = getObjectClassContainer( "apachemeta" );
-        dn.add( "m-oid" + "=" + OID );
+        dn = dn.add( "m-oid" + "=" + OID );
 
         DN newdn = getObjectClassContainer( "apache" );
-        newdn.add( "m-oid" + "=" + OID );
+        newdn = newdn.add( "m-oid" + "=" + OID );
         
         getSchemaContext( service ).rename( DN.toName( dn ), DN.toName( newdn ) );
 
@@ -270,10 +270,10 @@ public class MetaObjectClassHandlerIT ex
         addObjectClass();
         
         DN dn = getObjectClassContainer( "apachemeta" );
-        dn.add( "m-oid" + "=" + OID );
+        dn = dn.add( "m-oid" + "=" + OID );
 
         DN newdn = getObjectClassContainer( "apache" );
-        newdn.add( "m-oid" + "=" + NEW_OID );
+        newdn = newdn.add( "m-oid" + "=" + NEW_OID );
         
         getSchemaContext( service ).rename( DN.toName( dn ), DN.toName( newdn ) );
 
@@ -299,7 +299,7 @@ public class MetaObjectClassHandlerIT ex
         assertEquals( oc.getName(), NAME );
 
         DN dn = getObjectClassContainer( "apachemeta" );
-        dn.add( "m-oid" + "=" + OID );
+        dn = dn.add( "m-oid" + "=" + OID );
         
         ModificationItem[] mods = new ModificationItem[2];
         Attribute attr = new BasicAttribute( "m-description", DESCRIPTION1 );
@@ -331,7 +331,7 @@ public class MetaObjectClassHandlerIT ex
         assertEquals( oc.getName(), NAME );
 
         DN dn = getObjectClassContainer( "apachemeta" );
-        dn.add( "m-oid" + "=" + OID );
+        dn = dn.add( "m-oid" + "=" + OID );
         
         Attributes mods = new BasicAttributes( true );
         mods.put( "m-description", DESCRIPTION1 );
@@ -369,7 +369,7 @@ public class MetaObjectClassHandlerIT ex
         attrs.put( "m-supObjectClass", OID );
         
         DN dn = getObjectClassContainer( "apachemeta" );
-        dn.add( "m-oid" + "=" + DEPENDEE_OID );
+        dn = dn.add( "m-oid" + "=" + DEPENDEE_OID );
         getSchemaContext( service ).createSubcontext( DN.toName( dn ), attrs );
         
         assertTrue( getObjectClassRegistry().contains( DEPENDEE_OID ) );
@@ -381,7 +381,7 @@ public class MetaObjectClassHandlerIT ex
     public void testDeleteObjectClassWhenInUse() throws Exception
     {
         DN dn = getObjectClassContainer( "apachemeta" );
-        dn.add( "m-oid" + "=" + OID );
+        dn = dn.add( "m-oid" + "=" + OID );
         addObjectClass();
         addDependeeObjectClass();
         
@@ -407,10 +407,10 @@ public class MetaObjectClassHandlerIT ex
         addDependeeObjectClass();
         
         DN dn = getObjectClassContainer( "apachemeta" );
-        dn.add( "m-oid" + "=" + OID );
+        dn = dn.add( "m-oid" + "=" + OID );
 
         DN newdn = getObjectClassContainer( "apache" );
-        newdn.add( "m-oid" + "=" + OID );
+        newdn = newdn.add( "m-oid" + "=" + OID );
         
         try
         {
@@ -434,10 +434,10 @@ public class MetaObjectClassHandlerIT ex
         addDependeeObjectClass();
         
         DN dn = getObjectClassContainer( "apachemeta" );
-        dn.add( "m-oid" + "=" + OID );
+        dn = dn.add( "m-oid" + "=" + OID );
 
         DN newdn = getObjectClassContainer( "apache" );
-        newdn.add( "m-oid" + "=" + NEW_OID );
+        newdn = newdn.add( "m-oid" + "=" + NEW_OID );
         
         try
         {
@@ -458,12 +458,12 @@ public class MetaObjectClassHandlerIT ex
     public void testRenameObjectClassWhenInUse() throws Exception
     {
         DN dn = getObjectClassContainer( "apachemeta" );
-        dn.add( "m-oid" + "=" + OID );
+        dn = dn.add( "m-oid" + "=" + OID );
         addObjectClass();
         addDependeeObjectClass();
         
         DN newdn = getObjectClassContainer( "apachemeta" );
-        newdn.add( "m-oid" + "=" + NEW_OID );
+        newdn = newdn.add( "m-oid" + "=" + NEW_OID );
         
         try
         {
@@ -489,7 +489,7 @@ public class MetaObjectClassHandlerIT ex
         addObjectClass();
         
         DN dn = getObjectClassContainer( "apachemeta" );
-        dn.add( "m-oid" + "=" + OID );
+        dn = dn.add( "m-oid" + "=" + OID );
 
         DN top = new DN();
         top.add( "m-oid" + "=" + OID );
@@ -515,10 +515,10 @@ public class MetaObjectClassHandlerIT ex
         addObjectClass();
         
         DN dn = getObjectClassContainer( "apachemeta" );
-        dn.add( "m-oid" + "=" + OID );
+        dn = dn.add( "m-oid" + "=" + OID );
 
         DN newdn = new DN( "ou=comparators,cn=apachemeta" );
-        newdn.add( "m-oid" + "=" + OID );
+        newdn = newdn.add( "m-oid" + "=" + OID );
         
         try
         {
@@ -548,7 +548,7 @@ public class MetaObjectClassHandlerIT ex
             "m-may: ou" );
 
         DN dn = getObjectClassContainer( "nis" );
-        dn.add( "m-oid" + "=" + OID );
+        dn = dn.add( "m-oid" + "=" + OID );
         getSchemaContext( service ).createSubcontext( DN.toName( dn ), attrs );
         
         return dn;
@@ -562,11 +562,11 @@ public class MetaObjectClassHandlerIT ex
         addObjectClass();
         
         DN dn = getObjectClassContainer( "apachemeta" );
-        dn.add( "m-oid" + "=" + OID );
+        dn = dn.add( "m-oid" + "=" + OID );
 
         // nis is inactive by default
         DN newdn = getObjectClassContainer( "nis" );
-        newdn.add( "m-oid" + "=" + OID );
+        newdn = newdn.add( "m-oid" + "=" + OID );
         
         getSchemaContext( service ).rename( DN.toName( dn ), DN.toName( newdn ) );
 
@@ -583,13 +583,13 @@ public class MetaObjectClassHandlerIT ex
         
         // nis is inactive by default
         DN dn = getObjectClassContainer( "nis" );
-        dn.add( "m-oid" + "=" + OID );
+        dn = dn.add( "m-oid" + "=" + OID );
 
         assertFalse( "objectClass OID should NOT be present when added to disabled nis schema", 
             getObjectClassRegistry().contains( OID ) );
 
         DN newdn = getObjectClassContainer( "apachemeta" );
-        newdn.add( "m-oid" + "=" + OID );
+        newdn = newdn.add( "m-oid" + "=" + OID );
         
         getSchemaContext( service ).rename( DN.toName( dn ), DN.toName( newdn ) );
 
@@ -624,7 +624,7 @@ public class MetaObjectClassHandlerIT ex
         attrs.put( "m-may", "ou" );
         
         DN dn = getObjectClassContainer( "apachemeta" );
-        dn.add( "m-oid" + "=" + OID );
+        dn = dn.add( "m-oid" + "=" + OID );
         getSchemaContext( service ).createSubcontext( DN.toName( dn ), attrs );
         
         assertTrue( getObjectClassRegistry().contains( OID ) );
@@ -657,7 +657,7 @@ public class MetaObjectClassHandlerIT ex
         attrs.put( sup );
         
         DN dn = getObjectClassContainer( "apachemeta" );
-        dn.add( "m-oid" + "=" + OID );
+        dn = dn.add( "m-oid" + "=" + OID );
         
         try
         {
@@ -696,7 +696,7 @@ public class MetaObjectClassHandlerIT ex
         attrs.put( sup );
         
         DN dn = getObjectClassContainer( "apachemeta" );
-        dn.add( "m-oid" + "=" + OID );
+        dn = dn.add( "m-oid" + "=" + OID );
         
         try
         {
@@ -731,7 +731,7 @@ public class MetaObjectClassHandlerIT ex
         attrs.put( "m-may", "ou" );
         
         DN dn = getObjectClassContainer( "apachemeta" );
-        dn.add( "m-oid" + "=" + NEW_OID );
+        dn = dn.add( "m-oid" + "=" + NEW_OID );
         getSchemaContext( service ).createSubcontext( DN.toName( dn ), attrs );
         
         assertTrue( getObjectClassRegistry().contains( NEW_OID ) );
@@ -764,7 +764,7 @@ public class MetaObjectClassHandlerIT ex
         attrs.put( sup );
 
         DN dn = getObjectClassContainer( "apachemeta" );
-        dn.add( "m-oid" + "=" + NEW_OID );
+        dn = dn.add( "m-oid" + "=" + NEW_OID );
         getSchemaContext( service ).createSubcontext( DN.toName( dn ), attrs );
         
         assertTrue( getObjectClassRegistry().contains( NEW_OID ) );
@@ -797,7 +797,7 @@ public class MetaObjectClassHandlerIT ex
         attrs.put( sup );
         
         DN dn = getObjectClassContainer( "apachemeta" );
-        dn.add( "m-oid" + "=" + OID );
+        dn = dn.add( "m-oid" + "=" + OID );
         
         try
         {
@@ -832,7 +832,7 @@ public class MetaObjectClassHandlerIT ex
         attrs.put( "m-may", "ou" );
         
         DN dn = getObjectClassContainer( "apachemeta" );
-        dn.add( "m-oid" + "=" + NEW_OID );
+        dn = dn.add( "m-oid" + "=" + NEW_OID );
         getSchemaContext( service ).createSubcontext( DN.toName( dn ), attrs );
         
         assertTrue( getObjectClassRegistry().contains( NEW_OID ) );
@@ -865,7 +865,7 @@ public class MetaObjectClassHandlerIT ex
         attrs.put( sup );
 
         DN dn = getObjectClassContainer( "apachemeta" );
-        dn.add( "m-oid" + "=" + NEW_OID );
+        dn = dn.add( "m-oid" + "=" + NEW_OID );
         
         try
         {
@@ -904,7 +904,7 @@ public class MetaObjectClassHandlerIT ex
         attrs.put( sup );
 
         DN dn = getObjectClassContainer( "apachemeta" );
-        dn.add( "m-oid" + "=" + NEW_OID );
+        dn = dn.add( "m-oid" + "=" + NEW_OID );
         getSchemaContext( service ).createSubcontext( DN.toName( dn ), attrs );
         
         assertTrue( getObjectClassRegistry().contains( NEW_OID ) );



Mime
View raw message