directory-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From elecha...@apache.org
Subject svn commit: r810313 - /directory/apacheds/branches/apacheds-schema/jdbm-store/src/main/java/org/apache/directory/server/core/partition/impl/btree/jdbm/JdbmIndex.java
Date Wed, 02 Sep 2009 00:04:09 GMT
Author: elecharny
Date: Wed Sep  2 00:04:09 2009
New Revision: 810313

URL: http://svn.apache.org/viewvc?rev=810313&view=rev
Log:
Added a check against null MatchingRule passed to the initTables() method

Modified:
    directory/apacheds/branches/apacheds-schema/jdbm-store/src/main/java/org/apache/directory/server/core/partition/impl/btree/jdbm/JdbmIndex.java

Modified: directory/apacheds/branches/apacheds-schema/jdbm-store/src/main/java/org/apache/directory/server/core/partition/impl/btree/jdbm/JdbmIndex.java
URL: http://svn.apache.org/viewvc/directory/apacheds/branches/apacheds-schema/jdbm-store/src/main/java/org/apache/directory/server/core/partition/impl/btree/jdbm/JdbmIndex.java?rev=810313&r1=810312&r2=810313&view=diff
==============================================================================
--- directory/apacheds/branches/apacheds-schema/jdbm-store/src/main/java/org/apache/directory/server/core/partition/impl/btree/jdbm/JdbmIndex.java
(original)
+++ directory/apacheds/branches/apacheds-schema/jdbm-store/src/main/java/org/apache/directory/server/core/partition/impl/btree/jdbm/JdbmIndex.java
Wed Sep  2 00:04:09 2009
@@ -42,6 +42,8 @@
 import java.io.File;
 import java.io.IOException;
 
+import javax.naming.NamingException;
+
 
 /** 
  * A Jdbm based index implementation.
@@ -195,6 +197,7 @@
      * 
      * @throws IOException if we cannot initialize the forward and reverse
      * tables
+     * @throws NamingException 
      */
     private void initTables() throws IOException
     {
@@ -202,6 +205,11 @@
 
         MatchingRule mr = attribute.getEquality();
         
+        if ( mr == null )
+        {
+            throw new IOException( "No Equality MatchingRule available for attribute " +
attribute.getName() );
+        }
+        
         comp = new SerializableComparator<K>( mr.getOid() );
 
         /*



Mime
View raw message