directory-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From elecha...@apache.org
Subject svn commit: r659826 - /directory/apacheds/branches/bigbang/xdbm-search/src/main/java/org/apache/directory/server/xdbm/search/impl/EqualityEvaluator.java
Date Sat, 24 May 2008 14:17:43 GMT
Author: elecharny
Date: Sat May 24 07:17:43 2008
New Revision: 659826

URL: http://svn.apache.org/viewvc?rev=659826&view=rev
Log:
If an attributeType didn't had some comparator or normalizer, return a ByteArrayComparator
and a NoOpNormalizer instead of throwing an IllegalStateException

Modified:
    directory/apacheds/branches/bigbang/xdbm-search/src/main/java/org/apache/directory/server/xdbm/search/impl/EqualityEvaluator.java

Modified: directory/apacheds/branches/bigbang/xdbm-search/src/main/java/org/apache/directory/server/xdbm/search/impl/EqualityEvaluator.java
URL: http://svn.apache.org/viewvc/directory/apacheds/branches/bigbang/xdbm-search/src/main/java/org/apache/directory/server/xdbm/search/impl/EqualityEvaluator.java?rev=659826&r1=659825&r2=659826&view=diff
==============================================================================
--- directory/apacheds/branches/bigbang/xdbm-search/src/main/java/org/apache/directory/server/xdbm/search/impl/EqualityEvaluator.java
(original)
+++ directory/apacheds/branches/bigbang/xdbm-search/src/main/java/org/apache/directory/server/xdbm/search/impl/EqualityEvaluator.java
Sat May 24 07:17:43 2008
@@ -22,7 +22,9 @@
 
 import org.apache.directory.shared.ldap.filter.EqualityNode;
 import org.apache.directory.shared.ldap.schema.AttributeType;
+import org.apache.directory.shared.ldap.schema.ByteArrayComparator;
 import org.apache.directory.shared.ldap.schema.MatchingRule;
+import org.apache.directory.shared.ldap.schema.NoOpNormalizer;
 import org.apache.directory.shared.ldap.schema.Normalizer;
 import org.apache.directory.shared.ldap.entry.Value;
 import org.apache.directory.server.xdbm.IndexEntry;
@@ -79,12 +81,14 @@
 
             if ( mr == null )
             {
-                throw new IllegalStateException(
-                    "Could not find matchingRule to use for EqualityNode evaluation: " +
node );
+                normalizer = NoOpNormalizer.INSTANCE;
+                comparator = ByteArrayComparator.INSTANCE;
+            }
+            else
+            {
+                normalizer = mr.getNormalizer();
+                comparator = mr.getComparator();
             }
-
-            normalizer = mr.getNormalizer();
-            comparator = mr.getComparator();
         }
     }
 



Mime
View raw message