directory-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From elecha...@apache.org
Subject svn commit: r1381954 - /directory/apacheds/branches/apacheds-mvbt/core-api/src/main/java/org/apache/directory/server/core/api/filtering/BaseEntryFilteringCursor.java
Date Fri, 07 Sep 2012 09:35:06 GMT
Author: elecharny
Date: Fri Sep  7 09:35:06 2012
New Revision: 1381954

URL: http://svn.apache.org/viewvc?rev=1381954&view=rev
Log:
Dealing with the cases where the UUID we fetched does not exist anymore in the mastertable

Modified:
    directory/apacheds/branches/apacheds-mvbt/core-api/src/main/java/org/apache/directory/server/core/api/filtering/BaseEntryFilteringCursor.java

Modified: directory/apacheds/branches/apacheds-mvbt/core-api/src/main/java/org/apache/directory/server/core/api/filtering/BaseEntryFilteringCursor.java
URL: http://svn.apache.org/viewvc/directory/apacheds/branches/apacheds-mvbt/core-api/src/main/java/org/apache/directory/server/core/api/filtering/BaseEntryFilteringCursor.java?rev=1381954&r1=1381953&r2=1381954&view=diff
==============================================================================
--- directory/apacheds/branches/apacheds-mvbt/core-api/src/main/java/org/apache/directory/server/core/api/filtering/BaseEntryFilteringCursor.java
(original)
+++ directory/apacheds/branches/apacheds-mvbt/core-api/src/main/java/org/apache/directory/server/core/api/filtering/BaseEntryFilteringCursor.java
Fri Sep  7 09:35:06 2012
@@ -474,6 +474,12 @@ public class BaseEntryFilteringCursor ex
 
             Entry tempEntry = wrapped.get();
 
+            if ( tempEntry == null )
+            {
+                // no candidate
+                continue;
+            }
+
             if ( tempEntry instanceof ClonedServerEntry )
             {
                 tempResult = tempEntry;
@@ -546,7 +552,14 @@ public class BaseEntryFilteringCursor ex
         outer: while ( wrapped.previous() )
         {
             boolean accepted = true;
-            tempResult = new ClonedServerEntrySearch( wrapped.get() );
+            Entry entry = wrapped.get();
+
+            if ( entry == null )
+            {
+                continue;
+            }
+
+            tempResult = new ClonedServerEntrySearch( entry );
 
             /*
              * O P T I M I Z A T I O N



Mime
View raw message