You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@directory.apache.org by ka...@apache.org on 2010/07/21 14:32:02 UTC

svn commit: r966208 - in /directory/apacheds/trunk: core-api/src/main/java/org/apache/directory/server/core/schema/ core-api/src/main/java/org/apache/directory/server/core/schema/registries/synchronizers/ ldif-partition/src/test/java/org/apache/directo...

Author: kayyagari
Date: Wed Jul 21 12:32:01 2010
New Revision: 966208

URL: http://svn.apache.org/viewvc?rev=966208&view=rev
Log:
o removed call to DN.normalize(oidMap) wherever possible

Modified:
    directory/apacheds/trunk/core-api/src/main/java/org/apache/directory/server/core/schema/PartitionSchemaLoader.java
    directory/apacheds/trunk/core-api/src/main/java/org/apache/directory/server/core/schema/SchemaPartition.java
    directory/apacheds/trunk/core-api/src/main/java/org/apache/directory/server/core/schema/SchemaPartitionDaoImpl.java
    directory/apacheds/trunk/core-api/src/main/java/org/apache/directory/server/core/schema/registries/synchronizers/SchemaSynchronizer.java
    directory/apacheds/trunk/ldif-partition/src/test/java/org/apache/directory/server/core/partition/LdifPartitionTest.java
    directory/apacheds/trunk/server-config/src/main/java/org/apache/directory/server/config/ConfigPartitionReader.java
    directory/apacheds/trunk/xdbm-partition/src/main/java/org/apache/directory/server/xdbm/AbstractStore.java
    directory/apacheds/trunk/xdbm-partition/src/test/java/org/apache/directory/server/xdbm/AbstractStoreTest.java
    directory/apacheds/trunk/xdbm-partition/src/test/java/org/apache/directory/server/xdbm/StoreUtils.java
    directory/apacheds/trunk/xdbm-partition/src/test/java/org/apache/directory/server/xdbm/impl/avl/AvlStoreTest.java
    directory/apacheds/trunk/xdbm-partition/src/test/java/org/apache/directory/server/xdbm/search/impl/GreaterEqTest.java
    directory/apacheds/trunk/xdbm-partition/src/test/java/org/apache/directory/server/xdbm/search/impl/LessEqTest.java
    directory/apacheds/trunk/xdbm-partition/src/test/java/org/apache/directory/server/xdbm/search/impl/OneLevelScopeTest.java
    directory/apacheds/trunk/xdbm-partition/src/test/java/org/apache/directory/server/xdbm/search/impl/SubtreeScopeTest.java

Modified: directory/apacheds/trunk/core-api/src/main/java/org/apache/directory/server/core/schema/PartitionSchemaLoader.java
URL: http://svn.apache.org/viewvc/directory/apacheds/trunk/core-api/src/main/java/org/apache/directory/server/core/schema/PartitionSchemaLoader.java?rev=966208&r1=966207&r2=966208&view=diff
==============================================================================
--- directory/apacheds/trunk/core-api/src/main/java/org/apache/directory/server/core/schema/PartitionSchemaLoader.java (original)
+++ directory/apacheds/trunk/core-api/src/main/java/org/apache/directory/server/core/schema/PartitionSchemaLoader.java Wed Jul 21 12:32:01 2010
@@ -101,45 +101,38 @@ public class PartitionSchemaLoader exten
     {
 
         // Initialize AttributeType Dns
-        DN dn = new DN( SchemaConstants.ATTRIBUTES_TYPE_PATH, "cn=" + schemaName, SchemaConstants.OU_SCHEMA );
+        DN dn = new DN( schemaManager, SchemaConstants.ATTRIBUTES_TYPE_PATH, "cn=" + schemaName, SchemaConstants.OU_SCHEMA );
 
-        dn.normalize( schemaManager.getNormalizerMapping() );
         staticAttributeTypeDNs.put( schemaName, dn );
 
         // Initialize ObjectClasses Dns
-        dn = new DN( SchemaConstants.OBJECT_CLASSES_PATH, "cn=" + schemaName, SchemaConstants.OU_SCHEMA );
+        dn = new DN( schemaManager, SchemaConstants.OBJECT_CLASSES_PATH, "cn=" + schemaName, SchemaConstants.OU_SCHEMA );
 
-        dn.normalize( schemaManager.getNormalizerMapping() );
         staticObjectClassesDNs.put( schemaName, dn );
 
         // Initialize MatchingRules Dns
-        dn = new DN( SchemaConstants.MATCHING_RULES_PATH, "cn=" + schemaName, SchemaConstants.OU_SCHEMA );
+        dn = new DN( schemaManager, SchemaConstants.MATCHING_RULES_PATH, "cn=" + schemaName, SchemaConstants.OU_SCHEMA );
 
-        dn.normalize( schemaManager.getNormalizerMapping() );
         staticMatchingRulesDNs.put( schemaName, dn );
 
         // Initialize Comparators Dns
-        dn = new DN( SchemaConstants.COMPARATORS_PATH, "cn=" + schemaName, SchemaConstants.OU_SCHEMA );
+        dn = new DN( schemaManager, SchemaConstants.COMPARATORS_PATH, "cn=" + schemaName, SchemaConstants.OU_SCHEMA );
 
-        dn.normalize( schemaManager.getNormalizerMapping() );
         staticComparatorsDNs.put( schemaName, dn );
 
         // Initialize Normalizers Dns
-        dn = new DN( SchemaConstants.NORMALIZERS_PATH, "cn=" + schemaName, SchemaConstants.OU_SCHEMA );
+        dn = new DN( schemaManager, SchemaConstants.NORMALIZERS_PATH, "cn=" + schemaName, SchemaConstants.OU_SCHEMA );
 
-        dn.normalize( schemaManager.getNormalizerMapping() );
         staticNormalizersDNs.put( schemaName, dn );
 
         // Initialize SyntaxCheckers Dns
-        dn = new DN( SchemaConstants.SYNTAX_CHECKERS_PATH, "cn=" + schemaName, SchemaConstants.OU_SCHEMA );
+        dn = new DN( schemaManager, SchemaConstants.SYNTAX_CHECKERS_PATH, "cn=" + schemaName, SchemaConstants.OU_SCHEMA );
 
-        dn.normalize( schemaManager.getNormalizerMapping() );
         staticSyntaxCheckersDNs.put( schemaName, dn );
 
         // Initialize Syntaxes Dns
-        dn = new DN( SchemaConstants.SYNTAXES_PATH, "cn=" + schemaName, SchemaConstants.OU_SCHEMA );
+        dn = new DN( schemaManager, SchemaConstants.SYNTAXES_PATH, "cn=" + schemaName, SchemaConstants.OU_SCHEMA );
 
-        dn.normalize( schemaManager.getNormalizerMapping() );
         staticSyntaxesDNs.put( schemaName, dn );
 
     }
@@ -154,9 +147,8 @@ public class PartitionSchemaLoader exten
 
         if ( dn == null )
         {
-            dn = new DN( path, "cn=" + schema.getSchemaName(), SchemaConstants.OU_SCHEMA );
+            dn = new DN( schemaManager, path, "cn=" + schema.getSchemaName(), SchemaConstants.OU_SCHEMA );
 
-            dn.normalize( schemaManager.getNormalizerMapping() );
             staticDNs.put( schema.getSchemaName(), dn );
         }
 

