directory-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From kayyag...@apache.org
Subject svn commit: r938457 - in /directory/apacheds/trunk/xdbm-search/src/main/java/org/apache/directory/server/xdbm/search/impl: GreaterEqEvaluator.java LessEqEvaluator.java
Date Tue, 27 Apr 2010 13:51:46 GMT
Author: kayyagari
Date: Tue Apr 27 13:51:45 2010
New Revision: 938457

URL: http://svn.apache.org/viewvc?rev=938457&view=rev
Log:
o added an extra check on the non-null index to see if duplicates are supported by the index
  (if duplicates are not supported then a call to reverseGreaterOrEq or reverseLessOrEq will
fail with UnSupportedOperationException, in order
   to avoid that we should check if the index supports duplicates else we fall back to evaluation
of the Entry after fetching from master table )

Modified:
    directory/apacheds/trunk/xdbm-search/src/main/java/org/apache/directory/server/xdbm/search/impl/GreaterEqEvaluator.java
    directory/apacheds/trunk/xdbm-search/src/main/java/org/apache/directory/server/xdbm/search/impl/LessEqEvaluator.java

Modified: directory/apacheds/trunk/xdbm-search/src/main/java/org/apache/directory/server/xdbm/search/impl/GreaterEqEvaluator.java
URL: http://svn.apache.org/viewvc/directory/apacheds/trunk/xdbm-search/src/main/java/org/apache/directory/server/xdbm/search/impl/GreaterEqEvaluator.java?rev=938457&r1=938456&r2=938457&view=diff
==============================================================================
--- directory/apacheds/trunk/xdbm-search/src/main/java/org/apache/directory/server/xdbm/search/impl/GreaterEqEvaluator.java
(original)
+++ directory/apacheds/trunk/xdbm-search/src/main/java/org/apache/directory/server/xdbm/search/impl/GreaterEqEvaluator.java
Tue Apr 27 13:51:45 2010
@@ -123,7 +123,7 @@ public class GreaterEqEvaluator<T, ID> i
 
     public boolean evaluate( IndexEntry<?, ServerEntry, ID> indexEntry ) throws Exception
     {
-        if ( idx != null )
+        if ( idx != null && idx.isDupsEnabled() )
         {
             return idx.reverseGreaterOrEq( indexEntry.getId(), node.getValue().get() );
         }
@@ -187,7 +187,7 @@ public class GreaterEqEvaluator<T, ID> i
 
     public boolean evaluateId( ID id ) throws Exception
     {
-        if ( idx != null )
+        if ( idx != null && idx.isDupsEnabled() )
         {
             return idx.reverseGreaterOrEq( id, node.getValue().get() );
         }

Modified: directory/apacheds/trunk/xdbm-search/src/main/java/org/apache/directory/server/xdbm/search/impl/LessEqEvaluator.java
URL: http://svn.apache.org/viewvc/directory/apacheds/trunk/xdbm-search/src/main/java/org/apache/directory/server/xdbm/search/impl/LessEqEvaluator.java?rev=938457&r1=938456&r2=938457&view=diff
==============================================================================
--- directory/apacheds/trunk/xdbm-search/src/main/java/org/apache/directory/server/xdbm/search/impl/LessEqEvaluator.java
(original)
+++ directory/apacheds/trunk/xdbm-search/src/main/java/org/apache/directory/server/xdbm/search/impl/LessEqEvaluator.java
Tue Apr 27 13:51:45 2010
@@ -123,7 +123,7 @@ public class LessEqEvaluator<T, ID> impl
 
     public boolean evaluateId( ID id ) throws Exception
     {
-        if ( idx != null )
+        if ( idx != null && idx.isDupsEnabled() )
         {
             return idx.reverseLessOrEq( id, node.getValue().get() );
         }
@@ -134,7 +134,7 @@ public class LessEqEvaluator<T, ID> impl
 
     public boolean evaluate( IndexEntry<?, ServerEntry, ID> indexEntry ) throws Exception
     {
-        if ( idx != null )
+        if ( idx != null && idx.isDupsEnabled() )
         {
             return idx.reverseLessOrEq( indexEntry.getId(), node.getValue().get() );
         }



Mime
View raw message