directory-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From elecha...@apache.org
Subject svn commit: r921600 - in /directory: apacheds/trunk/avl-partition/src/main/java/org/apache/directory/server/core/partition/avl/ apacheds/trunk/core/src/main/java/org/apache/directory/server/core/authz/ apacheds/trunk/core/src/main/java/org/apache/direc...
Date Wed, 10 Mar 2010 22:37:31 GMT
Author: elecharny
Date: Wed Mar 10 22:37:30 2010
New Revision: 921600

URL: http://svn.apache.org/viewvc?rev=921600&view=rev
Log:
Fixed DIRSHARED-46

Removed:
    directory/apacheds/trunk/core/src/main/java/org/apache/directory/server/core/partition/impl/
Modified:
    directory/apacheds/trunk/avl-partition/src/main/java/org/apache/directory/server/core/partition/avl/AvlStore.java
    directory/apacheds/trunk/core/src/main/java/org/apache/directory/server/core/authz/AciAuthorizationInterceptor.java
    directory/apacheds/trunk/core/src/main/java/org/apache/directory/server/core/authz/GroupCache.java
    directory/apacheds/trunk/core/src/main/java/org/apache/directory/server/core/authz/TupleCache.java
    directory/apacheds/trunk/core/src/main/java/org/apache/directory/server/core/authz/support/RelatedProtectedItemFilter.java
    directory/apacheds/trunk/core/src/main/java/org/apache/directory/server/core/journal/JournalInterceptor.java
    directory/apacheds/trunk/core/src/main/java/org/apache/directory/server/core/partition/DefaultPartitionNexus.java
    directory/apacheds/trunk/core/src/main/java/org/apache/directory/server/core/subtree/SubentryInterceptor.java
    directory/apacheds/trunk/core/src/main/java/org/apache/directory/server/core/trigger/TriggerSpecCache.java
    directory/apacheds/trunk/jdbm-store/src/main/java/org/apache/directory/server/core/partition/impl/btree/jdbm/JdbmStore.java
    directory/apacheds/trunk/xdbm-search/src/main/java/org/apache/directory/server/xdbm/search/impl/DefaultSearchEngine.java
    directory/apacheds/trunk/xdbm-tools/src/main/java/org/apache/directory/server/core/partition/impl/btree/gui/PartitionFrame.java
    directory/shared/trunk/dsml-parser/src/test/java/org/apache/directory/shared/dsmlv2/addRequest/AddRequestTest.java
    directory/shared/trunk/dsml-parser/src/test/java/org/apache/directory/shared/dsmlv2/authRequest/AuthRequestTest.java
    directory/shared/trunk/dsml-parser/src/test/java/org/apache/directory/shared/dsmlv2/compareRequest/CompareRequestTest.java
    directory/shared/trunk/dsml-parser/src/test/java/org/apache/directory/shared/dsmlv2/delRequest/DelRequestTest.java
    directory/shared/trunk/dsml-parser/src/test/java/org/apache/directory/shared/dsmlv2/modDNRequest/ModifyDNRequestTest.java
    directory/shared/trunk/ldap/src/main/java/org/apache/directory/shared/ldap/codec/LdapResultCodec.java
    directory/shared/trunk/ldap/src/main/java/org/apache/directory/shared/ldap/codec/bind/BindRequestCodec.java
    directory/shared/trunk/ldap/src/main/java/org/apache/directory/shared/ldap/message/BindRequestImpl.java
    directory/shared/trunk/ldap/src/main/java/org/apache/directory/shared/ldap/name/DN.java
    directory/shared/trunk/ldap/src/test/java/org/apache/directory/shared/ldap/name/DNTest.java
    directory/shared/trunk/ldap/src/test/java/org/apache/directory/shared/ldap/name/DnParserTest.java
    directory/shared/trunk/ldap/src/test/java/org/apache/directory/shared/ldap/name/FastDnParserTest.java

Modified: directory/apacheds/trunk/avl-partition/src/main/java/org/apache/directory/server/core/partition/avl/AvlStore.java
URL: http://svn.apache.org/viewvc/directory/apacheds/trunk/avl-partition/src/main/java/org/apache/directory/server/core/partition/avl/AvlStore.java?rev=921600&r1=921599&r2=921600&view=diff
==============================================================================
--- directory/apacheds/trunk/avl-partition/src/main/java/org/apache/directory/server/core/partition/avl/AvlStore.java (original)
+++ directory/apacheds/trunk/avl-partition/src/main/java/org/apache/directory/server/core/partition/avl/AvlStore.java Wed Mar 10 22:37:30 2010
@@ -1225,7 +1225,7 @@ public class AvlStore<E> implements Stor
             throw new Exception( I18n.err( I18n.ERR_215 ) );
         }
 
-        Long id = getEntryId( dn.toString() );
+        Long id = getEntryId( dn.getNormName() );
         ServerEntry entry = ( ServerEntry ) master.get( id );
 
         for ( AttributeType attributeType : mods.getAttributeTypes() )
@@ -1258,7 +1258,7 @@ public class AvlStore<E> implements Stor
 
     public void modify( DN dn, List<Modification> mods ) throws Exception
     {
-        Long id = getEntryId( dn.toString() );
+        Long id = getEntryId( dn.getNormName() );
         modify( id, mods );
     }
 
