directory-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From elecha...@apache.org
Subject svn commit: r1422486 - in /directory/apacheds/trunk: ldif-partition/src/main/java/org/apache/directory/server/core/partition/ldif/ xdbm-partition/src/main/java/org/apache/directory/server/core/partition/impl/btree/
Date Sun, 16 Dec 2012 08:48:34 GMT
Author: elecharny
Date: Sun Dec 16 08:48:33 2012
New Revision: 1422486

URL: http://svn.apache.org/viewvc?rev=1422486&view=rev
Log:
Removed the warnig produced when we were adding the EntryDN attribute : if it's already there,
we don't try to add it again (the EntryDN attribute is present because we are fetching the
entry from an AvlPartition, which is in memory, and contins entry that are not immutable,
thus contains the EntryDN once they have been read once)

Modified:
    directory/apacheds/trunk/ldif-partition/src/main/java/org/apache/directory/server/core/partition/ldif/SingleFileLdifPartition.java
    directory/apacheds/trunk/xdbm-partition/src/main/java/org/apache/directory/server/core/partition/impl/btree/AbstractBTreePartition.java

Modified: directory/apacheds/trunk/ldif-partition/src/main/java/org/apache/directory/server/core/partition/ldif/SingleFileLdifPartition.java
URL: http://svn.apache.org/viewvc/directory/apacheds/trunk/ldif-partition/src/main/java/org/apache/directory/server/core/partition/ldif/SingleFileLdifPartition.java?rev=1422486&r1=1422485&r2=1422486&view=diff
==============================================================================
--- directory/apacheds/trunk/ldif-partition/src/main/java/org/apache/directory/server/core/partition/ldif/SingleFileLdifPartition.java
(original)
+++ directory/apacheds/trunk/ldif-partition/src/main/java/org/apache/directory/server/core/partition/ldif/SingleFileLdifPartition.java
Sun Dec 16 08:48:33 2012
@@ -320,6 +320,10 @@ public class SingleFileLdifPartition ext
                 if ( suffixEntry != null )
                 {
                     Entry entry = master.get( suffixId );
+                    
+                    // Don't write the EntryDN attribute
+                    entry.removeAttributes( ENTRY_DN_AT );
+                    
                     entry.setDn( suffixDn );
 
                     appendLdif( entry );

Modified: directory/apacheds/trunk/xdbm-partition/src/main/java/org/apache/directory/server/core/partition/impl/btree/AbstractBTreePartition.java
URL: http://svn.apache.org/viewvc/directory/apacheds/trunk/xdbm-partition/src/main/java/org/apache/directory/server/core/partition/impl/btree/AbstractBTreePartition.java?rev=1422486&r1=1422485&r2=1422486&view=diff
==============================================================================
--- directory/apacheds/trunk/xdbm-partition/src/main/java/org/apache/directory/server/core/partition/impl/btree/AbstractBTreePartition.java
(original)
+++ directory/apacheds/trunk/xdbm-partition/src/main/java/org/apache/directory/server/core/partition/impl/btree/AbstractBTreePartition.java
Sun Dec 16 08:48:33 2012
@@ -1064,7 +1064,10 @@ public abstract class AbstractBTreeParti
             
             if ( entry != null )
             {
-                entry.add( ENTRY_DN_AT, dn.getName() );
+                if ( !entry.containsAttribute( ENTRY_DN_AT ) )
+                {
+                    entry.add( ENTRY_DN_AT, dn.getName() );
+                }
                 
                 return new ClonedServerEntry( entry );
             }
@@ -1087,7 +1090,10 @@ public abstract class AbstractBTreeParti
                     entry.setDn( dn );
                 }
 
-                entry.add( ENTRY_DN_AT, dn.getName() );
+                if ( !entry.containsAttribute( ENTRY_DN_AT ) )
+                {
+                    entry.add( ENTRY_DN_AT, dn.getName() );
+                }
 
                 addToCache( id, entry );
                 



Mime
View raw message