RFR 8025002 "".codePoints().sorted().iterator().hasNext() causes NegativeArraySizeException
henry.jen at oracle.com
Wed Sep 18 21:00:07 UTC 2013
Looks good to me.
On Sep 18, 2013, at 11:27 AM, Paul Sandoz <paul.sandoz at oracle.com> wrote:
> Please review a fix for CharSequence.codePoints:
> (That change set should apply cleanly to tl.)
> The incorrect spliterator characteristics were being reported when constructing the stream. Specifically it should not report SIZED/SUBSIZED.
> I added a quick test of the characteristics but we should probably add further tests using the stream test framework which would have most likely caught this error much earlier (since parallel evaluation should barf in certain cases). Plus there are more optimal impls that could be provided for String (even IIUC for codePoints if care is taken when splitting). All stuff to consider later on...
More information about the core-libs-dev