@@ -1296,7 +1296,7 @@ public class AvlStore<E> implements Stor
 
     public void move( DN oldChildDn, DN newParentDn, RDN newRdn, boolean deleteOldRdn ) throws Exception
     {
-        Long childId = getEntryId( oldChildDn.toString() );
+        Long childId = getEntryId( oldChildDn.getNormName() );
         rename( oldChildDn, newRdn, deleteOldRdn );
         DN newUpdn = move( oldChildDn, childId, newParentDn );
 
@@ -1309,7 +1309,7 @@ public class AvlStore<E> implements Stor
 
     public void move( DN oldChildDn, DN newParentDn ) throws Exception
     {
-        Long childId = getEntryId( oldChildDn.toString() );
+        Long childId = getEntryId( oldChildDn.getNormName() );
         DN newUpdn = move( oldChildDn, childId, newParentDn );
 
         // Update the current entry
@@ -1336,7 +1336,7 @@ public class AvlStore<E> implements Stor
     private DN move( DN oldChildDn, Long childId, DN newParentDn ) throws Exception
     {
         // Get the child and the new parent to be entries and Ids
-        Long newParentId = getEntryId( newParentDn.toString() );
+        Long newParentId = getEntryId( newParentDn.getNormName() );
         Long oldParentId = getParentId( childId );
 
         /*
@@ -1909,7 +1909,7 @@ public class AvlStore<E> implements Stor
         Long targetId = getEntryId( targetDn );
         String aliasDn = getEntryDn( aliasId );
         DN ancestorDn = ( DN ) new DN( aliasDn ).getPrefix( 1 );
-        Long ancestorId = getEntryId( ancestorDn.toString() );
+        Long ancestorId = getEntryId( ancestorDn.getNormName() );
 
         /*
          * We cannot just drop all tuples in the one level and subtree userIndices
@@ -1928,7 +1928,7 @@ public class AvlStore<E> implements Stor
         while ( !ancestorDn.equals( suffixDn ) )
         {
             ancestorDn = ( DN ) ancestorDn.getPrefix( 1 );
-            ancestorId = getEntryId( ancestorDn.toString() );
+            ancestorId = getEntryId( ancestorDn.getNormName() );
 
             subAliasIdx.drop( ancestorId, targetId );
         }
@@ -2020,7 +2020,7 @@ public class AvlStore<E> implements Stor
         //            }
         //        };
 
-        Long movedBaseId = getEntryId( movedBase.toString() );
+        Long movedBaseId = getEntryId( movedBase.getNormName() );
 
         if ( aliasIdx.reverseLookup( movedBaseId ) != null )
         {
@@ -2059,7 +2059,7 @@ public class AvlStore<E> implements Stor
          * moved base.  This is the first ancestor effected by the move.
          */
         DN ancestorDn = ( DN ) movedBase.getPrefix( 1 );
-        Long ancestorId = getEntryId( ancestorDn.toString() );
+        Long ancestorId = getEntryId( ancestorDn.getNormName() );
 
         /*
          * We cannot just drop all tuples in the one level and subtree userIndices
@@ -2083,7 +2083,7 @@ public class AvlStore<E> implements Stor
         while ( !ancestorDn.equals( suffixDn ) )
         {
             ancestorDn = ( DN ) ancestorDn.getPrefix( 1 );
-            ancestorId = getEntryId( ancestorDn.toString() );
+            ancestorId = getEntryId( ancestorDn.getNormName() );
 
             subAliasIdx.drop( ancestorId, targetId );
         }

Modified: directory/apacheds/trunk/core/src/main/java/org/apache/directory/server/core/authz/AciAuthorizationInterceptor.java
URL: http://svn.apache.org/viewvc/directory/apacheds/trunk/core/src/main/java/org/apache/directory/server/core/authz/AciAuthorizationInterceptor.java?rev=921600&r1=921599&r2=921600&view=diff
==============================================================================
--- directory/apacheds/trunk/core/src/main/java/org/apache/directory/server/core/authz/AciAuthorizationInterceptor.java (original)
+++ directory/apacheds/trunk/core/src/main/java/org/apache/directory/server/core/authz/AciAuthorizationInterceptor.java Wed Mar 10 22:37:30 2010
@@ -522,7 +522,7 @@ public class AciAuthorizationInterceptor
             return;
         }
 
-        Set<DN> userGroups = groupCache.getGroups( principalDn.toString() );
+        Set<DN> userGroups = groupCache.getGroups( principalDn.getNormName() );
         Collection<ACITuple> tuples = new HashSet<ACITuple>();
         addPerscriptiveAciTuples( deleteContext, tuples, name, entry.getOriginalEntry() );
         addEntryAciTuples( tuples, entry );
@@ -569,7 +569,7 @@ public class AciAuthorizationInterceptor
             return;
         }
 
-        Set<DN> userGroups = groupCache.getGroups( principalDn.toString() );
+        Set<DN> userGroups = groupCache.getGroups( principalDn.getNormName() );
         Collection<ACITuple> tuples = new HashSet<ACITuple>();
         addPerscriptiveAciTuples( opContext, tuples, name, entry.getOriginalEntry() );
         addEntryAciTuples( tuples, entry );
@@ -720,7 +720,7 @@ public class AciAuthorizationInterceptor
     private void checkLookupAccess( LookupOperationContext lookupContext, ServerEntry entry ) throws Exception
     {
         // no permissions checks on the RootDSE
-        if ( lookupContext.getDn().toString().trim().equals( "" ) )
+        if ( lookupContext.getDn().getNormName().trim().equals( "" ) )
         {
             return;
         }
@@ -821,7 +821,7 @@ public class AciAuthorizationInterceptor
             return;
         }
 
-        Set<DN> userGroups = groupCache.getGroups( principalDn.toString() );
+        Set<DN> userGroups = groupCache.getGroups( principalDn.getNormName() );
         Collection<ACITuple> tuples = new HashSet<ACITuple>();
         addPerscriptiveAciTuples( renameContext, tuples, oldName, originalEntry );
         addEntryAciTuples( tuples, originalEntry );
@@ -868,7 +868,7 @@ public class AciAuthorizationInterceptor
             return;
         }
 
-        Set<DN> userGroups = groupCache.getGroups( principalDn.toString() );
+        Set<DN> userGroups = groupCache.getGroups( principalDn.getNormName() );
         Collection<ACITuple> tuples = new HashSet<ACITuple>();
         addPerscriptiveAciTuples( moveAndRenameContext, tuples, oriChildName, entry.getOriginalEntry() );
         addEntryAciTuples( tuples, entry );
@@ -947,7 +947,7 @@ public class AciAuthorizationInterceptor
             return;
         }
 
-        Set<DN> userGroups = groupCache.getGroups( principalDn.toString() );
+        Set<DN> userGroups = groupCache.getGroups( principalDn.getNormName() );
         Collection<ACITuple> tuples = new HashSet<ACITuple>();
         addPerscriptiveAciTuples( moveContext, tuples, oriChildName, entry.getOriginalEntry() );
         addEntryAciTuples( tuples, entry );
@@ -1091,7 +1091,7 @@ public class AciAuthorizationInterceptor
         {
             entry = opContext.lookup( matched, ByPassConstants.GETMATCHEDDN_BYPASS );
             
-            Set<DN> userGroups = groupCache.getGroups( principalDn.toString() );
+            Set<DN> userGroups = groupCache.getGroups( principalDn.getNormName() );
             Collection<ACITuple> tuples = new HashSet<ACITuple>();
             addPerscriptiveAciTuples( opContext, tuples, matched, entry.getOriginalEntry() );
             addEntryAciTuples( tuples, entry );

Modified: directory/apacheds/trunk/core/src/main/java/org/apache/directory/server/core/authz/GroupCache.java
URL: http://svn.apache.org/viewvc/directory/apacheds/trunk/core/src/main/java/org/apache/directory/server/core/authz/GroupCache.java?rev=921600&r1=921599&r2=921600&view=diff
==============================================================================
--- directory/apacheds/trunk/core/src/main/java/org/apache/directory/server/core/authz/GroupCache.java (original)
+++ directory/apacheds/trunk/core/src/main/java/org/apache/directory/server/core/authz/GroupCache.java Wed Mar 10 22:37:30 2010
@@ -235,7 +235,7 @@ public class GroupCache
 
             try
             {
-                memberDn = parseNormalized( memberDn ).toString();
+                memberDn = parseNormalized( memberDn ).getNormName();
             }
             catch ( NamingException e )
             {
@@ -263,7 +263,7 @@ public class GroupCache
 
             try
             {
-                memberDn = parseNormalized( memberDn ).toString();
+                memberDn = parseNormalized( memberDn ).getNormName();
             }
             catch ( NamingException e )
             {

Modified: directory/apacheds/trunk/core/src/main/java/org/apache/directory/server/core/authz/TupleCache.java
URL: http://svn.apache.org/viewvc/directory/apacheds/trunk/core/src/main/java/org/apache/directory/server/core/authz/TupleCache.java?rev=921600&r1=921599&r2=921600&view=diff
==============================================================================
--- directory/apacheds/trunk/core/src/main/java/org/apache/directory/server/core/authz/TupleCache.java (original)
+++ directory/apacheds/trunk/core/src/main/java/org/apache/directory/server/core/authz/TupleCache.java Wed Mar 10 22:37:30 2010
@@ -273,6 +273,6 @@ public class TupleCache
 
     public void subentryRenamed( DN oldName, DN newName )
     {
-        tuples.put( newName.toString(), tuples.remove( oldName.toString() ) );
+        tuples.put( newName.getNormName(), tuples.remove( oldName.getNormName() ) );
     }
 }

Modified: directory/apacheds/trunk/core/src/main/java/org/apache/directory/server/core/authz/support/RelatedProtectedItemFilter.java
URL: http://svn.apache.org/viewvc/directory/apacheds/trunk/core/src/main/java/org/apache/directory/server/core/authz/support/RelatedProtectedItemFilter.java?rev=921600&r1=921599&r2=921600&view=diff
==============================================================================
--- directory/apacheds/trunk/core/src/main/java/org/apache/directory/server/core/authz/support/RelatedProtectedItemFilter.java (original)
+++ directory/apacheds/trunk/core/src/main/java/org/apache/directory/server/core/authz/support/RelatedProtectedItemFilter.java Wed Mar 10 22:37:30 2010
@@ -231,7 +231,7 @@ public class RelatedProtectedItemFilter 
             {
                 ProtectedItem.RangeOfValues rov = ( ProtectedItem.RangeOfValues ) item;
                 
-                if ( entryEvaluator.evaluate( rov.getFilter(), entryName.toString(), entry ) )
+                if ( entryEvaluator.evaluate( rov.getFilter(), entryName.getNormName(), entry ) )
                 {
                     return true;
                 }

Modified: directory/apacheds/trunk/core/src/main/java/org/apache/directory/server/core/journal/JournalInterceptor.java
URL: http://svn.apache.org/viewvc/directory/apacheds/trunk/core/src/main/java/org/apache/directory/server/core/journal/JournalInterceptor.java?rev=921600&r1=921599&r2=921600&view=diff
==============================================================================
--- directory/apacheds/trunk/core/src/main/java/org/apache/directory/server/core/journal/JournalInterceptor.java (original)
+++ directory/apacheds/trunk/core/src/main/java/org/apache/directory/server/core/journal/JournalInterceptor.java Wed Mar 10 22:37:30 2010
@@ -295,7 +295,7 @@ public class JournalInterceptor extends 
             ldif.setDn( opContext.getDn() );
             ldif.setNewRdn( opContext.getNewRdn().toString() );
             ldif.setDeleteOldRdn( opContext.getDelOldDn() );
-            ldif.setNewSuperior( opContext.getNewDn().toString() );
+            ldif.setNewSuperior( opContext.getNewDn().getNormName() );
             
             journal.log( getPrincipal(), opRevision, ldif );
         }
@@ -337,7 +337,7 @@ public class JournalInterceptor extends 
             LdifEntry ldif = new LdifEntry();
             ldif.setChangeType( ChangeType.ModDn );
             ldif.setDn( opContext.getDn() );
-            ldif.setNewSuperior( opContext.getParent().toString() );
+            ldif.setNewSuperior( opContext.getParent().getNormName() );
             
             journal.log( getPrincipal(), opRevision, ldif );
         }

Modified: directory/apacheds/trunk/core/src/main/java/org/apache/directory/server/core/partition/DefaultPartitionNexus.java
URL: http://svn.apache.org/viewvc/directory/apacheds/trunk/core/src/main/java/org/apache/directory/server/core/partition/DefaultPartitionNexus.java?rev=921600&r1=921599&r2=921600&view=diff
==============================================================================
--- directory/apacheds/trunk/core/src/main/java/org/apache/directory/server/core/partition/DefaultPartitionNexus.java (original)
+++ directory/apacheds/trunk/core/src/main/java/org/apache/directory/server/core/partition/DefaultPartitionNexus.java Wed Mar 10 22:37:30 2010
@@ -925,7 +925,7 @@ public class DefaultPartitionNexus imple
                 throw new ConfigurationException( I18n.err( I18n.ERR_267, partition.getId() ) );
             }
             
-            partitions.put( partitionSuffix.toString(), partition );
+            partitions.put( partitionSuffix.getNormName(), partition );
             partitionLookupTree.add( partition.getSuffixDn(), partition );
 
             EntryAttribute namingContexts = rootDSE.get( SchemaConstants.NAMING_CONTEXTS_AT );

Modified: directory/apacheds/trunk/core/src/main/java/org/apache/directory/server/core/subtree/SubentryInterceptor.java
URL: http://svn.apache.org/viewvc/directory/apacheds/trunk/core/src/main/java/org/apache/directory/server/core/subtree/SubentryInterceptor.java?rev=921600&r1=921599&r2=921600&view=diff
==============================================================================
--- directory/apacheds/trunk/core/src/main/java/org/apache/directory/server/core/subtree/SubentryInterceptor.java (original)
+++ directory/apacheds/trunk/core/src/main/java/org/apache/directory/server/core/subtree/SubentryInterceptor.java Wed Mar 10 22:37:30 2010
@@ -198,7 +198,7 @@ public class SubentryInterceptor extends
                 }
 
                 dnName.normalize( schemaManager.getNormalizerMapping() );
-                subentryCache.setSubentry( dnName.toString(), ss, getSubentryTypes( subentry ) );
+                subentryCache.setSubentry( dnName.getNormName(), ss, getSubentryTypes( subentry ) );
             }
         }
     }
@@ -353,7 +353,7 @@ public class SubentryInterceptor extends
                         subentryAttrs.put( operational );
                     }
 
-                    operational.add( subentryDn.toString() );
+                    operational.add( subentryDn.getNormName() );
                 }
                 if ( subentry.isSchemaSubentry() )
                 {
@@ -366,7 +366,7 @@ public class SubentryInterceptor extends
                         subentryAttrs.put( operational );
                     }
 
-                    operational.add( subentryDn.toString() );
+                    operational.add( subentryDn.getNormName() );
                 }
                 if ( subentry.isCollectiveSubentry() )
                 {
@@ -379,7 +379,7 @@ public class SubentryInterceptor extends
                         subentryAttrs.put( operational );
                     }
 
-                    operational.add( subentryDn.toString() );
+                    operational.add( subentryDn.getNormName() );
                 }
                 if ( subentry.isTriggerSubentry() )
                 {
@@ -392,7 +392,7 @@ public class SubentryInterceptor extends
                         subentryAttrs.put( operational );
                     }
 
-                    operational.add( subentryDn.toString() );
+                    operational.add( subentryDn.getNormName() );
                 }
             }
         }
@@ -527,7 +527,7 @@ public class SubentryInterceptor extends
                             entry.put( operational );
                         }
 
-                        operational.add( subentryDn.toString() );
+                        operational.add( subentryDn.getNormName() );
                     }
 
                     if ( subentry.isSchemaSubentry() )
@@ -541,7 +541,7 @@ public class SubentryInterceptor extends
                             entry.put( operational );
                         }
 
-                        operational.add( subentryDn.toString() );
+                        operational.add( subentryDn.getNormName() );
                     }
 
                     if ( subentry.isCollectiveSubentry() )
@@ -555,7 +555,7 @@ public class SubentryInterceptor extends
                             entry.put( operational );
                         }
 
-                        operational.add( subentryDn.toString() );
+                        operational.add( subentryDn.getNormName() );
                     }
 
                     if ( subentry.isTriggerSubentry() )
@@ -569,7 +569,7 @@ public class SubentryInterceptor extends
                             entry.put( operational );
                         }
 
-                        operational.add( subentryDn.toString() );
+                        operational.add( subentryDn.getNormName() );
                     }
                 }
             }
@@ -920,7 +920,7 @@ public class SubentryInterceptor extends
 
         if ( objectClasses.contains( SchemaConstants.SUBENTRY_OC ) )
         {
-            Subentry subentry = subentryCache.getSubentry( oriChildName.toString() );
+            Subentry subentry = subentryCache.getSubentry( oriChildName.getNormName() );
             SubtreeSpecification ss = subentry.getSubtreeSpecification();
             DN apName = ( DN ) oriChildName.clone();
             apName.remove( apName.size() - 1 );
@@ -1052,7 +1052,7 @@ public class SubentryInterceptor extends
 
         if ( objectClasses.contains( SchemaConstants.SUBENTRY_OC ) && isSubtreeSpecificationModification )
         {
-            SubtreeSpecification ssOld = subentryCache.removeSubentry( name.toString() ).getSubtreeSpecification();
+            SubtreeSpecification ssOld = subentryCache.removeSubentry( name.getNormName() ).getSubtreeSpecification();
             SubtreeSpecification ssNew;
 
             try
@@ -1250,44 +1250,44 @@ public class SubentryInterceptor extends
         {
             if ( operational.get( SchemaConstants.ACCESS_CONTROL_SUBENTRIES_AT ) == null )
             {
-                operational.put( SchemaConstants.ACCESS_CONTROL_SUBENTRIES_AT, name.toString() );
+                operational.put( SchemaConstants.ACCESS_CONTROL_SUBENTRIES_AT, name.getNormName() );
             }
             else
             {
-                operational.get( SchemaConstants.ACCESS_CONTROL_SUBENTRIES_AT ).add( name.toString() );
+                operational.get( SchemaConstants.ACCESS_CONTROL_SUBENTRIES_AT ).add( name.getNormName() );
             }
         }
         if ( subentry.isSchemaSubentry() )
         {
             if ( operational.get( SchemaConstants.SUBSCHEMA_SUBENTRY_AT ) == null )
             {
-                operational.put( SchemaConstants.SUBSCHEMA_SUBENTRY_AT, name.toString() );
+                operational.put( SchemaConstants.SUBSCHEMA_SUBENTRY_AT, name.getNormName() );
             }
             else
             {
-                operational.get( SchemaConstants.SUBSCHEMA_SUBENTRY_AT ).add( name.toString() );
+                operational.get( SchemaConstants.SUBSCHEMA_SUBENTRY_AT ).add( name.getNormName() );
             }
         }
         if ( subentry.isCollectiveSubentry() )
         {
             if ( operational.get( SchemaConstants.COLLECTIVE_ATTRIBUTE_SUBENTRIES_AT ) == null )
             {
-                operational.put( SchemaConstants.COLLECTIVE_ATTRIBUTE_SUBENTRIES_AT, name.toString() );
+                operational.put( SchemaConstants.COLLECTIVE_ATTRIBUTE_SUBENTRIES_AT, name.getNormName() );
             }
             else
             {
-                operational.get( SchemaConstants.COLLECTIVE_ATTRIBUTE_SUBENTRIES_AT ).add( name.toString() );
+                operational.get( SchemaConstants.COLLECTIVE_ATTRIBUTE_SUBENTRIES_AT ).add( name.getNormName() );
             }
         }
         if ( subentry.isTriggerSubentry() )
         {
             if ( operational.get( SchemaConstants.TRIGGER_EXECUTION_SUBENTRIES_AT ) == null )
             {
-                operational.put( SchemaConstants.TRIGGER_EXECUTION_SUBENTRIES_AT, name.toString() );
+                operational.put( SchemaConstants.TRIGGER_EXECUTION_SUBENTRIES_AT, name.getNormName() );
             }
             else
             {
-                operational.get( SchemaConstants.TRIGGER_EXECUTION_SUBENTRIES_AT ).add( name.toString() );
+                operational.get( SchemaConstants.TRIGGER_EXECUTION_SUBENTRIES_AT ).add( name.getNormName() );
             }
         }
 
@@ -1406,7 +1406,7 @@ public class SubentryInterceptor extends
 
             DN ndn = new DN( dn );
             ndn.normalize( schemaManager.getNormalizerMapping() );
-            String normalizedDn = ndn.toString();
+            String normalizedDn = ndn.getNormName();
             return !subentryCache.hasSubentry( normalizedDn );
         }
     }

Modified: directory/apacheds/trunk/core/src/main/java/org/apache/directory/server/core/trigger/TriggerSpecCache.java
URL: http://svn.apache.org/viewvc/directory/apacheds/trunk/core/src/main/java/org/apache/directory/server/core/trigger/TriggerSpecCache.java?rev=921600&r1=921599&r2=921600&view=diff
==============================================================================
--- directory/apacheds/trunk/core/src/main/java/org/apache/directory/server/core/trigger/TriggerSpecCache.java (original)
+++ directory/apacheds/trunk/core/src/main/java/org/apache/directory/server/core/trigger/TriggerSpecCache.java Wed Mar 10 22:37:30 2010
@@ -195,7 +195,7 @@ public class TriggerSpecCache
             
         }
         
-        triggerSpecs.put( normName.toString(), subentryTriggerSpecs );
+        triggerSpecs.put( normName.getNormName(), subentryTriggerSpecs );
     }
 
 
@@ -248,6 +248,6 @@ public class TriggerSpecCache
 
     public void subentryRenamed( DN oldName, DN newName )
     {
-        triggerSpecs.put( newName.toString(), triggerSpecs.remove( oldName.toString() ) );
+        triggerSpecs.put( newName.getNormName(), triggerSpecs.remove( oldName.getNormName() ) );
     }
 }

Modified: directory/apacheds/trunk/jdbm-store/src/main/java/org/apache/directory/server/core/partition/impl/btree/jdbm/JdbmStore.java
URL: http://svn.apache.org/viewvc/directory/apacheds/trunk/jdbm-store/src/main/java/org/apache/directory/server/core/partition/impl/btree/jdbm/JdbmStore.java?rev=921600&r1=921599&r2=921600&view=diff
==============================================================================
--- directory/apacheds/trunk/jdbm-store/src/main/java/org/apache/directory/server/core/partition/impl/btree/jdbm/JdbmStore.java (original)
+++ directory/apacheds/trunk/jdbm-store/src/main/java/org/apache/directory/server/core/partition/impl/btree/jdbm/JdbmStore.java Wed Mar 10 22:37:30 2010
@@ -1226,7 +1226,7 @@ public class JdbmStore<E> implements Sto
         {
             parentDn = ( DN ) entryDn.clone();
             parentDn.remove( parentDn.size() - 1 );
-            parentId = getEntryId( parentDn.toString() );
+            parentId = getEntryId( parentDn.getNormName() );
         }
 
         // don't keep going if we cannot find the parent Id
@@ -1701,7 +1701,7 @@ public class JdbmStore<E> implements Sto
             throw new Exception( I18n.err( I18n.ERR_215 ) );
         }
 
-        Long id = getEntryId( dn.toString() );
+        Long id = getEntryId( dn.getNormName() );
         ServerEntry entry = ( ServerEntry ) master.get( id );
 
         for ( AttributeType attributeType : mods.getAttributeTypes() )
@@ -1739,7 +1739,7 @@ public class JdbmStore<E> implements Sto
 
     public void modify( DN dn, List<Modification> mods ) throws Exception
     {
-        Long id = getEntryId( dn.toString() );
+        Long id = getEntryId( dn.getNormName() );
         ServerEntry entry = ( ServerEntry ) master.get( id );
 
         for ( Modification mod : mods )
@@ -2007,7 +2007,7 @@ public class JdbmStore<E> implements Sto
 
     public void move( DN oldChildDn, DN newParentDn, RDN newRdn, boolean deleteOldRdn ) throws Exception
     {
-        Long childId = getEntryId( oldChildDn.toString() );
+        Long childId = getEntryId( oldChildDn.getNormName() );
         rename( oldChildDn, newRdn, deleteOldRdn );
         DN newUpdn = move( oldChildDn, childId, newParentDn );
 
@@ -2025,7 +2025,7 @@ public class JdbmStore<E> implements Sto
 
     public void move( DN oldChildDn, DN newParentDn ) throws Exception
     {
-        Long childId = getEntryId( oldChildDn.toString() );
+        Long childId = getEntryId( oldChildDn.getNormName() );
         DN newUpdn = move( oldChildDn, childId, newParentDn );
 
         // Update the current entry
@@ -2057,7 +2057,7 @@ public class JdbmStore<E> implements Sto
     private DN move( DN oldChildDn, Long childId, DN newParentDn ) throws Exception
     {
         // Get the child and the new parent to be entries and Ids
-        Long newParentId = getEntryId( newParentDn.toString() );
+        Long newParentId = getEntryId( newParentDn.getNormName() );
         Long oldParentId = getParentId( childId );
 
         /*
@@ -2178,7 +2178,7 @@ public class JdbmStore<E> implements Sto
         //            }
         //        };
 
-        Long movedBaseId = getEntryId( movedBase.toString() );
+        Long movedBaseId = getEntryId( movedBase.getNormName() );
 
         if ( aliasIdx.reverseLookup( movedBaseId ) != null )
         {
@@ -2217,7 +2217,7 @@ public class JdbmStore<E> implements Sto
          * moved base.  This is the first ancestor effected by the move.
          */
         DN ancestorDn = ( DN ) movedBase.getPrefix( 1 );
-        Long ancestorId = getEntryId( ancestorDn.toString() );
+        Long ancestorId = getEntryId( ancestorDn.getNormName() );
 
         /*
          * We cannot just drop all tuples in the one level and subtree userIndices
@@ -2241,7 +2241,7 @@ public class JdbmStore<E> implements Sto
         while ( !ancestorDn.equals( upSuffix ) )
         {
             ancestorDn = ( DN ) ancestorDn.getPrefix( 1 );
-            ancestorId = getEntryId( ancestorDn.toString() );
+            ancestorId = getEntryId( ancestorDn.getNormName() );
 
             subAliasIdx.drop( ancestorId, targetId );
         }

Modified: directory/apacheds/trunk/xdbm-search/src/main/java/org/apache/directory/server/xdbm/search/impl/DefaultSearchEngine.java
URL: http://svn.apache.org/viewvc/directory/apacheds/trunk/xdbm-search/src/main/java/org/apache/directory/server/xdbm/search/impl/DefaultSearchEngine.java?rev=921600&r1=921599&r2=921600&view=diff
==============================================================================
--- directory/apacheds/trunk/xdbm-search/src/main/java/org/apache/directory/server/xdbm/search/impl/DefaultSearchEngine.java (original)
+++ directory/apacheds/trunk/xdbm-search/src/main/java/org/apache/directory/server/xdbm/search/impl/DefaultSearchEngine.java Wed Mar 10 22:37:30 2010
@@ -100,7 +100,7 @@ public class DefaultSearchEngine<ID> imp
         SearchControls searchCtls ) throws Exception
     {
         DN effectiveBase;
-        ID baseId = db.getEntryId( base.toString() );
+        ID baseId = db.getEntryId( base.getNormName() );
 
         // Check that we have an entry, otherwise we can immediately get out
         if ( baseId == null )
@@ -164,7 +164,7 @@ public class DefaultSearchEngine<ID> imp
 
         // Add the scope node using the effective base to the filter
         BranchNode root = new AndNode();
-        ExprNode node = new ScopeNode( aliasDerefMode, effectiveBase.toString(), SearchScope.getSearchScope( searchCtls
+        ExprNode node = new ScopeNode( aliasDerefMode, effectiveBase.getNormName(), SearchScope.getSearchScope( searchCtls
             .getSearchScope() ) );
         root.getChildren().add( node );
         root.getChildren().add( filter );

Modified: directory/apacheds/trunk/xdbm-tools/src/main/java/org/apache/directory/server/core/partition/impl/btree/gui/PartitionFrame.java
URL: http://svn.apache.org/viewvc/directory/apacheds/trunk/xdbm-tools/src/main/java/org/apache/directory/server/core/partition/impl/btree/gui/PartitionFrame.java?rev=921600&r1=921599&r2=921600&view=diff
==============================================================================
--- directory/apacheds/trunk/xdbm-tools/src/main/java/org/apache/directory/server/core/partition/impl/btree/gui/PartitionFrame.java (original)
+++ directory/apacheds/trunk/xdbm-tools/src/main/java/org/apache/directory/server/core/partition/impl/btree/gui/PartitionFrame.java Wed Mar 10 22:37:30 2010
@@ -470,7 +470,7 @@ public class PartitionFrame extends JFra
 
                 ServerEntry attrs = new DefaultServerEntry( schemaManager, entry.getEntry() );
 
-                if ( null == partition.getEntryId( ndn.toString() ) )
+                if ( null == partition.getEntryId( ndn.getNormName() ) )
                 {
                     partition.add( new AddOperationContext( null, attrs ) );
                     load();

Modified: directory/shared/trunk/dsml-parser/src/test/java/org/apache/directory/shared/dsmlv2/addRequest/AddRequestTest.java
URL: http://svn.apache.org/viewvc/directory/shared/trunk/dsml-parser/src/test/java/org/apache/directory/shared/dsmlv2/addRequest/AddRequestTest.java?rev=921600&r1=921599&r2=921600&view=diff
==============================================================================
--- directory/shared/trunk/dsml-parser/src/test/java/org/apache/directory/shared/dsmlv2/addRequest/AddRequestTest.java (original)
+++ directory/shared/trunk/dsml-parser/src/test/java/org/apache/directory/shared/dsmlv2/addRequest/AddRequestTest.java Wed Mar 10 22:37:30 2010
@@ -78,7 +78,7 @@ public class AddRequestTest extends Abst
 
         AddRequestCodec addRequest = ( AddRequestCodec ) parser.getBatchRequest().getCurrentRequest();
 
-        assertEquals( "cn=Bob Rush,ou=Dev,dc=Example,dc=COM", addRequest.getEntryDn().toString() );
+        assertEquals( "cn=Bob Rush,ou=Dev,dc=Example,dc=COM", addRequest.getEntryDn().getNormName() );
     }
 
 

Modified: directory/shared/trunk/dsml-parser/src/test/java/org/apache/directory/shared/dsmlv2/authRequest/AuthRequestTest.java
URL: http://svn.apache.org/viewvc/directory/shared/trunk/dsml-parser/src/test/java/org/apache/directory/shared/dsmlv2/authRequest/AuthRequestTest.java?rev=921600&r1=921599&r2=921600&view=diff
==============================================================================
--- directory/shared/trunk/dsml-parser/src/test/java/org/apache/directory/shared/dsmlv2/authRequest/AuthRequestTest.java (original)
+++ directory/shared/trunk/dsml-parser/src/test/java/org/apache/directory/shared/dsmlv2/authRequest/AuthRequestTest.java Wed Mar 10 22:37:30 2010
@@ -74,7 +74,7 @@ public class AuthRequestTest extends Abs
 
         BindRequestCodec bindRequest = ( BindRequestCodec ) parser.getBatchRequest().getCurrentRequest();
 
-        assertEquals( "cn=Bob Rush,ou=Dev,dc=Example,dc=COM", bindRequest.getName().toString() );
+        assertEquals( "cn=Bob Rush,ou=Dev,dc=Example,dc=COM", bindRequest.getName().getNormName() );
     }
 
 

Modified: directory/shared/trunk/dsml-parser/src/test/java/org/apache/directory/shared/dsmlv2/compareRequest/CompareRequestTest.java
URL: http://svn.apache.org/viewvc/directory/shared/trunk/dsml-parser/src/test/java/org/apache/directory/shared/dsmlv2/compareRequest/CompareRequestTest.java?rev=921600&r1=921599&r2=921600&view=diff
==============================================================================
--- directory/shared/trunk/dsml-parser/src/test/java/org/apache/directory/shared/dsmlv2/compareRequest/CompareRequestTest.java (original)
+++ directory/shared/trunk/dsml-parser/src/test/java/org/apache/directory/shared/dsmlv2/compareRequest/CompareRequestTest.java Wed Mar 10 22:37:30 2010
@@ -75,7 +75,7 @@ public class CompareRequestTest extends 
 
         CompareRequestCodec compareRequest = ( CompareRequestCodec ) parser.getBatchRequest().getCurrentRequest();
 
-        assertEquals( "cn=Bob Rush,ou=Dev,dc=Example,dc=COM", compareRequest.getEntry().toString() );
+        assertEquals( "cn=Bob Rush,ou=Dev,dc=Example,dc=COM", compareRequest.getEntry().getNormName() );
     }
 
 
@@ -314,7 +314,7 @@ public class CompareRequestTest extends 
 
         CompareRequestCodec compareRequest = ( CompareRequestCodec ) parser.getBatchRequest().getCurrentRequest();
 
-        assertEquals( "cn=Bob Rush,ou=Dev,dc=Example,dc=COM", ( String ) compareRequest.getEntry().toString() );
+        assertEquals( "cn=Bob Rush,ou=Dev,dc=Example,dc=COM", compareRequest.getEntry().getNormName() );
 
         assertEquals( "sn", ( String ) compareRequest.getAttributeDesc() );
 
@@ -345,7 +345,7 @@ public class CompareRequestTest extends 
 
         CompareRequestCodec compareRequest = ( CompareRequestCodec ) parser.getBatchRequest().getCurrentRequest();
 
-        assertEquals( "cn=Bob Rush,ou=Dev,dc=Example,dc=COM", ( String ) compareRequest.getEntry().toString() );
+        assertEquals( "cn=Bob Rush,ou=Dev,dc=Example,dc=COM", compareRequest.getEntry().getNormName() );
 
         assertEquals( "sn", ( String ) compareRequest.getAttributeDesc() );
 
@@ -376,7 +376,7 @@ public class CompareRequestTest extends 
 
         CompareRequestCodec compareRequest = ( CompareRequestCodec ) parser.getBatchRequest().getCurrentRequest();
 
-        assertEquals( "cn=Bob Rush,ou=Dev,dc=Example,dc=COM", ( String ) compareRequest.getEntry().toString() );
+        assertEquals( "cn=Bob Rush,ou=Dev,dc=Example,dc=COM", compareRequest.getEntry().getNormName() );
 
         assertEquals( "sn", ( String ) compareRequest.getAttributeDesc() );
 

Modified: directory/shared/trunk/dsml-parser/src/test/java/org/apache/directory/shared/dsmlv2/delRequest/DelRequestTest.java
URL: http://svn.apache.org/viewvc/directory/shared/trunk/dsml-parser/src/test/java/org/apache/directory/shared/dsmlv2/delRequest/DelRequestTest.java?rev=921600&r1=921599&r2=921600&view=diff
==============================================================================
--- directory/shared/trunk/dsml-parser/src/test/java/org/apache/directory/shared/dsmlv2/delRequest/DelRequestTest.java (original)
+++ directory/shared/trunk/dsml-parser/src/test/java/org/apache/directory/shared/dsmlv2/delRequest/DelRequestTest.java Wed Mar 10 22:37:30 2010
@@ -74,7 +74,7 @@ public class DelRequestTest extends Abst
 
         DelRequestCodec delRequest = ( DelRequestCodec ) parser.getBatchRequest().getCurrentRequest();
 
-        assertEquals( "cn=Bob Rush,ou=Dev,dc=Example,dc=COM", delRequest.getEntry().toString() );
+        assertEquals( "cn=Bob Rush,ou=Dev,dc=Example,dc=COM", delRequest.getEntry().getNormName() );
     }
 
 

Modified: directory/shared/trunk/dsml-parser/src/test/java/org/apache/directory/shared/dsmlv2/modDNRequest/ModifyDNRequestTest.java
URL: http://svn.apache.org/viewvc/directory/shared/trunk/dsml-parser/src/test/java/org/apache/directory/shared/dsmlv2/modDNRequest/ModifyDNRequestTest.java?rev=921600&r1=921599&r2=921600&view=diff
==============================================================================
--- directory/shared/trunk/dsml-parser/src/test/java/org/apache/directory/shared/dsmlv2/modDNRequest/ModifyDNRequestTest.java (original)
+++ directory/shared/trunk/dsml-parser/src/test/java/org/apache/directory/shared/dsmlv2/modDNRequest/ModifyDNRequestTest.java Wed Mar 10 22:37:30 2010
@@ -276,7 +276,7 @@ public class ModifyDNRequestTest extends
 
         ModifyDNRequestCodec modifyDNRequest = ( ModifyDNRequestCodec ) parser.getBatchRequest().getCurrentRequest();
 
-        assertEquals( "cn=Bob Rush,ou=Dev,dc=Example,dc=COM", modifyDNRequest.getEntry().toString() );
+        assertEquals( "cn=Bob Rush,ou=Dev,dc=Example,dc=COM", modifyDNRequest.getEntry().getNormName() );
 
         assertEquals( "cn=Steve Jobs", modifyDNRequest.getNewRDN().toString() );
     }
@@ -423,7 +423,7 @@ public class ModifyDNRequestTest extends
 
         ModifyDNRequestCodec modifyDNRequest = ( ModifyDNRequestCodec ) parser.getBatchRequest().getCurrentRequest();
 
-        assertEquals( "cn=Steve Jobs,ou=Dev,dc=apple,dc=com", modifyDNRequest.getNewSuperior().toString() );
+        assertEquals( "cn=Steve Jobs,ou=Dev,dc=apple,dc=com", modifyDNRequest.getNewSuperior().getNormName() );
     }
 
 

Modified: directory/shared/trunk/ldap/src/main/java/org/apache/directory/shared/ldap/codec/LdapResultCodec.java
URL: http://svn.apache.org/viewvc/directory/shared/trunk/ldap/src/main/java/org/apache/directory/shared/ldap/codec/LdapResultCodec.java?rev=921600&r1=921599&r2=921600&view=diff
==============================================================================
--- directory/shared/trunk/ldap/src/main/java/org/apache/directory/shared/ldap/codec/LdapResultCodec.java (original)
+++ directory/shared/trunk/ldap/src/main/java/org/apache/directory/shared/ldap/codec/LdapResultCodec.java Wed Mar 10 22:37:30 2010
@@ -173,7 +173,7 @@ public class LdapResultCodec extends Abs
      */
     public String getMatchedDN()
     {
-        return ( ( matchedDN == null ) ? "" : matchedDN.toString() );
+        return ( ( matchedDN == null ) ? "" : matchedDN.getNormName() );
     }
 
 

Modified: directory/shared/trunk/ldap/src/main/java/org/apache/directory/shared/ldap/codec/bind/BindRequestCodec.java
URL: http://svn.apache.org/viewvc/directory/shared/trunk/ldap/src/main/java/org/apache/directory/shared/ldap/codec/bind/BindRequestCodec.java?rev=921600&r1=921599&r2=921600&view=diff
==============================================================================
--- directory/shared/trunk/ldap/src/main/java/org/apache/directory/shared/ldap/codec/bind/BindRequestCodec.java (original)
+++ directory/shared/trunk/ldap/src/main/java/org/apache/directory/shared/ldap/codec/bind/BindRequestCodec.java Wed Mar 10 22:37:30 2010
@@ -269,7 +269,7 @@ public class BindRequestCodec extends Ld
         sb.append( "    BindRequest\n" );
         sb.append( "        Version : '" ).append( version ).append( "'\n" );
 
-        if ( ( null == name ) || StringTools.isEmpty( name.toString() ) )
+        if ( ( null == name ) || StringTools.isEmpty( name.getNormName() ) )
         {
             sb.append( "        Name : anonymous" );
         }

Modified: directory/shared/trunk/ldap/src/main/java/org/apache/directory/shared/ldap/message/BindRequestImpl.java
URL: http://svn.apache.org/viewvc/directory/shared/trunk/ldap/src/main/java/org/apache/directory/shared/ldap/message/BindRequestImpl.java?rev=921600&r1=921599&r2=921600&view=diff
==============================================================================
--- directory/shared/trunk/ldap/src/main/java/org/apache/directory/shared/ldap/message/BindRequestImpl.java (original)
+++ directory/shared/trunk/ldap/src/main/java/org/apache/directory/shared/ldap/message/BindRequestImpl.java Wed Mar 10 22:37:30 2010
@@ -416,7 +416,7 @@ public class BindRequestImpl extends Abs
         sb.append( "    BindRequest\n" );
         sb.append( "        Version : '" ).append( isVersion3 ? "3" : "2" ).append( "'\n" );
 
-        if ( StringTools.isEmpty( name.toString() ) && isSimple )
+        if ( StringTools.isEmpty( name.getNormName() ) && isSimple )
         {
             sb.append( "        Name : anonymous\n" );
         }

Modified: directory/shared/trunk/ldap/src/main/java/org/apache/directory/shared/ldap/name/DN.java
URL: http://svn.apache.org/viewvc/directory/shared/trunk/ldap/src/main/java/org/apache/directory/shared/ldap/name/DN.java?rev=921600&r1=921599&r2=921600&view=diff
==============================================================================
--- directory/shared/trunk/ldap/src/main/java/org/apache/directory/shared/ldap/name/DN.java (original)
+++ directory/shared/trunk/ldap/src/main/java/org/apache/directory/shared/ldap/name/DN.java Wed Mar 10 22:37:30 2010
@@ -49,7 +49,7 @@ import org.slf4j.LoggerFactory;
  * "UTF-8 String Representation of Distinguished Names".
  *
  * We will store two representation of a DN :
- * - a user Provider represeentation, which is the parsed String given by a user
+ * - a user Provider representation, which is the parsed String given by a user
  * - an internal representation.
  *
  * A DN is formed of RDNs, in a specific order :
@@ -357,11 +357,10 @@ public class DN implements Name, Externa
      * getNormName method
      *
      * @return A String representing the normalized DN
-     * @TODO : use the getName() method instead
      */
     public String toString()
     {
-        return getNormName();
+        return getName();
     }
 
 
@@ -534,18 +533,6 @@ public class DN implements Name, Externa
 
 
     /**
-     * Get the initial DN (without normalization)
-     *
-     * @return The DN as a String
-     * @deprecated
-     */
-    public String getUpName()
-    {
-        return ( upName == null ? "" : upName );
-    }
-
-
-    /**
      * Sets the up name.
      * 
      * @param upName the new up name

Modified: directory/shared/trunk/ldap/src/test/java/org/apache/directory/shared/ldap/name/DNTest.java
URL: http://svn.apache.org/viewvc/directory/shared/trunk/ldap/src/test/java/org/apache/directory/shared/ldap/name/DNTest.java?rev=921600&r1=921599&r2=921600&view=diff
==============================================================================
--- directory/shared/trunk/ldap/src/test/java/org/apache/directory/shared/ldap/name/DNTest.java (original)
+++ directory/shared/trunk/ldap/src/test/java/org/apache/directory/shared/ldap/name/DNTest.java Wed Mar 10 22:37:30 2010
@@ -134,7 +134,7 @@ public class DNTest
 
         assertTrue( DN.isValid( "a = b" ) );
         assertEquals( "a = b", dn.getName() );
-        assertEquals( "a=b", dn.toString() );
+        assertEquals( "a=b", dn.getNormName() );
     }
 
 
@@ -148,7 +148,7 @@ public class DNTest
 
         assertTrue( DN.isValid( "a = b  " ) );
         assertEquals( "a = b  ", dn.getName() );
-        assertEquals( "a=b", dn.toString() );
+        assertEquals( "a=b", dn.getNormName() );
     }
 
 
@@ -161,7 +161,7 @@ public class DNTest
         DN dn = new DN( "a = b, c = d" );
 
         assertTrue( DN.isValid( "a = b, c = d" ) );
-        assertEquals( "a=b,c=d", dn.toString() );
+        assertEquals( "a=b,c=d", dn.getNormName() );
         assertEquals( "a = b, c = d", dn.getName() );
     }
 
@@ -175,7 +175,7 @@ public class DNTest
         DN dn = new DN( "a = b  , c = d" );
 
         assertTrue( DN.isValid( "a = b  , c = d" ) );
-        assertEquals( "a=b,c=d", dn.toString() );
+        assertEquals( "a=b,c=d", dn.getNormName() );
         assertEquals( "a = b  , c = d", dn.getName() );
     }
 
@@ -189,7 +189,7 @@ public class DNTest
         DN dn = new DN( "a=b, a =b, a= b, a = b, a  =  b" );
 
         assertTrue( DN.isValid( "a=b, a =b, a= b, a = b, a  =  b" ) );
-        assertEquals( "a=b,a=b,a=b,a=b,a=b", dn.toString() );
+        assertEquals( "a=b,a=b,a=b,a=b,a=b", dn.getNormName() );
         assertEquals( "a=b, a =b, a= b, a = b, a  =  b", dn.getName() );
     }
 
@@ -204,7 +204,7 @@ public class DNTest
         DN dn = new DN( "a=b;c=d,e=f" );
 
         assertTrue( DN.isValid( "a=b;c=d,e=f" ) );
-        assertEquals( "a=b,c=d,e=f", dn.toString() );
+        assertEquals( "a=b,c=d,e=f", dn.getNormName() );
         assertEquals( "a=b;c=d,e=f", dn.getName() );
     }
 
@@ -218,7 +218,7 @@ public class DNTest
         DN dn = new DN( "a = b + c = d" );
 
         assertTrue( DN.isValid( "a = b + c = d" ) );
-        assertEquals( "a=b+c=d", dn.toString() );
+        assertEquals( "a=b+c=d", dn.getNormName() );
         assertEquals( "a = b + c = d", dn.getName() );
     }
 
@@ -233,7 +233,7 @@ public class DNTest
         DN dn = new DN( "a=b+c=d, e=f + g=h + i=j" );
 
         assertTrue( DN.isValid( "a=b+c=d, e=f + g=h + i=j" ) );
-        assertEquals( "a=b+c=d,e=f+g=h+i=j", dn.toString() );
+        assertEquals( "a=b+c=d,e=f+g=h+i=j", dn.getNormName() );
         assertEquals( "a=b+c=d, e=f + g=h + i=j", dn.getName() );
     }
 
@@ -263,7 +263,7 @@ public class DNTest
         DN dn = new DN( "OID.12.34.56 = azerty" );
 
         assertTrue( DN.isValid( "OID.12.34.56 = azerty" ) );
-        assertEquals( "oid.12.34.56=azerty", dn.toString() );
+        assertEquals( "oid.12.34.56=azerty", dn.getNormName() );
         assertEquals( "OID.12.34.56 = azerty", dn.getName() );
     }
 
@@ -277,7 +277,7 @@ public class DNTest
         DN dn = new DN( "oid.12.34.56 = azerty" );
 
         assertTrue( DN.isValid( "oid.12.34.56 = azerty" ) );
-        assertEquals( "oid.12.34.56=azerty", dn.toString() );
+        assertEquals( "oid.12.34.56=azerty", dn.getNormName() );
         assertEquals( "oid.12.34.56 = azerty", dn.getName() );
     }
 
@@ -292,7 +292,7 @@ public class DNTest
         DN dn = new DN( "12.34.56 = azerty" );
 
         assertTrue( DN.isValid( "12.34.56 = azerty" ) );
-        assertEquals( "12.34.56=azerty", dn.toString() );
+        assertEquals( "12.34.56=azerty", dn.getNormName() );
         assertEquals( "12.34.56 = azerty", dn.getName() );
     }
 
@@ -307,7 +307,7 @@ public class DNTest
         DN dn = new DN( "12.34.56 = azerty; 7.8 = test" );
 
         assertTrue( DN.isValid( "12.34.56 = azerty; 7.8 = test" ) );
-        assertEquals( "12.34.56=azerty,7.8=test", dn.toString() );
+        assertEquals( "12.34.56=azerty,7.8=test", dn.getNormName() );
         assertEquals( "12.34.56 = azerty; 7.8 = test", dn.getName() );
     }
 
@@ -321,7 +321,7 @@ public class DNTest
         DN dn = new DN( "a = \\,\\=\\+\\<\\>\\#\\;\\\\\\\"\\C4\\8D" );
 
         assertTrue( DN.isValid( "a = \\,\\=\\+\\<\\>\\#\\;\\\\\\\"\\C4\\8D" ) );
-        assertEquals( "a=\\,=\\+\\<\\>#\\;\\\\\\\"\u010D", dn.toString() );
+        assertEquals( "a=\\,=\\+\\<\\>#\\;\\\\\\\"\u010D", dn.getNormName() );
         assertEquals( "a = \\,\\=\\+\\<\\>\\#\\;\\\\\\\"\\C4\\8D", dn.getName() );
     }
 
@@ -335,7 +335,7 @@ public class DNTest
         DN dn = new DN( "SN=Lu\\C4\\8Di\\C4\\87" );
 
         assertTrue( DN.isValid( "SN=Lu\\C4\\8Di\\C4\\87" ) );
-        assertEquals( "sn=Lu\u010Di\u0107", dn.toString() );
+        assertEquals( "sn=Lu\u010Di\u0107", dn.getNormName() );
         assertEquals( "SN=Lu\\C4\\8Di\\C4\\87", dn.getName() );
     }
 
@@ -349,7 +349,7 @@ public class DNTest
         DN dn = new DN( "a = #0010A0AAFF" );
 
         assertTrue( DN.isValid( "a = #0010A0AAFF" ) );
-        assertEquals( "a=#0010A0AAFF", dn.toString() );
+        assertEquals( "a=#0010A0AAFF", dn.getNormName() );
         assertEquals( "a = #0010A0AAFF", dn.getName() );
     }
 
@@ -366,7 +366,7 @@ public class DNTest
         DN dn = new DN( "a = \\#123456" );
 
         assertTrue( DN.isValid( "a = \\#123456" ) );
-        assertEquals( "a=\\#123456", dn.toString() );
+        assertEquals( "a=\\#123456", dn.getNormName() );
         assertEquals( "a = \\#123456", dn.getName() );
 
         RDN rdn = dn.getRdn();
@@ -393,7 +393,7 @@ public class DNTest
         DN dn = new DN( "a = \\#this is a sharp" );
 
         assertTrue( DN.isValid( "a = \\#this is a sharp" ) );
-        assertEquals( "a=\\#this is a sharp", dn.toString() );
+        assertEquals( "a=\\#this is a sharp", dn.getNormName() );
         assertEquals( "a = \\#this is a sharp", dn.getName() );
 
         RDN rdn = dn.getRdn();
@@ -410,14 +410,14 @@ public class DNTest
         DN dn = new DN( "ou = \\#this is a sharp" );
 
         assertTrue( DN.isValid( "ou = \\#this is a sharp" ) );
-        assertEquals( "ou=\\#this is a sharp", dn.toString() );
+        assertEquals( "ou=\\#this is a sharp", dn.getNormName() );
         assertEquals( "ou = \\#this is a sharp", dn.getName() );
 
         // Check the normalization now
         DN ndn = dn.normalize( oidOids );
 
         assertEquals( "ou = \\#this is a sharp", ndn.getName() );
-        assertEquals( "2.5.4.11=\\#this is a sharp", ndn.toString() );
+        assertEquals( "2.5.4.11=\\#this is a sharp", ndn.getNormName() );
     }
 
 
@@ -430,13 +430,13 @@ public class DNTest
     {
         DN dn = new DN( "ou = AC\\\\DC" );
         assertTrue( DN.isValid( "ou = AC\\\\DC" ) );
-        assertEquals( "ou=AC\\\\DC", dn.toString() );
+        assertEquals( "ou=AC\\\\DC", dn.getNormName() );
         assertEquals( "ou = AC\\\\DC", dn.getName() );
 
         // Check the normalization now
         DN ndn = dn.normalize( oidOids );
         assertEquals( "ou = AC\\\\DC", ndn.getName() );
-        assertEquals( "2.5.4.11=ac\\\\dc", ndn.toString() );
+        assertEquals( "2.5.4.11=ac\\\\dc", ndn.getNormName() );
     }
 
 
@@ -488,7 +488,7 @@ public class DNTest
         DN dn = new DN( "a = quoted \\\"value\\\"" );
 
         assertTrue( DN.isValid( "a = quoted \\\"value\\\"" ) );
-        assertEquals( "a=quoted \\\"value\\\"", dn.toString() );
+        assertEquals( "a=quoted \\\"value\\\"", dn.getNormName() );
         assertEquals( "a = quoted \\\"value\\\"", dn.getName() );
     }
 
@@ -502,7 +502,7 @@ public class DNTest
         DN dn = new DN( "a = \\\" quoted value \\\"" );
 
         assertTrue( DN.isValid( "a = \\\" quoted value \\\"" ) );
-        assertEquals( "a=\\\" quoted value \\\"", dn.toString() );
+        assertEquals( "a=\\\" quoted value \\\"", dn.getNormName() );
         assertEquals( "a = \\\" quoted value \\\"", dn.getName() );
     }
 
@@ -540,7 +540,7 @@ public class DNTest
 
         assertTrue( DN.isValid( "a=b, c=d, e=f" ) );
         assertEquals( "e=f", dn.remove( 0 ).toString() );
-        assertEquals( "a=b,c=d", dn.toString() );
+        assertEquals( "a=b,c=d", dn.getNormName() );
         assertEquals( "a=b, c=d", dn.getName() );
     }
 
@@ -696,7 +696,7 @@ public class DNTest
         DN dn = new DN();
 
         dn.add( "e = f" );
-        assertEquals( "e=f", dn.toString() );
+        assertEquals( "e=f", dn.getNormName() );
         assertEquals( "e = f", dn.getName() );
         assertEquals( 1, dn.size() );
     }
@@ -711,7 +711,7 @@ public class DNTest
         DN dn = new DN( "a=b, c=d" );
 
         dn.add( "e = f" );
-        assertEquals( "e=f,a=b,c=d", dn.toString() );
+        assertEquals( "e=f,a=b,c=d", dn.getNormName() );
         assertEquals( "e = f,a=b, c=d", dn.getName() );
         assertEquals( 3, dn.size() );
     }
@@ -730,7 +730,7 @@ public class DNTest
         // Warning ! The order of AVAs has changed during the parsing
         // This has no impact on the correctness of the DN, but the
         // String used to do the comparizon should be inverted.
-        assertEquals( "e=f+g=h,a=b,c=d", dn.toString() );
+        assertEquals( "e=f+g=h,a=b,c=d", dn.getNormName() );
         assertEquals( 3, dn.size() );
     }
 
@@ -804,7 +804,7 @@ public class DNTest
         DN dn = new DN( "a = b" );
         DN dn2 = new DN();
         dn.addAll( dn2 );
-        assertEquals( "a=b", dn.toString() );
+        assertEquals( "a=b", dn.getNormName() );
         assertEquals( "a = b", dn.getName() );
     }
 
@@ -880,7 +880,7 @@ public class DNTest
         DN dn = new DN( "a = b" );
         DN dn2 = new DN();
         dn.addAll( 0, dn2 );
-        assertEquals( "a=b", dn.toString() );
+        assertEquals( "a=b", dn.getNormName() );
         assertEquals( "a = b", dn.getName() );
     }
 
@@ -1578,7 +1578,7 @@ public class DNTest
         Name name = DnParser.getNameParser().parse( dn );
 
         assertEquals( dn, ( ( DN ) name ).getName() );
-        assertEquals( "cn=Emmanuel  L\u00E9charny", name.toString() );
+        assertEquals( "cn=Emmanuel  L\u00E9charny", ((DN)name).getNormName() );
     }
 
 
@@ -2483,7 +2483,7 @@ public class DNTest
 
         Name result = DN.normalize( name, oids );
 
-        assertTrue( result.toString().equals( "ou=some people,dc=example,dc=com" ) );
+        assertTrue( ((DN)result).getNormName().equals( "ou=some people,dc=example,dc=com" ) );
     }
 
 
@@ -2539,7 +2539,7 @@ public class DNTest
         Name result = DN.normalize( name, oidOids );
 
         assertEquals(
-            result.toString(),
+            ((DN)result).getNormName(),
             "0.9.2342.19200300.100.1.25=and some animals+2.5.4.11=some people,0.9.2342.19200300.100.1.25=example,0.9.2342.19200300.100.1.25=com" );
         assertTrue( ( ( DN ) result )
             .getName()
@@ -2560,7 +2560,7 @@ public class DNTest
         DN result = DN.normalize( name, oidOids );
 
         assertTrue( result
-            .toString()
+            .getNormName()
             .equals(
                 "0.9.2342.19200300.100.1.25=and some animals+2.5.4.11=some people,0.9.2342.19200300.100.1.25=example,0.9.2342.19200300.100.1.25=com" ) );
         assertTrue( result
@@ -2899,7 +2899,7 @@ public class DNTest
         DN dn = new DN( "cn=\" Kylie Minogue \",dc=example,dc=com" );
 
         assertEquals( "cn=\" Kylie Minogue \",dc=example,dc=com", dn.getName() );
-        assertEquals( "cn=\\ Kylie Minogue\\ ,dc=example,dc=com", dn.toString() );
+        assertEquals( "cn=\\ Kylie Minogue\\ ,dc=example,dc=com", dn.getNormName() );
     }
 
 
@@ -2913,7 +2913,7 @@ public class DNTest
         DN dn = new DN( "a=\"b,c\"" );
 
         assertEquals( "a=\"b,c\"", dn.getName() );
-        assertEquals( "a=b\\,c", dn.toString() );
+        assertEquals( "a=b\\,c", dn.getNormName() );
     }
 
 
@@ -2926,7 +2926,7 @@ public class DNTest
     {
         DN name = new DN( "dn= \\ four spaces leading and 3 trailing \\  " );
 
-        assertEquals( "dn=\\ four spaces leading and 3 trailing \\ ", name.toString() );
+        assertEquals( "dn=\\ four spaces leading and 3 trailing \\ ", name.getNormName() );
         assertEquals( "dn= \\ four spaces leading and 3 trailing \\  ", name.getName() );
     }
 
@@ -2990,7 +2990,7 @@ public class DNTest
     {
         DN name = new DN( "dn=a middle \\# pound" );
 
-        assertEquals( "dn=a middle # pound", name.toString() );
+        assertEquals( "dn=a middle # pound", name.getNormName() );
         assertEquals( "dn=a middle \\# pound", name.getName() );
     }
 
@@ -3004,7 +3004,7 @@ public class DNTest
     {
         DN name = new DN( "dn=a trailing pound \\#" );
 
-        assertEquals( "dn=a trailing pound #", name.toString() );
+        assertEquals( "dn=a trailing pound #", name.getNormName() );
         assertEquals( "dn=a trailing pound \\#", name.getName() );
     }
 
@@ -3104,7 +3104,7 @@ public class DNTest
         DN dn1 = new DN( "a=b,c=d,e=f" );
         DN dn2 = new DN( "a=b\\,c\\=d,e=f" );
 
-        assertFalse( dn1.toString().equals( dn2.toString() ) );
+        assertFalse( dn1.getNormName().equals( dn2.getNormName() ) );
     }
 
 

Modified: directory/shared/trunk/ldap/src/test/java/org/apache/directory/shared/ldap/name/DnParserTest.java
URL: http://svn.apache.org/viewvc/directory/shared/trunk/ldap/src/test/java/org/apache/directory/shared/ldap/name/DnParserTest.java?rev=921600&r1=921599&r2=921600&view=diff
==============================================================================
--- directory/shared/trunk/ldap/src/test/java/org/apache/directory/shared/ldap/name/DnParserTest.java (original)
+++ directory/shared/trunk/ldap/src/test/java/org/apache/directory/shared/ldap/name/DnParserTest.java Wed Mar 10 22:37:30 2010
@@ -67,7 +67,7 @@ public class DnParserTest
         NameParser dnParser = DnParser.getNameParser();
 
         assertEquals( "a = b", ( ( DN ) dnParser.parse( "a = b" ) ).getName() );
-        assertEquals( "a=b", ( ( DN ) dnParser.parse( "a = b" ) ).toString() );
+        assertEquals( "a=b", ( ( DN ) dnParser.parse( "a = b" ) ).getNormName() );
     }
 
 
@@ -79,7 +79,7 @@ public class DnParserTest
     {
         NameParser dnParser = DnParser.getNameParser();
         DN dn = ( DN ) dnParser.parse( "a = b, c = d" );
-        assertEquals( "a=b,c=d", dn.toString() );
+        assertEquals( "a=b,c=d", dn.getNormName() );
         assertEquals( "a = b, c = d", dn.getName() );
     }
 
@@ -92,7 +92,7 @@ public class DnParserTest
     {
         NameParser dnParser = DnParser.getNameParser();
         DN dn = ( DN ) dnParser.parse( "a=b, a =b, a= b, a = b, a  =  b" );
-        assertEquals( "a=b,a=b,a=b,a=b,a=b", dn.toString() );
+        assertEquals( "a=b,a=b,a=b,a=b,a=b", dn.getNormName() );
         assertEquals( "a=b, a =b, a= b, a = b, a  =  b", dn.getName() );
     }
 
@@ -106,7 +106,7 @@ public class DnParserTest
     {
         NameParser dnParser = DnParser.getNameParser();
         DN dn = ( DN ) dnParser.parse( "a=b;c=d,e=f" );
-        assertEquals( "a=b,c=d,e=f", dn.toString() );
+        assertEquals( "a=b,c=d,e=f", dn.getNormName() );
         assertEquals( "a=b;c=d,e=f", dn.getName() );
     }
 
@@ -119,7 +119,7 @@ public class DnParserTest
     {
         NameParser dnParser = DnParser.getNameParser();
         DN dn = ( DN ) dnParser.parse( "a = b + c = d" );
-        assertEquals( "a=b+c=d", dn.toString() );
+        assertEquals( "a=b+c=d", dn.getNormName() );
         assertEquals( "a = b + c = d", dn.getName() );
     }
 
@@ -133,7 +133,7 @@ public class DnParserTest
     {
         NameParser dnParser = DnParser.getNameParser();
         DN dn = ( DN ) dnParser.parse( "a=b+c=d, e=f + g=h + i=j" );
-        assertEquals( "a=b+c=d,e=f+g=h+i=j", dn.toString() );
+        assertEquals( "a=b+c=d,e=f+g=h+i=j", dn.getNormName() );
         assertEquals( "a=b+c=d, e=f + g=h + i=j", dn.getName() );
     }
 
@@ -146,7 +146,7 @@ public class DnParserTest
     {
         NameParser dnParser = DnParser.getNameParser();
         DN dn = ( DN ) dnParser.parse( "OID.12.34.56 = azerty" );
-        assertEquals( "oid.12.34.56=azerty", dn.toString() );
+        assertEquals( "oid.12.34.56=azerty", dn.getNormName() );
         assertEquals( "OID.12.34.56 = azerty", dn.getName() );
     }
 
@@ -159,7 +159,7 @@ public class DnParserTest
     {
         NameParser dnParser = DnParser.getNameParser();
         DN dn = ( DN ) dnParser.parse( "oid.12.34.56 = azerty" );
-        assertEquals( "oid.12.34.56=azerty", dn.toString() );
+        assertEquals( "oid.12.34.56=azerty", dn.getNormName() );
         assertEquals( "oid.12.34.56 = azerty", dn.getName() );
     }
 
@@ -173,7 +173,7 @@ public class DnParserTest
     {
         NameParser dnParser = DnParser.getNameParser();
         DN dn = ( DN ) dnParser.parse( "12.34.56 = azerty" );
-        assertEquals( "12.34.56=azerty", dn.toString() );
+        assertEquals( "12.34.56=azerty", dn.getNormName() );
         assertEquals( "12.34.56 = azerty", dn.getName() );
     }
 
@@ -187,7 +187,7 @@ public class DnParserTest
     {
         NameParser dnParser = DnParser.getNameParser();
         DN dn = ( DN ) dnParser.parse( "12.34.56 = azerty; 7.8 = test" );
-        assertEquals( "12.34.56=azerty,7.8=test", dn.toString() );
+        assertEquals( "12.34.56=azerty,7.8=test", dn.getNormName() );
         assertEquals( "12.34.56 = azerty; 7.8 = test", dn.getName() );
     }
 
@@ -200,11 +200,11 @@ public class DnParserTest
     {
         NameParser dnParser = DnParser.getNameParser();
         DN dn = ( DN ) dnParser.parse( "a = \\,\\=\\+\\<\\>\\#\\;\\\\\\\"\\C3\\A9" );
-        assertEquals( "a=\\,=\\+\\<\\>#\\;\\\\\\\"\u00e9", dn.toString() );
+        assertEquals( "a=\\,=\\+\\<\\>#\\;\\\\\\\"\u00e9", dn.getNormName() );
         assertEquals( "a = \\,\\=\\+\\<\\>\\#\\;\\\\\\\"\\C3\\A9", dn.getName() );
 
         dn = ( DN ) dnParser.parse( "a = \\,\\=\\+\\<\\>\\#\\;\\\\\\\"\u00e9" );
-        assertEquals( "a=\\,=\\+\\<\\>#\\;\\\\\\\"\u00e9", dn.toString() );
+        assertEquals( "a=\\,=\\+\\<\\>#\\;\\\\\\\"\u00e9", dn.getNormName() );
         assertEquals( "a = \\,\\=\\+\\<\\>\\#\\;\\\\\\\"\u00e9", dn.getName() );
     }
 
@@ -217,7 +217,7 @@ public class DnParserTest
     {
         NameParser dnParser = DnParser.getNameParser();
         DN dn = ( DN ) dnParser.parse( "a = #0010A0AAFF" );
-        assertEquals( "a=#0010A0AAFF", dn.toString() );
+        assertEquals( "a=#0010A0AAFF", dn.getNormName() );
         assertEquals( "a = #0010A0AAFF", dn.getName() );
     }
 
@@ -253,11 +253,11 @@ public class DnParserTest
     {
         NameParser dnParser = DnParser.getNameParser();
         DN dn = ( DN ) dnParser.parse( "a = quoted \\\"value" );
-        assertEquals( "a=quoted \\\"value", dn.toString() );
+        assertEquals( "a=quoted \\\"value", dn.getNormName() );
         assertEquals( "a = quoted \\\"value", dn.getName() );
         
         dn = ( DN ) dnParser.parse( "cn=Mackie \\\"The Knife\\\" Messer" );
-        assertEquals( "cn=Mackie \\\"The Knife\\\" Messer", dn.toString() );
+        assertEquals( "cn=Mackie \\\"The Knife\\\" Messer", dn.getNormName() );
         assertEquals( "cn=Mackie \\\"The Knife\\\" Messer", dn.getName() );
     }
 
@@ -270,7 +270,7 @@ public class DnParserTest
     {
         NameParser dnParser = DnParser.getNameParser();
         DN dn = ( DN ) dnParser.parse( "a = AC\\\\DC" );
-        assertEquals( "a=AC\\\\DC", dn.toString() );
+        assertEquals( "a=AC\\\\DC", dn.getNormName() );
         assertEquals( "a = AC\\\\DC", dn.getName() );
     }
 
@@ -302,7 +302,7 @@ public class DnParserTest
         DN name = ( DN ) dnParser.parse( dn );
 
         assertEquals( dn, name.getName() );
-        assertEquals( "cn=Emmanuel  L\u00e9charny", name.toString() );
+        assertEquals( "cn=Emmanuel  L\u00e9charny", name.getNormName() );
     }
 
 
@@ -316,7 +316,7 @@ public class DnParserTest
         DN name = ( DN ) dnParser.parse( dn );
 
         assertEquals( dn, name.getName() );
-        assertEquals( "c=E\u00e9c", name.toString() );
+        assertEquals( "c=E\u00e9c", name.getNormName() );
     }
 
 
@@ -332,7 +332,7 @@ public class DnParserTest
                 .getName() );
         assertEquals(
             "cn=Billy Bakers,oid.2.5.4.11=Corporate Tax,ou=Fin-Accounting,ou=Americas,ou=Search,o=IMC,c=US", name
-                .toString() );
+                .getNormName() );
     }
 
 
@@ -554,7 +554,7 @@ public class DnParserTest
         NameParser parser = DnParser.getNameParser();
         Name result = parser.parse( path );
         assertEquals( path, ( ( DN ) result ).getName() );
-        assertEquals( "windowsfilepath=C:\\\\cygwin", result.toString() );
+        assertEquals( "windowsfilepath=C:\\\\cygwin", ((DN)result).getNormName() );
     }
 
 
@@ -610,7 +610,7 @@ public class DnParserTest
 
 
         NameParser parser = DnParser.getNameParser();
-        String result = parser.parse( cn ).toString();
+        String result = ((DN)parser.parse( cn )).getNormName();
         
         assertEquals( "cn=\u00c4\\+", result );
     }

Modified: directory/shared/trunk/ldap/src/test/java/org/apache/directory/shared/ldap/name/FastDnParserTest.java
URL: http://svn.apache.org/viewvc/directory/shared/trunk/ldap/src/test/java/org/apache/directory/shared/ldap/name/FastDnParserTest.java?rev=921600&r1=921599&r2=921600&view=diff
==============================================================================
--- directory/shared/trunk/ldap/src/test/java/org/apache/directory/shared/ldap/name/FastDnParserTest.java (original)
+++ directory/shared/trunk/ldap/src/test/java/org/apache/directory/shared/ldap/name/FastDnParserTest.java Wed Mar 10 22:37:30 2010
@@ -162,7 +162,7 @@ public class FastDnParserTest
 
         assertEquals( "a = b", dn.getName() );
         assertEquals( "a=b", dn.getNormName() );
-        assertEquals( "a=b", dn.toString() );
+        assertEquals( "a = b", dn.toString() );
 
         assertEquals( "a = b", dn.getRdn().getUpName() );
         assertEquals( "a=b", dn.getRdn().getNormName() );
@@ -185,7 +185,7 @@ public class FastDnParserTest
     {
         NameParser dnParser = FastDnParser.getNameParser();
         DN dn = ( DN ) dnParser.parse( "a = b, c = d" );
-        assertEquals( "a=b,c=d", dn.toString() );
+        assertEquals( "a=b,c=d", dn.getNormName() );
         assertEquals( "a = b, c = d", dn.getName() );
     }
 
@@ -198,7 +198,7 @@ public class FastDnParserTest
     {
         NameParser dnParser = FastDnParser.getNameParser();
         DN dn = ( DN ) dnParser.parse( "a=b, a =b, a= b, a = b, a  =  b" );
-        assertEquals( "a=b,a=b,a=b,a=b,a=b", dn.toString() );
+        assertEquals( "a=b,a=b,a=b,a=b,a=b", dn.getNormName() );
         assertEquals( "a=b, a =b, a= b, a = b, a  =  b", dn.getName() );
     }
 
@@ -212,7 +212,7 @@ public class FastDnParserTest
     {
         NameParser dnParser = FastDnParser.getNameParser();
         DN dn = ( DN ) dnParser.parse( "a=b;c=d,e=f" );
-        assertEquals( "a=b,c=d,e=f", dn.toString() );
+        assertEquals( "a=b,c=d,e=f", dn.getNormName() );
         assertEquals( "a=b;c=d,e=f", dn.getName() );
     }
 
@@ -303,7 +303,7 @@ public class FastDnParserTest
     {
         NameParser dnParser = FastDnParser.getNameParser();
         DN dn = ( DN ) dnParser.parse( "12.34.56 = azerty" );
-        assertEquals( "12.34.56=azerty", dn.toString() );
+        assertEquals( "12.34.56=azerty", dn.getNormName() );
         assertEquals( "12.34.56 = azerty", dn.getName() );
     }
 
@@ -317,7 +317,7 @@ public class FastDnParserTest
     {
         NameParser dnParser = FastDnParser.getNameParser();
         DN dn = ( DN ) dnParser.parse( "12.34.56 = azerty; 7.8 = test" );
-        assertEquals( "12.34.56=azerty,7.8=test", dn.toString() );
+        assertEquals( "12.34.56=azerty,7.8=test", dn.getNormName() );
         assertEquals( "12.34.56 = azerty; 7.8 = test", dn.getName() );
     }
 
@@ -425,7 +425,7 @@ public class FastDnParserTest
         DN name = ( DN ) dnParser.parse( dn );
 
         assertEquals( dn, name.getName() );
-        assertEquals( "cn=Emmanuel  L\u00e9charny", name.toString() );
+        assertEquals( "cn=Emmanuel  L\u00e9charny", name.getNormName() );
     }
 
 
@@ -439,7 +439,7 @@ public class FastDnParserTest
         DN name = ( DN ) dnParser.parse( dn );
 
         assertEquals( dn, name.getName() );
-        assertEquals( "c=E\u00e9c", name.toString() );
+        assertEquals( "c=E\u00e9c", name.getNormName() );
     }
 
 
@@ -527,7 +527,7 @@ public class FastDnParserTest
             "CN=Marshall T. Rose, O=Dover Beach Consulting, L=Santa Clara, ST=California, C=US",
             ( ( DN ) nameRFC1779_1 ).getName() );
         assertEquals( "RFC1779_1 : ", "cn=Marshall T. Rose,o=Dover Beach Consulting,l=Santa Clara,st=California,c=US",
-            nameRFC1779_1.toString() );
+            ((DN)nameRFC1779_1).getNormName() );
     }
 
 



Mime
View raw message