You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@directory.apache.org by el...@apache.org on 2011/01/03 12:14:58 UTC

svn commit: r1054584 - /directory/apacheds/branches/apacheds-AP/core-api/src/main/java/org/apache/directory/server/core/administrative/SubentryCache.java

Author: elecharny
Date: Mon Jan  3 11:14:57 2011
New Revision: 1054584

URL: http://svn.apache.org/viewvc?rev=1054584&view=rev
Log:
o Fixed an issue when we try to add a new subentry to an AP in the DnNode data structure

Modified:
    directory/apacheds/branches/apacheds-AP/core-api/src/main/java/org/apache/directory/server/core/administrative/SubentryCache.java

Modified: directory/apacheds/branches/apacheds-AP/core-api/src/main/java/org/apache/directory/server/core/administrative/SubentryCache.java
URL: http://svn.apache.org/viewvc/directory/apacheds/branches/apacheds-AP/core-api/src/main/java/org/apache/directory/server/core/administrative/SubentryCache.java?rev=1054584&r1=1054583&r2=1054584&view=diff
==============================================================================
--- directory/apacheds/branches/apacheds-AP/core-api/src/main/java/org/apache/directory/server/core/administrative/SubentryCache.java (original)
+++ directory/apacheds/branches/apacheds-AP/core-api/src/main/java/org/apache/directory/server/core/administrative/SubentryCache.java Mon Jan  3 11:14:57 2011
@@ -163,7 +163,17 @@ public class SubentryCache implements It
         
         subentries[subentry.getAdministrativeRole().getValue()] = subentry;
         Subentry[] oldSubentry = uuidCache.put( subentry.getUuid(), subentries );
-        dnCache.add( dn, subentries );
+        
+        Subentry[] dnSubentries = dnCache.getElement( dn );
+        
+        if ( dnSubentries != null )
+        {
+            dnSubentries[subentry.getAdministrativeRole().getValue()] = subentry;
+        }
+        else
+        {
+            dnCache.add( dn, subentries );
+        }
         
         return oldSubentry;
     }