directory-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From akaras...@apache.org
Subject svn commit: r280166 - /directory/apacheds/trunk/core/src/main/java/org/apache/ldap/server/partition/impl/btree/BTreeContextPartition.java
Date Sun, 11 Sep 2005 19:03:49 GMT
Author: akarasulu
Date: Sun Sep 11 12:03:45 2005
New Revision: 280166

URL: http://svn.apache.org/viewcvs?rev=280166&view=rev
Log:
Reviewed and applyed Stefan Zoerner's patch for DIREVE-240 here:

    http://issues.apache.org/jira/browse/DIREVE-240


Modified:
    directory/apacheds/trunk/core/src/main/java/org/apache/ldap/server/partition/impl/btree/BTreeContextPartition.java

Modified: directory/apacheds/trunk/core/src/main/java/org/apache/ldap/server/partition/impl/btree/BTreeContextPartition.java
URL: http://svn.apache.org/viewcvs/directory/apacheds/trunk/core/src/main/java/org/apache/ldap/server/partition/impl/btree/BTreeContextPartition.java?rev=280166&r1=280165&r2=280166&view=diff
==============================================================================
--- directory/apacheds/trunk/core/src/main/java/org/apache/ldap/server/partition/impl/btree/BTreeContextPartition.java
(original)
+++ directory/apacheds/trunk/core/src/main/java/org/apache/ldap/server/partition/impl/btree/BTreeContextPartition.java
Sun Sep 11 12:03:45 2005
@@ -133,7 +133,7 @@
             String name = ( String ) i.next();
             String oid = oidRegistry.getOid( name );
             AttributeType type = attributeTypeRegistry.lookup( oid );
-            
+
             // check if attribute is a system attribute
             if ( sysOidSet.contains( oid ) )
             {
@@ -176,10 +176,15 @@
                 addIndexOn( type );
             }
         }
-        
-        add( cfg.getSuffix(),
-                cfg.getNormalizedSuffix( factoryCfg.getGlobalRegistries().getMatchingRuleRegistry()
),
-                cfg.getContextEntry() );
+
+        // add entry for context, if it does not exist
+        Attributes suffixOnDisk = getSuffixEntry();
+        if ( suffixOnDisk == null )
+        {
+            add( cfg.getSuffix(),
+                 cfg.getNormalizedSuffix( factoryCfg.getGlobalRegistries().getMatchingRuleRegistry()
),
+                 cfg.getContextEntry() );
+        }
     }
 
     



Mime
View raw message