Integrated: 8267939: Clarify the specification of iterator and spliterator forEachRemaining
Paul Sandoz
psandoz at openjdk.java.net
Thu Jun 3 22:07:01 UTC 2021
On Tue, 1 Jun 2021 19:54:59 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.
This pull request has now been integrated.
Changeset: c1f3094f
Author: Paul Sandoz <psandoz at openjdk.org>
URL: https://git.openjdk.java.net/jdk/commit/c1f3094f814a4f3586222aad50ed314906b5bc9c
Stats: 48 lines in 2 files changed: 20 ins; 21 del; 7 mod
8267939: Clarify the specification of iterator and spliterator forEachRemaining
Reviewed-by: smarks
-------------
PR: https://git.openjdk.java.net/jdk/pull/4290
More information about the core-libs-dev
mailing list