You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@directory.apache.org by "Kiran Ayyagari (JIRA)" <ji...@apache.org> on 2010/10/28 19:22:20 UTC
[jira] Closed: (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:all-tabpanel ]
Kiran Ayyagari closed DIRSERVER-1577.
-------------------------------------
Resolution: Won't Fix
Fix Version/s: 2.0.0-RC1
Assignee: Kiran Ayyagari
This is not the correct way to use the CursorList. Let me explain, this cursor can only handle a list containing cursors, not a list containing
another list of cursors. So if you want this cursor to work you need to add only cursors to the underlying list not a list holding cursors or another list.
> 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.