You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@directory.apache.org by ak...@apache.org on 2005/08/10 09:15:27 UTC

svn commit: r231186 - /directory/apacheds/trunk/core/src/main/java/org/apache/ldap/server/partition/impl/btree/jdbm/JdbmContextPartition.java

Author: akarasulu
Date: Wed Aug 10 00:15:24 2005
New Revision: 231186

URL: http://svn.apache.org/viewcvs?rev=231186&view=rev
Log:
Fixes the following issues:

   http://issues.apache.org/jira/browse/DIREVE-216
   http://issues.apache.org/jira/browse/DIRLDAP-47


Modified:
    directory/apacheds/trunk/core/src/main/java/org/apache/ldap/server/partition/impl/btree/jdbm/JdbmContextPartition.java

Modified: directory/apacheds/trunk/core/src/main/java/org/apache/ldap/server/partition/impl/btree/jdbm/JdbmContextPartition.java
URL: http://svn.apache.org/viewcvs/directory/apacheds/trunk/core/src/main/java/org/apache/ldap/server/partition/impl/btree/jdbm/JdbmContextPartition.java?rev=231186&r1=231185&r2=231186&view=diff
==============================================================================
--- directory/apacheds/trunk/core/src/main/java/org/apache/ldap/server/partition/impl/btree/jdbm/JdbmContextPartition.java (original)
+++ directory/apacheds/trunk/core/src/main/java/org/apache/ldap/server/partition/impl/btree/jdbm/JdbmContextPartition.java Wed Aug 10 00:15:24 2005
@@ -43,6 +43,7 @@
 import org.apache.ldap.common.exception.LdapSchemaViolationException;
 import org.apache.ldap.common.message.LockableAttributesImpl;
 import org.apache.ldap.common.message.ResultCodeEnum;
+import org.apache.ldap.common.message.LockableAttributeImpl;
 import org.apache.ldap.common.name.LdapName;
 import org.apache.ldap.common.schema.AttributeType;
 import org.apache.ldap.common.schema.Normalizer;
@@ -1026,8 +1027,20 @@
                 idx.add( mods.getID(), id );
             }
         }
-        
-        entry.put( mods );
+
+        // add all the values in mods to the same attribute in the entry
+        Attribute entryAttrToAddTo = entry.get( mods.getID() );
+
+        if ( entryAttrToAddTo == null )
+        {
+            entryAttrToAddTo = new LockableAttributeImpl( mods.getID() );
+            entry.put( entryAttrToAddTo );
+        }
+
+        for ( int ii = 0; ii < mods.size(); ii++ )
+        {
+            entryAttrToAddTo.add( mods.get( ii ) );
+        }
 
         if ( mods.getID().equals( ContextPartition.ALIAS_ATTRIBUTE ) )
         {