directory-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From elecha...@apache.org
Subject svn commit: r964831 - in /directory/shared/trunk/ldap/src/main/java/org/apache/directory/shared/ldap: entry/StringValue.java name/DN.java
Date Fri, 16 Jul 2010 15:21:40 GMT
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 )
                     {



Mime
View raw message