directory-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From elecha...@apache.org
Subject svn commit: r1332266 - /directory/shared/trunk/ldap/model/src/main/java/org/apache/directory/shared/ldap/model/name/Rdn.java
Date Mon, 30 Apr 2012 15:57:21 GMT
Author: elecharny
Date: Mon Apr 30 15:57:21 2012
New Revision: 1332266

URL: http://svn.apache.org/viewvc?rev=1332266&view=rev
Log:
Speeded up the RDN comparison by comparing first the normaliazed names

Modified:
    directory/shared/trunk/ldap/model/src/main/java/org/apache/directory/shared/ldap/model/name/Rdn.java

Modified: directory/shared/trunk/ldap/model/src/main/java/org/apache/directory/shared/ldap/model/name/Rdn.java
URL: http://svn.apache.org/viewvc/directory/shared/trunk/ldap/model/src/main/java/org/apache/directory/shared/ldap/model/name/Rdn.java?rev=1332266&r1=1332265&r2=1332266&view=diff
==============================================================================
--- directory/shared/trunk/ldap/model/src/main/java/org/apache/directory/shared/ldap/model/name/Rdn.java
(original)
+++ directory/shared/trunk/ldap/model/src/main/java/org/apache/directory/shared/ldap/model/name/Rdn.java
Mon Apr 30 15:57:21 2012
@@ -976,6 +976,12 @@ public class Rdn implements Cloneable, E
         }
 
         Rdn rdn = ( Rdn ) that;
+        
+        // Short cut : compare the normalized Rdn
+        if ( normName.equals( rdn.normName ) )
+        {
+            return true;
+        }
 
         // Short cut : compare the normalized Rdn
         if ( normName.equals( rdn.normName ) )



Mime
View raw message