RFR: 8267939: Clarify the specification of iterator and spliterator forEachRemaining [v2]
Stuart Marks
smarks at openjdk.java.net
Wed Jun 2 23:22:36 UTC 2021
On Wed, 2 Jun 2021 22:22:55 GMT, Paul Sandoz <psandoz at openjdk.org> wrote:
>> The specification of `forEachRemaining`, accepting a primitive functional interface, on the primitive iterators is updated to be the same as for `Iterator.forEachRemaining`, specifically the following is added:
>>
>>
>> * <p>
>> * Subsequent behavior of an iterator is unspecified if the action throws an
>> * exception.
>>
>>
>> In addition the specification of `tryAdvance` and `forEachRemaining` on `Spliterator` and the primitive specializations are also updated to include a similar statement:
>>
>>
>> * Subsequent behavior of a spliterator is unspecified if the action throws
>> * an exception.
>
> Paul Sandoz has updated the pull request incrementally with one additional commit since the last revision:
>
> Use source of elements.
Marked as reviewed by smarks (Reviewer).
-------------
PR: https://git.openjdk.java.net/jdk/pull/4290
More information about the core-libs-dev
mailing list