On Thu, Jul 8, 2010 at 1:10 PM, Emmanuel Lecharny <[email protected]> wrote: > On 7/8/10 9:15 AM, Kiran Ayyagari wrote: >> >> hi guys, >> >> The SearchCursor which we use to get the search results lacks a >> way to return the SearchResultDone message. >> Seelmann pointed this out on IRC today and I have proposed that >> will add a new method getSearchDone() to the SearchCursor. >> >> This method can be called at the end of cursor traversal (after >> cursor.next() returns false) to get the SearchResultDone message. > > Just wondering : if you want to get the SearchResultDone after the last call > to cursor.next(), that means you don't return this SearchResultDone in > cursor.next() ? right, SearchResultDone is not returned with cursor.next(), the reason is to avoid an instanceof check in the while(cursor.next()) loop.
(in case of SearchResultReference or SearchIntermediateResponse the user has to cast anyway but atleast in the case of SearchResultDone it can be avoided cause it will always come last) Kiran Ayyagari
