directory-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From akaras...@apache.org
Subject svn commit: r659743 - /directory/apacheds/branches/bigbang/jdbm-store/src/main/java/org/apache/directory/server/core/partition/impl/btree/jdbm/JdbmStore.java
Date Sat, 24 May 2008 02:04:13 GMT
Author: akarasulu
Date: Fri May 23 19:04:11 2008
New Revision: 659743

URL: http://svn.apache.org/viewvc?rev=659743&view=rev
Log:
fixing issues with handling index management which was trying to store attributes instead

Modified:
    directory/apacheds/branches/bigbang/jdbm-store/src/main/java/org/apache/directory/server/core/partition/impl/btree/jdbm/JdbmStore.java

Modified: directory/apacheds/branches/bigbang/jdbm-store/src/main/java/org/apache/directory/server/core/partition/impl/btree/jdbm/JdbmStore.java
URL: http://svn.apache.org/viewvc/directory/apacheds/branches/bigbang/jdbm-store/src/main/java/org/apache/directory/server/core/partition/impl/btree/jdbm/JdbmStore.java?rev=659743&r1=659742&r2=659743&view=diff
==============================================================================
--- directory/apacheds/branches/bigbang/jdbm-store/src/main/java/org/apache/directory/server/core/partition/impl/btree/jdbm/JdbmStore.java
(original)
+++ directory/apacheds/branches/bigbang/jdbm-store/src/main/java/org/apache/directory/server/core/partition/impl/btree/jdbm/JdbmStore.java
Fri May 23 19:04:11 2008
@@ -1284,7 +1284,11 @@
         if ( hasUserIndexOn( modsOid ) )
         {
             Index<?,E> index = getUserIndex( modsOid );
-            ( ( JdbmIndex ) index ).drop( ServerEntryUtils.toAttributeImpl( mods ), id );
+            
+            for ( Value<?> value : mods )
+            {
+                ( ( JdbmIndex ) index ).drop( value.get(), id );
+            }
 
             /* 
              * If no attribute values exist for this entryId in the index then
@@ -1359,8 +1363,12 @@
             Index<?,E> index = getUserIndex( modsOid );
 
             // Drop all existing attribute value index entries and add new ones
-            ( ( JdbmIndex ) index ).drop( id );
-            ( ( JdbmIndex ) index ).add( ServerEntryUtils.toAttributeImpl( mods ), id );
+            ( ( JdbmIndex<?,E> ) index ).drop( id );
+            
+            for ( Value<?> value : mods )
+            {
+                ( ( JdbmIndex<Object,E> ) index ).add( value.get(), id );
+            }
 
             /* 
              * If no attribute values exist for this entryId in the index then



Mime
View raw message