directory-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From elecha...@apache.org
Subject svn commit: r1054584 - /directory/apacheds/branches/apacheds-AP/core-api/src/main/java/org/apache/directory/server/core/administrative/SubentryCache.java
Date Mon, 03 Jan 2011 11:14:58 GMT
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;
     }



Mime
View raw message