Modified: directory/apacheds/trunk/core-api/src/main/java/org/apache/directory/server/core/schema/SchemaPartition.java
URL: http://svn.apache.org/viewvc/directory/apacheds/trunk/core-api/src/main/java/org/apache/directory/server/core/schema/SchemaPartition.java?rev=966208&r1=966207&r2=966208&view=diff
==============================================================================
--- directory/apacheds/trunk/core-api/src/main/java/org/apache/directory/server/core/schema/SchemaPartition.java (original)
+++ directory/apacheds/trunk/core-api/src/main/java/org/apache/directory/server/core/schema/SchemaPartition.java Wed Jul 21 12:32:01 2010
@@ -209,8 +209,7 @@ public final class SchemaPartition exten
         // Load apachemeta schema from within the ldap-schema Jar with all the
         // schema it depends on.  This is a minimal mandatory set of schemas.
         // -----------------------------------------------------------------------
-        schemaDN = new DN( SchemaConstants.OU_SCHEMA );
-        schemaDN.normalize( schemaManager.getNormalizerMapping() );
+        schemaDN = new DN( SchemaConstants.OU_SCHEMA, schemaManager );
         
         wrapped.setId( ID );
         wrapped.setSuffix( schemaDN );
@@ -235,8 +234,7 @@ public final class SchemaPartition exten
             throw new RuntimeException( e );
         }
 
-        schemaModificationDN = new DN( ServerDNConstants.SCHEMA_MODIFICATIONS_DN );
-        schemaModificationDN.normalize( schemaManager.getNormalizerMapping() );
+        schemaModificationDN = new DN( ServerDNConstants.SCHEMA_MODIFICATIONS_DN, schemaManager );
     }
 
 

