You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@directory.apache.org by "Steve hammond (JIRA)" <ji...@apache.org> on 2010/10/28 19:50:21 UTC
[jira] Commented: (DIRSERVER-1577) An Empty cursor list blocks any
other results
[ https://issues.apache.org/jira/browse/DIRSERVER-1577?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=12925889#action_12925889 ]
Steve hammond commented on DIRSERVER-1577:
------------------------------------------
but a CursorList extends Cursor, therefore it can be in a list. Maybe the constructor should throw if you try to do this.
> An Empty cursor list blocks any other results
> ---------------------------------------------
>
> Key: DIRSERVER-1577
> URL: https://issues.apache.org/jira/browse/DIRSERVER-1577
> Project: Directory ApacheDS
> Issue Type: Bug
> Components: core
> Affects Versions: 2.0.0
> Environment: Windows Eclipse
> Reporter: Steve hammond
> Assignee: Kiran Ayyagari
> Fix For: 2.0.0-RC1
>
>
> If I create a CursorList that itself contains cursor lists, any empty list causes the next() function to return false. In the below example if I change the order of adding to CursorList3 to add CursorList2 first, and then 1, this passes. But the other order does not.
> public void testCursorList()
> throws Exception
> {
> SearchOperationContext opContext = new SearchOperationContext(testSession);
> ArrayList<EntryFilteringCursor> cursorArray1 = new ArrayList<EntryFilteringCursor>();
> ArrayList<EntryFilteringCursor> cursorArray2 = new ArrayList<EntryFilteringCursor>();
> ArrayList<EntryFilteringCursor> cursorArray3 = new ArrayList<EntryFilteringCursor>();
> ArrayList<Entry> results = new ArrayList<Entry>();
> DefaultEntry entry = new DefaultEntry();
> results.add(entry);
> cursorArray2.add(new BaseEntryFilteringCursor(new ListCursor<Entry>(results), opContext));
>
> CursorList cursorList1 = new CursorList(cursorArray1, opContext);
> CursorList cursorList2 = new CursorList(cursorArray2, opContext);
> cursorArray3.add(cursorList1);
> cursorArray3.add(cursorList2);
>
> CursorList cursorList3 = new CursorList(cursorArray3, opContext);
>
> assertTrue(cursorList3.next());
> }
--
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.