directory-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From trus...@apache.org
Subject svn commit: r191515 - /directory/apacheds/branches/db_refactor/core/src/main/java/org/apache/ldap/server/configuration/ContextPartitionConfiguration.java
Date Mon, 20 Jun 2005 17:23:36 GMT
Author: trustin
Date: Mon Jun 20 10:23:35 2005
New Revision: 191515

URL: http://svn.apache.org/viewcvs?rev=191515&view=rev
Log:
* Fixed some typo errors
* Set JdbmContextPartition as default

Modified:
    directory/apacheds/branches/db_refactor/core/src/main/java/org/apache/ldap/server/configuration/ContextPartitionConfiguration.java

Modified: directory/apacheds/branches/db_refactor/core/src/main/java/org/apache/ldap/server/configuration/ContextPartitionConfiguration.java
URL: http://svn.apache.org/viewcvs/directory/apacheds/branches/db_refactor/core/src/main/java/org/apache/ldap/server/configuration/ContextPartitionConfiguration.java?rev=191515&r1=191514&r2=191515&view=diff
==============================================================================
--- directory/apacheds/branches/db_refactor/core/src/main/java/org/apache/ldap/server/configuration/ContextPartitionConfiguration.java
(original)
+++ directory/apacheds/branches/db_refactor/core/src/main/java/org/apache/ldap/server/configuration/ContextPartitionConfiguration.java
Mon Jun 20 10:23:35 2005
@@ -31,6 +31,7 @@
 import org.apache.ldap.common.name.LdapName;
 import org.apache.ldap.common.schema.Normalizer;
 import org.apache.ldap.server.partition.ContextPartition;
+import org.apache.ldap.server.partition.impl.btree.jdbm.JdbmContextPartition;
 import org.apache.ldap.server.schema.MatchingRuleRegistry;
 
 
@@ -49,7 +50,7 @@
     private String suffix;
     private Set indexedAttributes = new HashSet(); // Set<String>
     private Attributes contextEntry = new BasicAttributes();
-    private ContextPartition contextPartition;
+    private ContextPartition contextPartition = new JdbmContextPartition();
     
     /**
      * Creates a new instance.
@@ -97,6 +98,10 @@
     
     protected void setContextPartition( ContextPartition partition )
     {
+        if( partition == null )
+        {
+            throw new NullPointerException( "partition" );
+        }
         this.contextPartition = partition;
     }
     
@@ -134,7 +139,7 @@
         }
         catch( NamingException e )
         {
-            throw new ConfigurationException( "Failed to normalized the suffix: " + suffix
);
+            throw new ConfigurationException( "Failed to normalize the suffix: " + suffix
);
         }
         this.suffix = suffix;
     }
@@ -155,11 +160,6 @@
         if( getSuffix() == null )
         {
             throw new ConfigurationException( "Suffix is not specified." );
-        }
-        
-        if( getContextPartition() == null )
-        {
-            throw new ConfigurationException( "Context partition is not specifiec." );
         }
     }
 }



Mime
View raw message