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

svn commit: r964831 - in /directory/shared/trunk/ldap/src/main/java/org/apache/directory/shared/ldap: entry/StringValue.java name/DN.java

Author: elecharny
Date: Fri Jul 16 15:21:39 2010
New Revision: 964831

URL: http://svn.apache.org/viewvc?rev=964831&view=rev
Log:
o Fixed the way we compute the DN hashcode : we don't have to compute the AttributeType hascode in the RDN values.

Modified:
    directory/shared/trunk/ldap/src/main/java/org/apache/directory/shared/ldap/entry/StringValue.java
    directory/shared/trunk/ldap/src/main/java/org/apache/directory/shared/ldap/name/DN.java

Modified: directory/shared/trunk/ldap/src/main/java/org/apache/directory/shared/ldap/entry/StringValue.java
URL: http://svn.apache.org/viewvc/directory/shared/trunk/ldap/src/main/java/org/apache/directory/shared/ldap/entry/StringValue.java?rev=964831&r1=964830&r2=964831&view=diff
==============================================================================
--- directory/shared/trunk/ldap/src/main/java/org/apache/directory/shared/ldap/entry/StringValue.java (original)
+++ directory/shared/trunk/ldap/src/main/java/org/apache/directory/shared/ldap/entry/StringValue.java Fri Jul 16 15:21:39 2010
@@ -326,12 +326,6 @@ public class StringValue extends Abstrac
             // stored in an attribute - the binary version does the same 
             if ( isNull() )
             {
-                if ( attributeType != null )
-                {
-                    // return the OID hashcode if the value is null. 
-                    return attributeType.getOid().hashCode();
-                }
-                
                 return 0;
             }
     
@@ -349,12 +343,6 @@ public class StringValue extends Abstrac
             {
                 h = 17;
             }
-            
-            // Add the OID hashcode if we have an AttributeType
-            if ( attributeType != null )
-            {
-                h = h*37 + attributeType.getOid().hashCode();
-            }
         }
         
         return h;

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=964831&r1=964830&r2=964831&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 Fri Jul 16 15:21:39 2010
@@ -1403,12 +1403,12 @@ public class DN implements Cloneable, Se
                 {
                     try
                     {
-                    return new AVA( 
-                        atav.getUpType(), 
-                        oidNormalizer.getAttributeTypeOid(), 
-                        atav.getUpValue(),
+                        return new AVA( 
+                            atav.getUpType(), 
+                            oidNormalizer.getAttributeTypeOid(), 
+                            atav.getUpValue(),
                             oidNormalizer.getNormalizer().normalize( atav.getNormValue() ),
-                        atav.getUpName() );
+                            atav.getUpName() );
                     }
                     catch ( LdapException le )
                     {