directory-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From elecha...@apache.org
Subject svn commit: r1513850 - /directory/apacheds/trunk/core-api/src/main/java/org/apache/directory/server/core/api/filtering/CursorList.java
Date Wed, 14 Aug 2013 12:46:01 GMT
Author: elecharny
Date: Wed Aug 14 12:46:00 2013
New Revision: 1513850

URL: http://svn.apache.org/r1513850
Log:
Fix for DIRSERVER-1883

Modified:
    directory/apacheds/trunk/core-api/src/main/java/org/apache/directory/server/core/api/filtering/CursorList.java

Modified: directory/apacheds/trunk/core-api/src/main/java/org/apache/directory/server/core/api/filtering/CursorList.java
URL: http://svn.apache.org/viewvc/directory/apacheds/trunk/core-api/src/main/java/org/apache/directory/server/core/api/filtering/CursorList.java?rev=1513850&r1=1513849&r2=1513850&view=diff
==============================================================================
--- directory/apacheds/trunk/core-api/src/main/java/org/apache/directory/server/core/api/filtering/CursorList.java
(original)
+++ directory/apacheds/trunk/core-api/src/main/java/org/apache/directory/server/core/api/filtering/CursorList.java
Wed Aug 14 12:46:00 2013
@@ -333,52 +333,22 @@ public class CursorList extends Abstract
     {
         if ( listSize > 0 )
         {
-            // if parked at -1 we advance to the start index and return true
             if ( index == -1 )
             {
                 index = start;
-                currentCursor = list.get( index );
-
-                return currentCursor.next();
             }
 
-            // if the index plus one is less than the end then increment and return true
-            if ( index < end - 1 )
+            while ( index < end )
             {
-                if ( !currentCursor.next() )
-                {
-                    index++;
+                currentCursor = list.get( index );
 
-                    if ( index < end )
-                    {
-                        currentCursor = list.get( index );
-
-                        return currentCursor.next();
-                    }
-                    else
-                    {
-                        return false;
-                    }
-                }
-                else
+                if ( currentCursor.next() )
                 {
                     return true;
                 }
-            }
-
-            // if the index plus one is equal to the end then increment and return false
-            if ( index == end - 1 )
-            {
-                if ( !currentCursor.next() )
-                {
-                    index++;
-                    currentCursor = null;
-
-                    return false;
-                }
                 else
                 {
-                    return true;
+                    index++;
                 }
             }
         }



Mime
View raw message