Modified: directory/apacheds/trunk/core-api/src/main/java/org/apache/directory/server/core/schema/SchemaPartitionDaoImpl.java
URL: http://svn.apache.org/viewvc/directory/apacheds/trunk/core-api/src/main/java/org/apache/directory/server/core/schema/SchemaPartitionDaoImpl.java?rev=966208&r1=966207&r2=966208&view=diff
==============================================================================
--- directory/apacheds/trunk/core-api/src/main/java/org/apache/directory/server/core/schema/SchemaPartitionDaoImpl.java (original)
+++ directory/apacheds/trunk/core-api/src/main/java/org/apache/directory/server/core/schema/SchemaPartitionDaoImpl.java Wed Jul 21 12:32:01 2010
@@ -195,8 +195,7 @@ public class SchemaPartitionDaoImpl impl
 
     private EntryFilteringCursor listSchemas() throws Exception
     {
-        DN base = new DN( SchemaConstants.OU_SCHEMA );
-        base.normalize( schemaManager.getNormalizerMapping() );
+        DN base = new DN( SchemaConstants.OU_SCHEMA, schemaManager );
         ExprNode filter = new EqualityNode<String>( OBJECT_CLASS_AT,
             new StringValue( MetaSchemaConstants.META_SCHEMA_OC ) );
 
@@ -214,8 +213,7 @@ public class SchemaPartitionDaoImpl impl
      */
     public Schema getSchema( String schemaName ) throws Exception
     {
-        DN dn = new DN( "cn=" + schemaName + ",ou=schema" );
-        dn.normalize( schemaManager.getNormalizerMapping() );
+        DN dn = new DN( "cn=" + schemaName + ",ou=schema", schemaManager );
         return factory.getSchema( partition.lookup( new LookupOperationContext( null, dn ) ) );
     }
 
@@ -567,8 +565,7 @@ public class SchemaPartitionDaoImpl impl
      */
     public void enableSchema( String schemaName ) throws Exception
     {
-        DN dn = new DN( "cn=" + schemaName + ",ou=schema" );
-        dn.normalize( schemaManager.getNormalizerMapping() );
+        DN dn = new DN( "cn=" + schemaName + ",ou=schema", schemaManager );
         Entry entry = partition.lookup( new LookupOperationContext( null, dn ) );
         EntryAttribute disabledAttr = entry.get( disabledAttributeType );
         List<Modification> mods = new ArrayList<Modification>( 3 );

Modified: directory/apacheds/trunk/core-api/src/main/java/org/apache/directory/server/core/schema/registries/synchronizers/SchemaSynchronizer.java
URL: http://svn.apache.org/viewvc/directory/apacheds/trunk/core-api/src/main/java/org/apache/directory/server/core/schema/registries/synchronizers/SchemaSynchronizer.java?rev=966208&r1=966207&r2=966208&view=diff
==============================================================================
--- directory/apacheds/trunk/core-api/src/main/java/org/apache/directory/server/core/schema/registries/synchronizers/SchemaSynchronizer.java (original)
+++ directory/apacheds/trunk/core-api/src/main/java/org/apache/directory/server/core/schema/registries/synchronizers/SchemaSynchronizer.java Wed Jul 21 12:32:01 2010
@@ -103,8 +103,7 @@ public class SchemaSynchronizer implemen
         dependenciesAT = registries.getAttributeTypeRegistry()
             .lookup( MetaSchemaConstants.M_DEPENDENCIES_AT );
         
-        ouSchemaDN = new DN( SchemaConstants.OU_SCHEMA );
-        ouSchemaDN.normalize( registries.getAttributeTypeRegistry().getNormalizerMapping() );
+        ouSchemaDN = new DN( SchemaConstants.OU_SCHEMA, schemaManager );
     }
 
 

Modified: directory/apacheds/trunk/ldif-partition/src/test/java/org/apache/directory/server/core/partition/LdifPartitionTest.java
URL: http://svn.apache.org/viewvc/directory/apacheds/trunk/ldif-partition/src/test/java/org/apache/directory/server/core/partition/LdifPartitionTest.java?rev=966208&r1=966207&r2=966208&view=diff
==============================================================================
--- directory/apacheds/trunk/ldif-partition/src/test/java/org/apache/directory/server/core/partition/LdifPartitionTest.java (original)
+++ directory/apacheds/trunk/ldif-partition/src/test/java/org/apache/directory/server/core/partition/LdifPartitionTest.java Wed Jul 21 12:32:01 2010
@@ -162,7 +162,7 @@ public class LdifPartitionTest
     private ClonedServerEntry createEntry( String dn ) throws Exception
     {
         Entry entry = new DefaultEntry( schemaManager );
-        entry.setDn( new DN( dn ).normalize( schemaManager.getNormalizerMapping() ) );
+        entry.setDn( new DN( dn, schemaManager ) );
         entry.put( SchemaConstants.ENTRY_CSN_AT, defaultCSNFactory.newInstance().toString() );
         entry.add( SchemaConstants.ENTRY_UUID_AT, UUID.randomUUID().toString() );
         
@@ -183,7 +183,7 @@ public class LdifPartitionTest
     @Test
     public void testLdifAddEntries() throws Exception
     {
-        DN adminDn = new DN( "uid=admin,ou=system" ).normalize( schemaManager.getNormalizerMapping() );
+        DN adminDn = new DN( "uid=admin,ou=system", schemaManager );
         CoreSession session = new MockCoreSession( new LdapPrincipal( adminDn, AuthenticationLevel.STRONG ), new MockDirectoryService( 1 ) );
         AddOperationContext addCtx = new AddOperationContext( session );
         
@@ -227,7 +227,7 @@ public class LdifPartitionTest
     @Test
     public void testLdifAddExistingEntry() throws Exception
     {
-        DN adminDn = new DN( "uid=admin,ou=system" ).normalize( schemaManager.getNormalizerMapping() );
+        DN adminDn = new DN( "uid=admin,ou=system", schemaManager );
         CoreSession session = new MockCoreSession( new LdapPrincipal( adminDn, AuthenticationLevel.STRONG ), new MockDirectoryService( 1 ) );
         AddOperationContext addCtx = new AddOperationContext( session );
         
@@ -280,7 +280,7 @@ public class LdifPartitionTest
     @Test
     public void testLdifDeleteExistingEntry() throws Exception
     {
-        DN adminDn = new DN( "uid=admin,ou=system" ).normalize( schemaManager.getNormalizerMapping() );
+        DN adminDn = new DN( "uid=admin,ou=system", schemaManager );
         CoreSession session = new MockCoreSession( new LdapPrincipal( adminDn, AuthenticationLevel.STRONG ), new MockDirectoryService( 1 ) );
         AddOperationContext addCtx = new AddOperationContext( session );
         
@@ -314,8 +314,7 @@ public class LdifPartitionTest
         
         DeleteOperationContext delCtx = new DeleteOperationContext( session );
 
-        DN dn = new DN( "dc=test1,dc=test,ou=test,ou=system" );
-        dn.normalize( schemaManager.getNormalizerMapping() );
+        DN dn = new DN( "dc=test1,dc=test,ou=test,ou=system", schemaManager );
         
         delCtx.setDn( dn );
         
@@ -332,15 +331,13 @@ public class LdifPartitionTest
         assertFalse( new File( wkdir, "ou=test,ou=system/dc=test/dc=mvrdn+objectclass=domain" ).exists() );
         assertTrue( new File( wkdir, "ou=test,ou=system/dc=test/dc=mvrdn+objectclass=domain.ldif" ).exists() );
 
-        dn = new DN( "dc=test2,dc=test,ou=test,ou=system" );
-        dn.normalize( schemaManager.getNormalizerMapping() );
+        dn = new DN( "dc=test2,dc=test,ou=test,ou=system", schemaManager );
         
         delCtx.setDn( dn );
         
         partition.delete( delCtx );
         
-        dn = new DN( "dc=mvrdn+objectClass=domain,dc=test,ou=test,ou=system" );
-        dn.normalize( schemaManager.getNormalizerMapping() );
+        dn = new DN( "dc=mvrdn+objectClass=domain,dc=test,ou=test,ou=system", schemaManager );
         
         delCtx.setDn( dn );
         
@@ -366,7 +363,7 @@ public class LdifPartitionTest
     @Test
     public void testLdifSearchExistingEntry() throws Exception
     {
-        DN adminDn = new DN( "uid=admin,ou=system" ).normalize( schemaManager.getNormalizerMapping() );
+        DN adminDn = new DN( "uid=admin,ou=system", schemaManager );
         CoreSession session = new MockCoreSession( new LdapPrincipal( adminDn, AuthenticationLevel.STRONG ), new MockDirectoryService( 1 ) );
         AddOperationContext addCtx = new AddOperationContext( session );
         
@@ -434,8 +431,8 @@ public class LdifPartitionTest
     {
         CoreSession session = injectEntries();
 
-        ClonedServerEntry childEntry1 = partition.lookup( partition.getEntryId( new DN( "dc=child1,ou=test,ou=system" ).normalize( schemaManager.getNormalizerMapping() ) ) );
-        ClonedServerEntry childEntry2 = partition.lookup( partition.getEntryId( new DN( "dc=child2,ou=test,ou=system" ).normalize( schemaManager.getNormalizerMapping() ) ) );
+        ClonedServerEntry childEntry1 = partition.lookup( partition.getEntryId( new DN( "dc=child1,ou=test,ou=system", schemaManager ) ) );
+        ClonedServerEntry childEntry2 = partition.lookup( partition.getEntryId( new DN( "dc=child2,ou=test,ou=system", schemaManager ) ) );
         
         MoveOperationContext moveOpCtx = new MoveOperationContext( session, childEntry1.getDn(), childEntry2.getDn() );
         partition.move( moveOpCtx );
@@ -460,8 +457,7 @@ public class LdifPartitionTest
     {
         CoreSession session = injectEntries();
 
-        DN childDn1 = new DN( "dc=child1,ou=test,ou=system" );
-        childDn1.normalize( schemaManager.getNormalizerMapping() );
+        DN childDn1 = new DN( "dc=child1,ou=test,ou=system", schemaManager );
         
         RDN newRdn = new RDN( SchemaConstants.DC_AT + "=" + "renamedChild1" );
         RenameOperationContext renameOpCtx = new RenameOperationContext( session, childDn1, newRdn, true );
@@ -486,8 +482,7 @@ public class LdifPartitionTest
     {
         CoreSession session = injectEntries();
 
-        DN childDn1 = new DN( "dc=child1,ou=test,ou=system" );
-        childDn1.normalize( schemaManager.getNormalizerMapping() );
+        DN childDn1 = new DN( "dc=child1,ou=test,ou=system", schemaManager );
         
         RDN newRdn = new RDN( SchemaConstants.DC_AT + "=" + "renamedChild1" );
         RenameOperationContext renameOpCtx = new RenameOperationContext( session, childDn1, newRdn, false );
@@ -517,11 +512,9 @@ public class LdifPartitionTest
     {
         CoreSession session = injectEntries();
 
-        DN childDn1 = new DN( "dc=child1,ou=test,ou=system" );
-        childDn1.normalize( schemaManager.getNormalizerMapping() );
+        DN childDn1 = new DN( "dc=child1,ou=test,ou=system", schemaManager );
 
-        DN childDn2 = new DN( "dc=child2,ou=test,ou=system" );
-        childDn2.normalize( schemaManager.getNormalizerMapping() );
+        DN childDn2 = new DN( "dc=child2,ou=test,ou=system", schemaManager );
 
         RDN newRdn = new RDN( SchemaConstants.DC_AT + "=" + "movedChild1" );
         MoveAndRenameOperationContext moveAndRenameOpCtx = new MoveAndRenameOperationContext( session, childDn1, childDn2, newRdn, true );
@@ -546,11 +539,9 @@ public class LdifPartitionTest
     {
         CoreSession session = injectEntries();
 
-        DN childDn1 = new DN( "dc=child1,ou=test,ou=system" );
-        childDn1.normalize( schemaManager.getNormalizerMapping() );
+        DN childDn1 = new DN( "dc=child1,ou=test,ou=system", schemaManager );
 
-        DN childDn2 = new DN( "dc=child2,ou=test,ou=system" );
-        childDn2.normalize( schemaManager.getNormalizerMapping() );
+        DN childDn2 = new DN( "dc=child2,ou=test,ou=system", schemaManager );
 
         RDN newRdn = new RDN( SchemaConstants.DC_AT + "=" + "movedChild1" );
         MoveAndRenameOperationContext moveAndRenameOpCtx = new MoveAndRenameOperationContext( session, childDn1, childDn2, newRdn, false );
@@ -578,7 +569,7 @@ public class LdifPartitionTest
     
     private CoreSession injectEntries() throws Exception
     {
-        DN adminDn = new DN( "uid=admin,ou=system" ).normalize( schemaManager.getNormalizerMapping() );
+        DN adminDn = new DN( "uid=admin,ou=system", schemaManager );
         CoreSession session = new MockCoreSession( new LdapPrincipal( adminDn, AuthenticationLevel.STRONG ), new MockDirectoryService( 1 ) );
         AddOperationContext addCtx = new AddOperationContext( session );
         

Modified: directory/apacheds/trunk/server-config/src/main/java/org/apache/directory/server/config/ConfigPartitionReader.java
URL: http://svn.apache.org/viewvc/directory/apacheds/trunk/server-config/src/main/java/org/apache/directory/server/config/ConfigPartitionReader.java?rev=966208&r1=966207&r2=966208&view=diff
==============================================================================
--- directory/apacheds/trunk/server-config/src/main/java/org/apache/directory/server/config/ConfigPartitionReader.java (original)
+++ directory/apacheds/trunk/server-config/src/main/java/org/apache/directory/server/config/ConfigPartitionReader.java Wed Jul 21 12:32:01 2010
@@ -706,8 +706,7 @@ public class ConfigPartitionReader
 
         if ( webAppsAttr != null )
         {
-            DN webAppsDN = new DN( webAppsAttr.getString() );
-            webAppsDN.normalize( schemaManager.getNormalizerMapping() );
+            DN webAppsDN = new DN( webAppsAttr.getString(), schemaManager );
 
             Set<WebApp> webApps = getWebApps( webAppsDN );
             httpServer.setWebApps( webApps );
@@ -790,8 +789,7 @@ public class ConfigPartitionReader
 
         if ( changeLogAttr != null )
         {
-            DN clDN = new DN( changeLogAttr.getString() );
-            clDN.normalize( schemaManager.getNormalizerMapping() );
+            DN clDN = new DN( changeLogAttr.getString(), schemaManager );
             ChangeLog cl = getChangeLog( clDN );
             dirService.setChangeLog( cl );
         }
@@ -807,8 +805,7 @@ public class ConfigPartitionReader
 
         if ( journalAttr != null )
         {
-            DN journalDN = new DN( journalAttr.getString() );
-            journalDN.normalize( schemaManager.getNormalizerMapping() );
+            DN journalDN = new DN( journalAttr.getString(), schemaManager );
             dirService.setJournal( getJournal( journalDN ) );
         }
 
@@ -1096,8 +1093,7 @@ public class ConfigPartitionReader
         partition.setId( getString( ConfigSchemaConstants.ADS_PARTITION_ID, partitionEntry ) );
         partition.setPartitionDir( new File( workDir, partition.getId() ) );
 
-        DN systemDn = new DN( getString( ConfigSchemaConstants.ADS_PARTITION_SUFFIX, partitionEntry ) );
-        systemDn.normalize( schemaManager.getNormalizerMapping() );
+        DN systemDn = new DN( getString( ConfigSchemaConstants.ADS_PARTITION_SUFFIX, partitionEntry ), schemaManager );
         partition.setSuffix( systemDn );
 
         EntryAttribute cacheAttr = partitionEntry.get( ConfigSchemaConstants.ADS_PARTITION_CACHE_SIZE );

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=966208&r1=966207&r2=966208&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 Wed Jul 21 12:32:01 2010
@@ -1729,8 +1729,7 @@ public abstract class AbstractStore<E, I
         ID ancestorId; // Id of an alias entry relative
 
         // Access aliasedObjectName, normalize it and generate the Name 
-        normalizedAliasTargetDn = new DN( aliasTarget );
-        normalizedAliasTargetDn.normalize( schemaManager.getNormalizerMapping() );
+        normalizedAliasTargetDn = new DN( aliasTarget, schemaManager );
 
         /*
          * Check For Cycles
@@ -1868,7 +1867,7 @@ public abstract class AbstractStore<E, I
     protected void dropAliasIndices( ID aliasId ) throws Exception
     {
         String targetDn = aliasIdx.reverseLookup( aliasId );
-        ID targetId = getEntryId( new DN( targetDn ).normalize( schemaManager.getNormalizerMapping() ) );
+        ID targetId = getEntryId( new DN( targetDn, schemaManager ) );
 
         if ( targetId == null )
         {
@@ -1940,7 +1939,7 @@ public abstract class AbstractStore<E, I
     protected void dropAliasIndices( ID aliasId, DN movedBase ) throws Exception
     {
         String targetDn = aliasIdx.reverseLookup( aliasId );
-        ID targetId = getEntryId( new DN( targetDn ).normalize( schemaManager.getNormalizerMapping() ) );
+        ID targetId = getEntryId( new DN( targetDn, schemaManager ) );
         DN aliasDn = getEntryDn( aliasId );
 
         /*

Modified: directory/apacheds/trunk/xdbm-partition/src/test/java/org/apache/directory/server/xdbm/AbstractStoreTest.java
URL: http://svn.apache.org/viewvc/directory/apacheds/trunk/xdbm-partition/src/test/java/org/apache/directory/server/xdbm/AbstractStoreTest.java?rev=966208&r1=966207&r2=966208&view=diff
==============================================================================
--- directory/apacheds/trunk/xdbm-partition/src/test/java/org/apache/directory/server/xdbm/AbstractStoreTest.java (original)
+++ directory/apacheds/trunk/xdbm-partition/src/test/java/org/apache/directory/server/xdbm/AbstractStoreTest.java Wed Jul 21 12:32:01 2010
@@ -109,8 +109,7 @@ public class AbstractStoreTest
             fail( "Schema load failed : " + LdapExceptionUtils.printErrors( schemaManager.getErrors() ) );
         }
 
-        EXAMPLE_COM = new DN( "dc=example,dc=com" );
-        EXAMPLE_COM.normalize( schemaManager.getNormalizerMapping() );
+        EXAMPLE_COM = new DN( "dc=example,dc=com", schemaManager );
         
         OU_AT = schemaManager.getAttributeType( SchemaConstants.OU_AT );
         CN_AT = schemaManager.getAttributeType( SchemaConstants.CN_AT );
@@ -174,8 +173,7 @@ public class AbstractStoreTest
     @Test
     public void testModifyAddObjectClass() throws Exception
     {
-        DN dn = new DN( "cn=JOhnny WAlkeR,ou=Sales,o=Good Times Co." );
-        dn.normalize( schemaManager.getNormalizerMapping() );
+        DN dn = new DN( "cn=JOhnny WAlkeR,ou=Sales,o=Good Times Co.", schemaManager );
 
         List<Modification> mods = new ArrayList<Modification>();
         EntryAttribute attrib = new DefaultEntryAttribute( SchemaConstants.OBJECT_CLASS_AT, schemaManager
@@ -208,8 +206,7 @@ public class AbstractStoreTest
     @Test
     public void testModifyRemoveIndexedAttribute() throws Exception
     {
-        DN dn = new DN( "cn=JOhnny WAlkeR,ou=Sales,o=Good Times Co." );
-        dn.normalize( schemaManager.getNormalizerMapping() );
+        DN dn = new DN( "cn=JOhnny WAlkeR,ou=Sales,o=Good Times Co.", schemaManager );
 
         List<Modification> mods = new ArrayList<Modification>();
         EntryAttribute attrib = new DefaultEntryAttribute( SchemaConstants.OU_AT, OU_AT );
@@ -243,8 +240,7 @@ public class AbstractStoreTest
     @Test
     public void testModifyRemoveAllIndexedAttribute() throws Exception
     {
-        DN dn = new DN( "cn=JOhnny WAlkeR,ou=Sales,o=Good Times Co." );
-        dn.normalize( schemaManager.getNormalizerMapping() );
+        DN dn = new DN( "cn=JOhnny WAlkeR,ou=Sales,o=Good Times Co.", schemaManager );
 
         List<Modification> mods = new ArrayList<Modification>();
         EntryAttribute attrib = new DefaultEntryAttribute( SchemaConstants.OU_AT, OU_AT );
@@ -277,8 +273,7 @@ public class AbstractStoreTest
     @Test
     public void testModifyRemoveObjectClass() throws Exception
     {
-        DN dn = new DN( "cn=JOhnny WAlkeR,ou=Sales,o=Good Times Co." );
-        dn.normalize( schemaManager.getNormalizerMapping() );
+        DN dn = new DN( "cn=JOhnny WAlkeR,ou=Sales,o=Good Times Co.", schemaManager );
 
         List<Modification> mods = new ArrayList<Modification>();
         EntryAttribute attrib = new DefaultEntryAttribute( SchemaConstants.OBJECT_CLASS_AT, schemaManager
@@ -311,8 +306,7 @@ public class AbstractStoreTest
     @Test
     public void testModifyRemoveAllObjectClass() throws Exception
     {
-        DN dn = new DN( "cn=JOhnny WAlkeR,ou=Sales,o=Good Times Co." );
-        dn.normalize( schemaManager.getNormalizerMapping() );
+        DN dn = new DN( "cn=JOhnny WAlkeR,ou=Sales,o=Good Times Co.", schemaManager );
 
         List<Modification> mods = new ArrayList<Modification>();
         EntryAttribute attrib = new DefaultEntryAttribute( SchemaConstants.OBJECT_CLASS_AT, schemaManager
@@ -341,8 +335,7 @@ public class AbstractStoreTest
     @Test
     public void testCheckCsnIndexUpdate() throws Exception
     {
-        DN dn = new DN( "cn=JOhnny WAlkeR,ou=Sales,o=Good Times Co." );
-        dn.normalize( schemaManager.getNormalizerMapping() );
+        DN dn = new DN( "cn=JOhnny WAlkeR,ou=Sales,o=Good Times Co.", schemaManager );
 
         List<Modification> mods = new ArrayList<Modification>();
         AttributeType csnAt = schemaManager.lookupAttributeTypeRegistry( SchemaConstants.ENTRY_CSN_AT );

Modified: directory/apacheds/trunk/xdbm-partition/src/test/java/org/apache/directory/server/xdbm/StoreUtils.java
URL: http://svn.apache.org/viewvc/directory/apacheds/trunk/xdbm-partition/src/test/java/org/apache/directory/server/xdbm/StoreUtils.java?rev=966208&r1=966207&r2=966208&view=diff
==============================================================================
--- directory/apacheds/trunk/xdbm-partition/src/test/java/org/apache/directory/server/xdbm/StoreUtils.java (original)
+++ directory/apacheds/trunk/xdbm-partition/src/test/java/org/apache/directory/server/xdbm/StoreUtils.java Wed Jul 21 12:32:01 2010
@@ -60,8 +60,7 @@ public class StoreUtils
     @SuppressWarnings("PMD.AvoidUsingHardCodedIP")
     public static void loadExampleData( Store<Entry, Long> store, SchemaManager schemaManager ) throws Exception
     {
-        DN suffixDn = new DN( "o=Good Times Co." );
-        suffixDn.normalize( schemaManager.getNormalizerMapping() );
+        DN suffixDn = new DN( "o=Good Times Co.", schemaManager );
         store.setSuffixDn( suffixDn );
 
         store.init( schemaManager );
@@ -75,8 +74,7 @@ public class StoreUtils
         injectEntryInStore( store, entry );
 
         // Entry #2
-        DN dn = new DN( "ou=Sales,o=Good Times Co." );
-        dn.normalize( schemaManager.getNormalizerMapping() );
+        DN dn = new DN( "ou=Sales,o=Good Times Co.", schemaManager );
         entry = new DefaultEntry( schemaManager, dn );
         entry.add( "objectClass", "top", "organizationalUnit" );
         entry.add( "ou", "Sales" );
@@ -85,8 +83,7 @@ public class StoreUtils
         injectEntryInStore( store, entry );
 
         // Entry #3
-        dn = new DN( "ou=Board of Directors,o=Good Times Co." );
-        dn.normalize( schemaManager.getNormalizerMapping() );
+        dn = new DN( "ou=Board of Directors,o=Good Times Co.", schemaManager );
         entry = new DefaultEntry( schemaManager, dn );
         entry.add( "objectClass", "top", "organizationalUnit" );
         entry.add( "ou", "Board of Directors" );
@@ -95,8 +92,7 @@ public class StoreUtils
         injectEntryInStore( store, entry );
 
         // Entry #4
-        dn = new DN( "ou=Engineering,o=Good Times Co." );
-        dn.normalize( schemaManager.getNormalizerMapping() );
+        dn = new DN( "ou=Engineering,o=Good Times Co.", schemaManager );
         entry = new DefaultEntry( schemaManager, dn );
         entry.add( "objectClass", "top", "organizationalUnit" );
         entry.add( "ou", "Engineering" );
@@ -105,8 +101,7 @@ public class StoreUtils
         injectEntryInStore( store, entry );
 
         // Entry #5
-        dn = new DN( "cn=JOhnny WAlkeR,ou=Sales,o=Good Times Co." );
-        dn.normalize( schemaManager.getNormalizerMapping() );
+        dn = new DN( "cn=JOhnny WAlkeR,ou=Sales,o=Good Times Co.", schemaManager );
         entry = new DefaultEntry( schemaManager, dn );
         entry.add( "objectClass", "top", "person", "organizationalPerson" );
         entry.add( "ou", "Sales" );
@@ -117,8 +112,7 @@ public class StoreUtils
         injectEntryInStore( store, entry );
 
         // Entry #6
-        dn = new DN( "cn=JIM BEAN,ou=Sales,o=Good Times Co." );
-        dn.normalize( schemaManager.getNormalizerMapping() );
+        dn = new DN( "cn=JIM BEAN,ou=Sales,o=Good Times Co.", schemaManager );
         entry = new DefaultEntry( schemaManager, dn );
         entry.add( "objectClass", "top", "person", "organizationalPerson" );
         entry.add( "ou", "Sales" );
@@ -129,8 +123,7 @@ public class StoreUtils
         injectEntryInStore( store, entry );
 
         // Entry #7
-        dn = new DN( "ou=Apache,ou=Board of Directors,o=Good Times Co." );
-        dn.normalize( schemaManager.getNormalizerMapping() );
+        dn = new DN( "ou=Apache,ou=Board of Directors,o=Good Times Co.", schemaManager );
         entry = new DefaultEntry( schemaManager, dn );
         entry.add( "objectClass", "top", "organizationalUnit" );
         entry.add( "ou", "Apache" );
@@ -139,8 +132,7 @@ public class StoreUtils
         injectEntryInStore( store, entry );
 
         // Entry #8
-        dn = new DN( "cn=Jack Daniels,ou=Engineering,o=Good Times Co." );
-        dn.normalize( schemaManager.getNormalizerMapping() );
+        dn = new DN( "cn=Jack Daniels,ou=Engineering,o=Good Times Co.", schemaManager );
         entry = new DefaultEntry( schemaManager, dn );
         entry.add( "objectClass", "top", "person", "organizationalPerson" );
         entry.add( "ou", "Engineering" );
@@ -153,8 +145,7 @@ public class StoreUtils
         // aliases -------------
 
         // Entry #9
-        dn = new DN( "commonName=Jim Bean,ou=Apache,ou=Board of Directors,o=Good Times Co." );
-        dn.normalize( schemaManager.getNormalizerMapping() );
+        dn = new DN( "commonName=Jim Bean,ou=Apache,ou=Board of Directors,o=Good Times Co.", schemaManager );
         entry = new DefaultEntry( schemaManager, dn );
         entry.add( "objectClass", "top", "alias", "extensibleObject" );
         entry.add( "ou", "Apache" );
@@ -163,8 +154,7 @@ public class StoreUtils
         injectEntryInStore( store, entry );
 
         // Entry #10
-        dn = new DN( "commonName=Jim Bean,ou=Board of Directors,o=Good Times Co." );
-        dn.normalize( schemaManager.getNormalizerMapping() );
+        dn = new DN( "commonName=Jim Bean,ou=Board of Directors,o=Good Times Co.", schemaManager );
         entry = new DefaultEntry( schemaManager, dn );
         entry.add( "objectClass", "top", "alias", "extensibleObject" );
         entry.add( "commonName", "Jim Bean" );
@@ -172,8 +162,7 @@ public class StoreUtils
         injectEntryInStore( store, entry );
 
         // Entry #11
-        dn = new DN( "2.5.4.3=Johnny Walker,ou=Engineering,o=Good Times Co." );
-        dn.normalize( schemaManager.getNormalizerMapping() );
+        dn = new DN( "2.5.4.3=Johnny Walker,ou=Engineering,o=Good Times Co.", schemaManager );
         entry = new DefaultEntry( schemaManager, dn );
         entry.add( "objectClass", "top", "alias", "extensibleObject" );
         entry.add( "ou", "Engineering" );

Modified: directory/apacheds/trunk/xdbm-partition/src/test/java/org/apache/directory/server/xdbm/impl/avl/AvlStoreTest.java
URL: http://svn.apache.org/viewvc/directory/apacheds/trunk/xdbm-partition/src/test/java/org/apache/directory/server/xdbm/impl/avl/AvlStoreTest.java?rev=966208&r1=966207&r2=966208&view=diff
==============================================================================
--- directory/apacheds/trunk/xdbm-partition/src/test/java/org/apache/directory/server/xdbm/impl/avl/AvlStoreTest.java (original)
+++ directory/apacheds/trunk/xdbm-partition/src/test/java/org/apache/directory/server/xdbm/impl/avl/AvlStoreTest.java Wed Jul 21 12:32:01 2010
@@ -123,8 +123,7 @@ public class AvlStoreTest
             fail( "Schema load failed : " + LdapExceptionUtils.printErrors( schemaManager.getErrors() ) );
         }
 
-        EXAMPLE_COM = new DN( "dc=example,dc=com" );
-        EXAMPLE_COM.normalize( schemaManager.getNormalizerMapping() );
+        EXAMPLE_COM = new DN( "dc=example,dc=com", schemaManager );
 
         OU_AT = schemaManager.getAttributeType( SchemaConstants.OU_AT );
         DC_AT = schemaManager.getAttributeType( SchemaConstants.DC_AT );
@@ -409,8 +408,7 @@ public class AvlStoreTest
     @Test
     public void testFreshStore() throws Exception
     {
-        DN dn = new DN( "o=Good Times Co." );
-        dn.normalize( schemaManager.getNormalizerMapping() );
+        DN dn = new DN( "o=Good Times Co.", schemaManager );
         assertEquals( 1L, ( long ) store.getEntryId( dn ) );
         assertEquals( 11, store.count() );
 
@@ -441,8 +439,7 @@ public class AvlStoreTest
         assertEquals( 10, store.count() );
 
         // add an alias and delete to test dropAliasIndices method
-        DN dn = new DN( "commonName=Jack Daniels,ou=Apache,ou=Board of Directors,o=Good Times Co." );
-        dn.normalize( schemaManager.getNormalizerMapping() );
+        DN dn = new DN( "commonName=Jack Daniels,ou=Apache,ou=Board of Directors,o=Good Times Co.", schemaManager );
         DefaultEntry entry = new DefaultEntry( schemaManager, dn );
         entry.add( "objectClass", "top", "alias", "extensibleObject" );
         entry.add( "ou", "Apache" );
@@ -490,8 +487,7 @@ public class AvlStoreTest
         assertFalse( cursor.next() );
 
         // dn id 12
-        DN martinDn = new DN( "cn=Marting King,ou=Sales,o=Good Times Co." );
-        martinDn.normalize( schemaManager.getNormalizerMapping() );
+        DN martinDn = new DN( "cn=Marting King,ou=Sales,o=Good Times Co.", schemaManager );
         DefaultEntry entry = new DefaultEntry( schemaManager, martinDn );
         entry.add( "objectClass", "top", "person", "organizationalPerson" );
         entry.add( "ou", "Sales" );
@@ -505,8 +501,7 @@ public class AvlStoreTest
         assertTrue( cursor.previous() );
         assertEquals( 12, ( long ) cursor.get().getId() );
 
-        DN newParentDn = new DN( "ou=Board of Directors,o=Good Times Co." );
-        newParentDn.normalize( schemaManager.getNormalizerMapping() );
+        DN newParentDn = new DN( "ou=Board of Directors,o=Good Times Co.", schemaManager );
 
         DN newDn = ((DN)newParentDn.clone()).add( martinDn.getRdn() );
         store.move( martinDn, newParentDn, newDn, new ClonedServerEntry( entry ) );
@@ -517,8 +512,7 @@ public class AvlStoreTest
         assertEquals( 12, ( long ) cursor.get().getId() );
 
         // dn id 13
-        DN marketingDn = new DN( "ou=Marketing,ou=Sales,o=Good Times Co." );
-        marketingDn.normalize( schemaManager.getNormalizerMapping() );
+        DN marketingDn = new DN( "ou=Marketing,ou=Sales,o=Good Times Co.", schemaManager );
         entry = new DefaultEntry( schemaManager, marketingDn );
         entry.add( "objectClass", "top", "organizationalUnit" );
         entry.add( "ou", "Marketing" );
@@ -527,8 +521,7 @@ public class AvlStoreTest
         store.add( entry );
 
         // dn id 14
-        DN jimmyDn = new DN( "cn=Jimmy Wales,ou=Marketing, ou=Sales,o=Good Times Co." );
-        jimmyDn.normalize( schemaManager.getNormalizerMapping() );
+        DN jimmyDn = new DN( "cn=Jimmy Wales,ou=Marketing, ou=Sales,o=Good Times Co.", schemaManager );
         entry = new DefaultEntry( schemaManager, jimmyDn );
         entry.add( "objectClass", "top", "person", "organizationalPerson" );
         entry.add( "ou", "Marketing" );
@@ -585,8 +578,7 @@ public class AvlStoreTest
     @Test(expected = LdapNoSuchObjectException.class)
     public void testAddWithoutParentId() throws Exception
     {
-        DN dn = new DN( "cn=Marting King,ou=Not Present,o=Good Times Co." );
-        dn.normalize( schemaManager.getNormalizerMapping() );
+        DN dn = new DN( "cn=Marting King,ou=Not Present,o=Good Times Co.", schemaManager );
         DefaultEntry entry = new DefaultEntry( schemaManager, dn );
         entry.add( "objectClass", "top", "person", "organizationalPerson" );
         entry.add( "ou", "Not Present" );
@@ -598,8 +590,7 @@ public class AvlStoreTest
     @Test(expected = LdapSchemaViolationException.class)
     public void testAddWithoutObjectClass() throws Exception
     {
-        DN dn = new DN( "cn=Martin King,ou=Sales,o=Good Times Co." );
-        dn.normalize( schemaManager.getNormalizerMapping() );
+        DN dn = new DN( "cn=Martin King,ou=Sales,o=Good Times Co.", schemaManager );
         DefaultEntry entry = new DefaultEntry( schemaManager, dn );
         entry.add( "ou", "Sales" );
         entry.add( "cn", "Martin King" );
@@ -610,8 +601,7 @@ public class AvlStoreTest
     @Test
     public void testModifyAddOUAttrib() throws Exception
     {
-        DN dn = new DN( "cn=JOhnny WAlkeR,ou=Sales,o=Good Times Co." );
-        dn.normalize( schemaManager.getNormalizerMapping() );
+        DN dn = new DN( "cn=JOhnny WAlkeR,ou=Sales,o=Good Times Co.", schemaManager );
 
         List<Modification> mods = new ArrayList<Modification>();
         EntryAttribute attrib = new DefaultEntryAttribute( SchemaConstants.OU_AT, OU_AT );
@@ -628,8 +618,7 @@ public class AvlStoreTest
     @Test
     public void testRename() throws Exception
     {
-        DN dn = new DN( "cn=Pivate Ryan,ou=Engineering,o=Good Times Co." );
-        dn.normalize( schemaManager.getNormalizerMapping() );
+        DN dn = new DN( "cn=Pivate Ryan,ou=Engineering,o=Good Times Co.", schemaManager );
         DefaultEntry entry = new DefaultEntry( schemaManager, dn );
         entry.add( "objectClass", "top", "person", "organizationalPerson" );
         entry.add( "ou", "Engineering" );
@@ -648,8 +637,7 @@ public class AvlStoreTest
     @Test
     public void testRenameEscaped() throws Exception
     {
-        DN dn = new DN( "cn=Pivate Ryan,ou=Engineering,o=Good Times Co." );
-        dn.normalize( schemaManager.getNormalizerMapping() );
+        DN dn = new DN( "cn=Pivate Ryan,ou=Engineering,o=Good Times Co.", schemaManager );
         DefaultEntry entry = new DefaultEntry( schemaManager, dn );
         entry.add( "objectClass", "top", "person", "organizationalPerson" );
         entry.add( "ou", "Engineering" );
@@ -663,8 +651,7 @@ public class AvlStoreTest
 
         store.rename( dn, rdn, true );
 
-        DN dn2 = new DN( "sn=Ja\\+es,ou=Engineering,o=Good Times Co." );
-        dn2.normalize( schemaManager.getNormalizerMapping() );
+        DN dn2 = new DN( "sn=Ja\\+es,ou=Engineering,o=Good Times Co.", schemaManager );
         Long id = store.getEntryId( dn2 );
         assertNotNull( id );
         Entry entry2 = store.lookup( id );
@@ -675,8 +662,7 @@ public class AvlStoreTest
     @Test
     public void testMove() throws Exception
     {
-        DN childDn = new DN( "cn=Pivate Ryan,ou=Engineering,o=Good Times Co." );
-        childDn.normalize( schemaManager.getNormalizerMapping() );
+        DN childDn = new DN( "cn=Pivate Ryan,ou=Engineering,o=Good Times Co.", schemaManager );
         DefaultEntry childEntry = new DefaultEntry( schemaManager, childDn );
         childEntry.add( "objectClass", "top", "person", "organizationalPerson" );
         childEntry.add( "ou", "Engineering" );
@@ -686,19 +672,16 @@ public class AvlStoreTest
 
         store.add( childEntry );
 
-        DN parentDn = new DN( "ou=Sales,o=Good Times Co." );
-        parentDn.normalize( schemaManager.getNormalizerMapping() );
+        DN parentDn = new DN( "ou=Sales,o=Good Times Co.", schemaManager );
 
         RDN rdn = new RDN( "cn=Ryan" );
 
         store.moveAndRename( childDn, parentDn, rdn, new ClonedServerEntry( childEntry ), true );
 
         // to drop the alias indices   
-        childDn = new DN( "commonName=Jim Bean,ou=Apache,ou=Board of Directors,o=Good Times Co." );
-        childDn.normalize( schemaManager.getNormalizerMapping() );
+        childDn = new DN( "commonName=Jim Bean,ou=Apache,ou=Board of Directors,o=Good Times Co.", schemaManager );
 
-        parentDn = new DN( "ou=Engineering,o=Good Times Co." );
-        parentDn.normalize( schemaManager.getNormalizerMapping() );
+        parentDn = new DN( "ou=Engineering,o=Good Times Co.", schemaManager );
 
         assertEquals( 3, store.getSubAliasIndex().count() );
 
@@ -712,8 +695,7 @@ public class AvlStoreTest
     @Test
     public void testModifyAdd() throws Exception
     {
-        DN dn = new DN( "cn=JOhnny WAlkeR,ou=Sales,o=Good Times Co." );
-        dn.normalize( schemaManager.getNormalizerMapping() );
+        DN dn = new DN( "cn=JOhnny WAlkeR,ou=Sales,o=Good Times Co.", schemaManager );
 
         List<Modification> mods = new ArrayList<Modification>();
         EntryAttribute attrib = new DefaultEntryAttribute( SchemaConstants.SURNAME_AT, schemaManager
@@ -744,8 +726,7 @@ public class AvlStoreTest
     @Test
     public void testModifyReplace() throws Exception
     {
-        DN dn = new DN( "cn=JOhnny WAlkeR,ou=Sales,o=Good Times Co." );
-        dn.normalize( schemaManager.getNormalizerMapping() );
+        DN dn = new DN( "cn=JOhnny WAlkeR,ou=Sales,o=Good Times Co.", schemaManager );
 
         List<Modification> mods = new ArrayList<Modification>();
         EntryAttribute attrib = new DefaultEntryAttribute( SchemaConstants.SN_AT, schemaManager
@@ -777,8 +758,7 @@ public class AvlStoreTest
     @Test
     public void testModifyRemove() throws Exception
     {
-        DN dn = new DN( "cn=JOhnny WAlkeR,ou=Sales,o=Good Times Co." );
-        dn.normalize( schemaManager.getNormalizerMapping() );
+        DN dn = new DN( "cn=JOhnny WAlkeR,ou=Sales,o=Good Times Co.", schemaManager );
 
         List<Modification> mods = new ArrayList<Modification>();
         EntryAttribute attrib = new DefaultEntryAttribute( SchemaConstants.SN_AT, schemaManager
@@ -810,8 +790,7 @@ public class AvlStoreTest
     @Test
     public void testModifyReplaceNonExistingIndexAttribute() throws Exception
     {
-        DN dn = new DN( "cn=Tim B,ou=Sales,o=Good Times Co." );
-        dn.normalize( schemaManager.getNormalizerMapping() );
+        DN dn = new DN( "cn=Tim B,ou=Sales,o=Good Times Co.", schemaManager );
         DefaultEntry entry = new DefaultEntry( schemaManager, dn );
         entry.add( "objectClass", "top", "person", "organizationalPerson" );
         entry.add( "cn", "Tim B" );

Modified: directory/apacheds/trunk/xdbm-partition/src/test/java/org/apache/directory/server/xdbm/search/impl/GreaterEqTest.java
URL: http://svn.apache.org/viewvc/directory/apacheds/trunk/xdbm-partition/src/test/java/org/apache/directory/server/xdbm/search/impl/GreaterEqTest.java?rev=966208&r1=966207&r2=966208&view=diff
==============================================================================
--- directory/apacheds/trunk/xdbm-partition/src/test/java/org/apache/directory/server/xdbm/search/impl/GreaterEqTest.java (original)
+++ directory/apacheds/trunk/xdbm-partition/src/test/java/org/apache/directory/server/xdbm/search/impl/GreaterEqTest.java Wed Jul 21 12:32:01 2010
@@ -605,8 +605,7 @@ public class GreaterEqTest
         assertNotNull( evaluator.getNormalizer() );
         assertNotNull( evaluator.getComparator() );
 
-        DN dn = new DN( "cn=jane doe,o=good times co." );
-        dn.normalize( schemaManager.getNormalizerMapping() );
+        DN dn = new DN( "cn=jane doe,o=good times co.", schemaManager );
         Entry attrs = new DefaultEntry( schemaManager, dn );
         attrs.add( "objectClass", "person" );
         attrs.add( "c-street", "3" );

Modified: directory/apacheds/trunk/xdbm-partition/src/test/java/org/apache/directory/server/xdbm/search/impl/LessEqTest.java
URL: http://svn.apache.org/viewvc/directory/apacheds/trunk/xdbm-partition/src/test/java/org/apache/directory/server/xdbm/search/impl/LessEqTest.java?rev=966208&r1=966207&r2=966208&view=diff
==============================================================================
--- directory/apacheds/trunk/xdbm-partition/src/test/java/org/apache/directory/server/xdbm/search/impl/LessEqTest.java (original)
+++ directory/apacheds/trunk/xdbm-partition/src/test/java/org/apache/directory/server/xdbm/search/impl/LessEqTest.java Wed Jul 21 12:32:01 2010
@@ -631,8 +631,7 @@ public class LessEqTest
         assertNotNull( evaluator.getNormalizer() );
         assertNotNull( evaluator.getComparator() );
 
-        DN dn = new DN( "cn=jane doe,o=good times co." );
-        dn.normalize( schemaManager.getNormalizerMapping() );
+        DN dn = new DN( "cn=jane doe,o=good times co.", schemaManager );
         Entry attrs = new DefaultEntry( schemaManager, dn );
         attrs.add( "objectClass", "person" );
         attrs.add( "c-street", "1" );

Modified: directory/apacheds/trunk/xdbm-partition/src/test/java/org/apache/directory/server/xdbm/search/impl/OneLevelScopeTest.java
URL: http://svn.apache.org/viewvc/directory/apacheds/trunk/xdbm-partition/src/test/java/org/apache/directory/server/xdbm/search/impl/OneLevelScopeTest.java?rev=966208&r1=966207&r2=966208&view=diff
==============================================================================
--- directory/apacheds/trunk/xdbm-partition/src/test/java/org/apache/directory/server/xdbm/search/impl/OneLevelScopeTest.java (original)
+++ directory/apacheds/trunk/xdbm-partition/src/test/java/org/apache/directory/server/xdbm/search/impl/OneLevelScopeTest.java Wed Jul 21 12:32:01 2010
@@ -661,8 +661,7 @@ public class OneLevelScopeTest
     public void testCursorWithDereferencing3() throws Exception
     {
         DN dn = new DN( SchemaConstants.CN_AT_OID + "=jd," + SchemaConstants.OU_AT_OID + "=board of directors,"
-            + SchemaConstants.O_AT_OID + "=good times co." );
-        dn.normalize( schemaManager.getNormalizerMapping() );
+            + SchemaConstants.O_AT_OID + "=good times co.", schemaManager );
 
         Entry attrs = new DefaultEntry( schemaManager, dn );
         attrs.add( "objectClass", "alias", "extensibleObject" );
@@ -673,8 +672,7 @@ public class OneLevelScopeTest
         store.add( attrs );
 
         dn = new DN( SchemaConstants.CN_AT_OID + "=jdoe," + SchemaConstants.OU_AT_OID + "=board of directors,"
-            + SchemaConstants.O_AT_OID + "=good times co." );
-        dn.normalize( schemaManager.getNormalizerMapping() );
+            + SchemaConstants.O_AT_OID + "=good times co.", schemaManager );
 
         attrs = new DefaultEntry( schemaManager, dn );
         attrs.add( "objectClass", "person" );

Modified: directory/apacheds/trunk/xdbm-partition/src/test/java/org/apache/directory/server/xdbm/search/impl/SubtreeScopeTest.java
URL: http://svn.apache.org/viewvc/directory/apacheds/trunk/xdbm-partition/src/test/java/org/apache/directory/server/xdbm/search/impl/SubtreeScopeTest.java?rev=966208&r1=966207&r2=966208&view=diff
==============================================================================
--- directory/apacheds/trunk/xdbm-partition/src/test/java/org/apache/directory/server/xdbm/search/impl/SubtreeScopeTest.java (original)
+++ directory/apacheds/trunk/xdbm-partition/src/test/java/org/apache/directory/server/xdbm/search/impl/SubtreeScopeTest.java Wed Jul 21 12:32:01 2010
@@ -624,8 +624,7 @@ public class SubtreeScopeTest
     public void testCursorWithDereferencing3() throws Exception
     {
         DN dn = new DN( SchemaConstants.CN_AT_OID + "=jd," + SchemaConstants.OU_AT_OID + "=board of directors,"
-            + SchemaConstants.O_AT_OID + "=good times co." );
-        dn.normalize( schemaManager.getNormalizerMapping() );
+            + SchemaConstants.O_AT_OID + "=good times co.", schemaManager );
 
         Entry attrs = new DefaultEntry( schemaManager, dn );
         attrs.add( "objectClass", "alias", "extensibleObject" );
@@ -636,8 +635,7 @@ public class SubtreeScopeTest
         store.add( attrs );
 
         dn = new DN( SchemaConstants.CN_AT_OID + "=jdoe," + SchemaConstants.OU_AT_OID + "=board of directors,"
-            + SchemaConstants.O_AT_OID + "=good times co." );
-        dn.normalize( schemaManager.getNormalizerMapping() );
+            + SchemaConstants.O_AT_OID + "=good times co.", schemaManager );
 
         attrs = new DefaultEntry( schemaManager, dn );
         attrs.add( "objectClass", "person" );