RFR 8020016 Numerous splitereator impls do not throw NPE for null Consumers

Paul Sandoz paul.sandoz at oracle.com
Thu Aug 1 20:53:51 UTC 2013


On Aug 1, 2013, at 9:38 PM, Alan Bateman <Alan.Bateman at oracle.com> wrote:

> On 01/08/2013 08:49, Paul Sandoz wrote:
>> 
>> On Aug 1, 2013, at 4:45 PM, Henry Jen <henry.jen at oracle.com> wrote:
>>> In StremSpliterator:366, I assume the NULL check should be before if.
>>> 
>> It saves a redundant check if the wrapping spliterator uses buffering, since the tryAdvance will also check:
>> 
> It looks like the explicit check in DoubleWrappingSpliterator. forEachRemaining is redundant although unlikely to be noticeable. Otherwise looks fine to me.
> 

Thanks, well spotted, same for LongWrappingSpliterator too, i fixed those to be consistent with the others.

Paul.


More information about the core-libs-dev mailing list