RFR: 8015320: Pull spliterator() up from Collection to Iterable
Paul Sandoz
paul.sandoz at oracle.com
Wed Jul 10 01:33:27 PDT 2013
On Jul 10, 2013, at 12:52 AM, Henry Jen <henry.jen at oracle.com> wrote:
> Hi,
>
> Please review the webrev at
>
> http://cr.openjdk.java.net/~henryjen/ccc/8015320.0/webrev/
>
> This allows turning an Iterable into a stream with spliterator() methods
> if the implementation provides one(like many Collection implementations)
> rather than be forced to use less-efficient iterator().
>
> Two small changes are not directly related,
> - cleanup on SpliteratorCollisions.java test
> - add a @see Spliterator for ConcurrentModificationException
>
Looks good.
--
As an aside there is lots of shared code in SpliteratorCollisions and SpliteratorTraversingAndSplittingTest that should be pulled out into a separate class.
Paul.
More information about the lambda-dev
mailing list