[
https://issues.apache.org/jira/browse/DIRSERVER-1577?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=12926202#action_12926202
]
Kiran Ayyagari commented on DIRSERVER-1577:
-------------------------------------------
Nope, this cursor can't handle plain lists or lists within lists. (This is
intended for a special purpose of handling the search
performed on RootDSE), the javadoc explicitly states a warning about its
internal usage.
Having said that there is a different cursor called ListCursor which takes a
list of values (again just a single list not a list inside a list and so on),
*may* be you can leverage it.
> 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.