directory-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From seelm...@apache.org
Subject svn commit: r902673 - /directory/apacheds/trunk/core/src/main/java/org/apache/directory/server/core/changelog/ChangeLogInterceptor.java
Date Sun, 24 Jan 2010 23:11:51 GMT
Author: seelmann
Date: Sun Jan 24 23:11:50 2010
New Revision: 902673

URL: http://svn.apache.org/viewvc?rev=902673&view=rev
Log:
Fix SearchIT.testSearchAttrC_L(), collective attributes can't be added by the revert operation

Modified:
    directory/apacheds/trunk/core/src/main/java/org/apache/directory/server/core/changelog/ChangeLogInterceptor.java

Modified: directory/apacheds/trunk/core/src/main/java/org/apache/directory/server/core/changelog/ChangeLogInterceptor.java
URL: http://svn.apache.org/viewvc/directory/apacheds/trunk/core/src/main/java/org/apache/directory/server/core/changelog/ChangeLogInterceptor.java?rev=902673&r1=902672&r2=902673&view=diff
==============================================================================
--- directory/apacheds/trunk/core/src/main/java/org/apache/directory/server/core/changelog/ChangeLogInterceptor.java
(original)
+++ directory/apacheds/trunk/core/src/main/java/org/apache/directory/server/core/changelog/ChangeLogInterceptor.java
Sun Jan 24 23:11:50 2010
@@ -170,10 +170,15 @@
         forward.setDn( opContext.getDn() );
         
         Entry reverseEntry = new DefaultClientEntry( serverEntry.getDn() );
-        
-        for ( EntryAttribute attribute:serverEntry )
+
+        for ( EntryAttribute attribute : serverEntry )
         {
-            reverseEntry.add( ((ServerAttribute)attribute).toClientAttribute() );
+            // filter collective attributes, they can't be added by the revert operation
+            AttributeType at = schemaService.getSchemaManager().getAttributeTypeRegistry().lookup(
attribute.getId() );
+            if ( !at.isCollective() )
+            {
+                reverseEntry.add( ( ( ServerAttribute ) attribute ).toClientAttribute() );
+            }
         }
 
         LdifEntry reverse = LdifRevertor.reverseDel( opContext.getDn(), reverseEntry );



Mime
View raw message