directory-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From akaras...@apache.org
Subject svn commit: r429158 - /directory/trunks/shared/ldap/src/main/java/org/apache/directory/shared/ldap/codec/add/AddRequest.java
Date Sun, 06 Aug 2006 17:18:00 GMT
Author: akarasulu
Date: Sun Aug  6 10:18:00 2006
New Revision: 429158

URL: http://svn.apache.org/viewvc?rev=429158&view=rev
Log:
fix for DIRSERVER-643: adding entry ith two attributes of same type does not combine

Modified:
    directory/trunks/shared/ldap/src/main/java/org/apache/directory/shared/ldap/codec/add/AddRequest.java

Modified: directory/trunks/shared/ldap/src/main/java/org/apache/directory/shared/ldap/codec/add/AddRequest.java
URL: http://svn.apache.org/viewvc/directory/trunks/shared/ldap/src/main/java/org/apache/directory/shared/ldap/codec/add/AddRequest.java?rev=429158&r1=429157&r2=429158&view=diff
==============================================================================
--- directory/trunks/shared/ldap/src/main/java/org/apache/directory/shared/ldap/codec/add/AddRequest.java
(original)
+++ directory/trunks/shared/ldap/src/main/java/org/apache/directory/shared/ldap/codec/add/AddRequest.java
Sun Aug  6 10:18:00 2006
@@ -142,6 +142,13 @@
      */
     public void addAttributeType( LdapString type )
     {
+        // do not create a new attribute if we have seen this attributeType before
+        if ( attributes.get( type.toString().toLowerCase() ) != null )
+        {
+            return;
+        }
+        
+        // fix this to use LockableAttributeImpl(type.getString().toLowerCase())
         currentAttribute = new BasicAttribute( type.getString().toLowerCase() );
         attributes.put( currentAttribute );
     }
@@ -154,6 +161,13 @@
      */
     public void addAttributeType( String type )
     {
+        // do not create a new attribute if we have seen this attributeType before
+        if ( attributes.get( type.toLowerCase() ) != null )
+        {
+            return;
+        }
+        
+        // fix this to use LockableAttributeImpl(type.getString().toLowerCase())
         currentAttribute = new BasicAttribute( type.toLowerCase() );
         attributes.put( currentAttribute );
     }



Mime
View raw message