RFR 8025002 "".codePoints().sorted().iterator().hasNext() causes NegativeArraySizeException
paul.sandoz at oracle.com
Wed Sep 18 18:27:24 UTC 2013
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