directory-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From elecha...@apache.org
Subject svn commit: r1331624 - /directory/shared/trunk/ldap/model/src/main/java/org/apache/directory/shared/ldap/model/name/Dn.java
Date Fri, 27 Apr 2012 22:58:37 GMT
Author: elecharny
Date: Fri Apr 27 22:58:36 2012
New Revision: 1331624

URL: http://svn.apache.org/viewvc?rev=1331624&view=rev
Log:
Bypassed the complex Dn comparison in the equals() method buy comparing first the normalized
name of both element. This speeds up the server.

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

Modified: directory/shared/trunk/ldap/model/src/main/java/org/apache/directory/shared/ldap/model/name/Dn.java
URL: http://svn.apache.org/viewvc/directory/shared/trunk/ldap/model/src/main/java/org/apache/directory/shared/ldap/model/name/Dn.java?rev=1331624&r1=1331623&r2=1331624&view=diff
==============================================================================
--- directory/shared/trunk/ldap/model/src/main/java/org/apache/directory/shared/ldap/model/name/Dn.java
(original)
+++ directory/shared/trunk/ldap/model/src/main/java/org/apache/directory/shared/ldap/model/name/Dn.java
Fri Apr 27 22:58:36 2012
@@ -1025,6 +1025,11 @@ public class Dn implements Iterable<Rdn>
         {
             Dn name = ( Dn ) obj;
 
+            if ( name.getNormName().equals( normName ) )
+            {
+                return true;
+            }
+            
             if ( name.size() != this.size() )
             {
                 return false;



Mime
View raw message