Regex Point Lambdafication Patch

Paul Sandoz paul.sandoz at oracle.com
Wed Mar 13 05:19:28 PDT 2013


On Mar 13, 2013, at 12:09 AM, Remi Forax <forax at univ-mlv.fr> wrote:

> On 03/12/2013 10:33 PM, Ben Evans wrote:
>> Thanks Brian.
>> 
>> Does this webrev address the current comments?
>> 
>> http://www.java7developer.com/webrev-kittylyst.002/
>> 
>> By the way, I've noticed that something in the webrev process appears
>> to be mangling the Unicode chars in some of my tests. Is this OK? Is
>> it known behaviour?
>> 
>> Thanks,
>> 
>> Ben
> 
> 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.


> Brian,
> I wonder if having Spliterator.split() returning null as a default 
> implementation is a good idea.
> It's far easier to write a Spliterator than an Iterator so either we 
> provide a method that takes a Spliterator that only works serially and 
> transform it to a parallel one or the default implementation of 
> Spliterator.split() should do something more meaningful than 'return null'.
> 

+1.

Paul.


More information about the lambda-dev mailing list