directory-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From elecha...@apache.org
Subject svn commit: r494878 - /directory/trunks/apacheds/schema-registries/src/main/java/org/apache/directory/server/schema/DnComparator.java
Date Wed, 10 Jan 2007 16:30:40 GMT
Author: elecharny
Date: Wed Jan 10 08:30:40 2007
New Revision: 494878

URL: http://svn.apache.org/viewvc?view=rev&rev=494878
Log:
Used the dn.isNormalized to avoid a costly normalization

Modified:
    directory/trunks/apacheds/schema-registries/src/main/java/org/apache/directory/server/schema/DnComparator.java

Modified: directory/trunks/apacheds/schema-registries/src/main/java/org/apache/directory/server/schema/DnComparator.java
URL: http://svn.apache.org/viewvc/directory/trunks/apacheds/schema-registries/src/main/java/org/apache/directory/server/schema/DnComparator.java?view=diff&rev=494878&r1=494877&r2=494878
==============================================================================
--- directory/trunks/apacheds/schema-registries/src/main/java/org/apache/directory/server/schema/DnComparator.java
(original)
+++ directory/trunks/apacheds/schema-registries/src/main/java/org/apache/directory/server/schema/DnComparator.java
Wed Jan 10 08:30:40 2007
@@ -84,7 +84,9 @@
         
         if ( obj instanceof LdapDN )
         {
-            dn = LdapDN.normalize( ( LdapDN ) obj, attrRegistry.getNormalizerMapping() );
+            dn = (LdapDN)obj;
+            
+            dn = ( dn.isNormalized() ? dn : LdapDN.normalize( dn, attrRegistry.getNormalizerMapping()
) );
         }
         else if ( obj instanceof Name )
         {



Mime
View raw message