Regex Point Lambdafication Patch

Paul Sandoz paul.sandoz at oracle.com
Wed Mar 13 08:08:21 PDT 2013


On Mar 13, 2013, at 3:43 PM, Remi Forax <forax at univ-mlv.fr> wrote:
>>> Ben,
>>> if the stream (or the spliterator in the middle) calls iterator.next()
>>> without calling iterator.hasNext(), your code doesn't work. Also because
>>> null is not a possible value for lastChunk, you don't need a flag
>>> (takenLastChunk) here.
>>> 
>> Annoyingly it is not possible to add a test to the stream test scenarios covering that case.
> 
> Is it because the Spliterator that wraps the Iterator always calls 
> hasNext() before calling next() ?

Yes.

Paul.


More information about the lambda-dev mailing list